Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RepositoryControllerTest extends \Silex\WebTestCase
- {
- public function testGetAllAction()
- {
- $request = $this->getMock( 'Symfony\Component\HttpFoundation\Request' );
- $app = new \ArrayAccess;
- $app['em'] = $this->getEntityManager(); // your mocked database
- $expected_results = json_encode( $you_know_this );
- $controller = new RepositoryController( $request, $app );
- assertSame( $expected_results, $controller->getAllAction() );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement