Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2012 12:28
Show Gist options
  • Save anonymous/3331658 to your computer and use it in GitHub Desktop.
Save anonymous/3331658 to your computer and use it in GitHub Desktop.
Fluid functional test
/**
* @test
*/
public function objectIsNotModifiedOnFormError() {
$postIdentifier = $this->setupDummyPost();
$this->browser->request('http://localhost/test/fluid/formobjects/edit?fooPost=' . $postIdentifier);
$form = $this->browser->getForm();
$form['post']['name']->setValue('Hello World');
$form['post']['email']->setValue('test_noValidEmail');
$response = $this->browser->submit($form);
$this->assertNotSame('Hello World|test_noValidEmail', $response->getContent());
$post = $this->persistenceManager->getObjectByIdentifier($postIdentifier, '\TYPO3\Fluid\Tests\Functional\Form\Fixtures\Domain\Model\Post');
$this->assertNotSame('test_noValidEmail', $post->getEmail());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment