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

formForPersistedObjectIsRedisplayedIfValidationErrorsOccur() 공개 메소드

    public function formForPersistedObjectIsRedisplayedIfValidationErrorsOccur()
    {
        $postIdentifier = $this->setupDummyPost();
        $this->browser->request('http://localhost/test/fluid/formobjects/edit?fooPost=' . $postIdentifier);
        $form = $this->browser->getForm();
        $form['post']['name']->setValue('Egon Olsen');
        $form['post']['author']['emailAddress']->setValue('test_noValidEmail');
        $this->browser->submit($form);
        $form = $this->browser->getForm();
        $this->assertSame('Egon Olsen', $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('Egon Olsen|[email protected]', $response->getContent());
    }