@@ 54-63 (lines=10) @@ | ||
51 | $this->assertEquals(1, count($content)); |
|
52 | } |
|
53 | ||
54 | public function testGetsActionWithPage() { |
|
55 | $this->client->request('GET', '/orders.json?page=2'); |
|
56 | $this->assertEquals("200", $this->client->getResponse()->getStatusCode()); |
|
57 | $content = json_decode($this->client->getResponse()->getContent(), true); |
|
58 | $this->assertEquals(0, count($content)); |
|
59 | $this->client->request('GET', '/orders.json?page=2&limit=1'); |
|
60 | $this->assertEquals("200", $this->client->getResponse()->getStatusCode()); |
|
61 | $content = json_decode($this->client->getResponse()->getContent(), true); |
|
62 | $this->assertEquals(1, count($content)); |
|
63 | } |
|
64 | ||
65 | public function testGetActionWithId() { |
|
66 | $repo = $this->client->getContainer()->get('doctrine_mongodb.odm.default_document_manager')->getRepository('TestTestBundle:Order'); |
@@ 83-92 (lines=10) @@ | ||
80 | $this->assertEquals(1, count($content)); |
|
81 | } |
|
82 | ||
83 | public function testGetsActionWithPage() { |
|
84 | $this->client->request('GET', '/cars.json?page=2'); |
|
85 | $this->assertEquals("200", $this->client->getResponse()->getStatusCode()); |
|
86 | $content = json_decode($this->client->getResponse()->getContent(), true); |
|
87 | $this->assertEquals(0, count($content)); |
|
88 | $this->client->request('GET', '/cars.json?page=2&limit=1'); |
|
89 | $this->assertEquals("200", $this->client->getResponse()->getStatusCode()); |
|
90 | $content = json_decode($this->client->getResponse()->getContent(), true); |
|
91 | $this->assertEquals(1, count($content)); |
|
92 | } |
|
93 | ||
94 | public function testGetActionWithId() { |
|
95 | $repo = $this->client->getContainer()->get('doctrine.orm.default_entity_manager')->getRepository('TestTestBundle:Car'); |