Skip to content

Instantly share code, notes, and snippets.

@romainneutron
Last active December 16, 2015 20:49
Show Gist options
  • Save romainneutron/5495595 to your computer and use it in GitHub Desktop.
Save romainneutron/5495595 to your computer and use it in GitHub Desktop.
<?php
use Silex\WebTestCase;
class FormTest extends WebTestCase
{
public function createApplication()
{
return require __DIR__.'/../../app.php';
}
public function testSubmitRedirects()
{
$client = $this->createClient();
$client->request('POST', '/update/', array(
'key' => 'value'
));
$response = $client->getResponse();
$this->assertTrue($response->isRedirect());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment