Created
August 2, 2011 15:36
-
-
Save johnwards/1120453 to your computer and use it in GitHub Desktop.
Send yourself to a non existant route. The file should be in the file bag...it's missing :(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
class UploadTest extends WebTestCase | |
{ | |
public function testNewPhotos() | |
{ | |
$client = $this->createClient(); | |
$client->request('POST', '/submit', array('name' => 'Fabien'), array('photo' => __FILE__)); | |
$this->assertEquals(1, count($client->getRequest()->files->all())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment