- return [
- 'with_id' => [
- 'url' => '/api/entries/exists?url=http://0.0.0.0/entry2&return_id=1',
- 'expectedValue' => 2,
- ],
- 'without_id' => [
- 'url' => '/api/entries/exists?url=http://0.0.0.0/entry2',
- 'expectedValue' => true,
- ],
- ];
+ $this->client->request('GET', '/api/entries/exists?url=http://0.0.0.0/entry2&return_id=1');
+
+ $this->assertSame(200, $this->client->getResponse()->getStatusCode());
+
+ $content = json_decode($this->client->getResponse()->getContent(), true);
+
+ // it returns a database id, we don't know it, so we only check it's greater than the lowest possible value
+ $this->assertGreaterThan(1, $content['exists']);