$this->assertSame(1, $content['page']);
$this->assertGreaterThanOrEqual(1, $content['pages']);
+ $this->assertContains('foo', array_column($content['_embedded']['items'][0]['tags'], 'label'), 'Entries tags should have "foo" tag');
+ $this->assertContains('bar', array_column($content['_embedded']['items'][0]['tags'], 'label'), 'Entries tags should have "bar" tag');
+
$this->assertArrayHasKey('_links', $content);
$this->assertArrayHasKey('self', $content['_links']);
$this->assertArrayHasKey('first', $content['_links']);
$this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type'));
}
+ public function testGetTaggedEntriesWithBadParams()
+ {
+ $this->client->request('GET', '/api/entries', ['tags' => ['foo', 'bar']]);
+
+ $this->assertSame(200, $this->client->getResponse()->getStatusCode());
+ }
+
public function testGetDatedEntries()
{
$this->client->request('GET', '/api/entries', ['since' => 1443274283]);