$this->assertSame($entry->getTitle(), $content['title']);
$this->assertSame($entry->getUrl(), $content['url']);
- $this->assertCount(count($entry->getTags()), $content['tags']);
+ $this->assertCount(\count($entry->getTags()), $content['tags']);
$this->assertSame($entry->getUserName(), $content['user_name']);
$this->assertSame($entry->getUserEmail(), $content['user_email']);
$this->assertSame($entry->getUserId(), $content['user_id']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertNotEmpty($content['_embedded']['items']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertArrayHasKey('items', $content['_embedded']);
$this->assertGreaterThanOrEqual(0, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertArrayHasKey('items', $content['_embedded']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertNotEmpty($content['_embedded']['items']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertNotEmpty($content['_embedded']['items']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertNotEmpty($content['_embedded']['items']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertNotEmpty($content['_embedded']['items']);
$this->assertGreaterThanOrEqual(1, $content['total']);
$this->assertSame(1, $content['page']);
$content = json_decode($this->client->getResponse()->getContent(), true);
- $this->assertGreaterThanOrEqual(1, count($content));
+ $this->assertGreaterThanOrEqual(1, \count($content));
$this->assertEmpty($content['_embedded']['items']);
$this->assertSame(0, $content['total']);
$this->assertSame(1, $content['page']);
$this->assertSame($entry->getId(), $content['id']);
$this->assertSame($entry->getUrl(), $content['url']);
$this->assertSame('New awesome title', $content['title']);
- $this->assertGreaterThanOrEqual(1, count($content['tags']), 'We force only one tag');
+ $this->assertGreaterThanOrEqual(1, \count($content['tags']), 'We force only one tag');
$this->assertSame(1, $content['user_id']);
$this->assertSame('de_AT', $content['language']);
$this->assertSame('http://preview.io/picture.jpg', $content['preview_picture']);
$this->assertSame($entry->getId(), $content['id']);
$this->assertSame($entry->getUrl(), $content['url']);
- $this->assertGreaterThanOrEqual(1, count($content['tags']), 'We force only one tag');
+ $this->assertGreaterThanOrEqual(1, \count($content['tags']), 'We force only one tag');
$this->assertEmpty($content['published_by'], 'Authors were not saved because of an array instead of a string');
$this->assertSame($previousContent, $content['content'], 'Ensure content has not moved');
$this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved');
$this->markTestSkipped('No content found in db.');
}
- $nbTags = count($entry->getTags());
+ $nbTags = \count($entry->getTags());
$newTags = 'tag1,tag2,tag3';
$content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertArrayHasKey('tags', $content);
- $this->assertSame($nbTags + 3, count($content['tags']));
+ $this->assertSame($nbTags + 3, \count($content['tags']));
$entryDB = $this->client->getContainer()
->get('doctrine.orm.entity_manager')
}
// hydrate the tags relations
- $nbTags = count($entry->getTags());
+ $nbTags = \count($entry->getTags());
$tag = $entry->getTags()[0];
$this->client->request('DELETE', '/api/entries/' . $entry->getId() . '/tags/' . $tag->getId() . '.json');
$content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertArrayHasKey('tags', $content);
- $this->assertSame($nbTags - 1, count($content['tags']));
+ $this->assertSame($nbTags - 1, \count($content['tags']));
}
public function testSaveIsArchivedAfterPost()