createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[id]' => 'a']); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(500, $client->getResponse()->getStatusCode()); } public function testErrorParentNotInteger() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[parent]' => 'a']); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(500, $client->getResponse()->getStatusCode()); } public function testErrorOltNotInteger() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[olt]' => 'a']); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(500, $client->getResponse()->getStatusCode()); } public function testErrorTenancyIdNotInteger() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[tenancyId]' => 'a']); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(500, $client->getResponse()->getStatusCode()); } public function testErrorCriteriaNotInteger() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[qb-criteria]' => 'a']); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(500, $client->getResponse()->getStatusCode()); } public function testOkId() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[id]' => 1]); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(200, $client->getResponse()->getStatusCode()); } public function testOkParent() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[parent]' => 1]); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(200, $client->getResponse()->getStatusCode()); } public function testOkOlt() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[olt]' => 1]); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(200, $client->getResponse()->getStatusCode()); } public function testOkTenancyId() { $client = $this->createClient(); $client->followRedirects(true); $crawler = $client->request('GET', '/api/v1/naps', ['filters[tenancyId]' => 1]); if ($this->debugTest) { var_dump($crawler->filter('body')->text()); } $this->assertEquals(200, $client->getResponse()->getStatusCode()); } }