Neos\FluidAdaptor\Tests\Functional\Form\FormObjectsTest::formIsRedisplayedIfValidationErrorsOccur PHP 메소드

formIsRedisplayedIfValidationErrorsOccur() 공개 메소드

    public function formIsRedisplayedIfValidationErrorsOccur()
    {
        $this->browser->request('http://localhost/test/fluid/formobjects');
        $form = $this->browser->getForm();
        $form['post']['name']->setValue('Neos Team');
        $form['post']['author']['emailAddress']->setValue('test_noValidEmail');
        $this->browser->submit($form);
        $form = $this->browser->getForm();
        $this->assertSame('Neos Team', $form['post']['name']->getValue());
        $this->assertSame('test_noValidEmail', $form['post']['author']['emailAddress']->getValue());
        $this->assertSame('f3-form-error', $this->browser->getCrawler()->filterXPath('//*[@id="email"]')->attr('class'));
        $form['post']['author']['emailAddress']->setValue('[email protected]');
        $response = $this->browser->submit($form);
        $this->assertSame('Neos Team|[email protected]', $response->getContent());
    }