Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. class RepositoryControllerTest extends \Silex\WebTestCase
  2. {
  3.  
  4.     public function testGetAllAction()
  5.     {
  6.         $request = $this->getMock( 'Symfony\Component\HttpFoundation\Request' );
  7.        
  8.         $app = new \ArrayAccess;
  9.         $app['em'] = $this->getEntityManager(); // your mocked database
  10.        
  11.         $expected_results = json_encode( $you_know_this );
  12.        
  13.         $controller = new RepositoryController( $request, $app );
  14.        
  15.         assertSame( $expected_results, $controller->getAllAction() );
  16.     }
  17.    
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement