1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

CS & improve tags assertions

This commit is contained in:
Jeremy Benoist 2017-05-31 10:38:15 +02:00
parent 7a8ed3cee1
commit bad7df8c00
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
9 changed files with 34 additions and 18 deletions

View file

@ -121,7 +121,13 @@ class PinboardControllerTest extends WallabagCoreTestCase
$this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://ma.ttias.be is ok');
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://ma.ttias.be is ok');
$this->assertNotEmpty($content->getLanguage(), 'Language for https://ma.ttias.be is ok');
$this->assertEquals(3, count($content->getTags()));
$tags = $content->getTags();
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
$this->assertContains('varnish', $tags, 'It includes the "varnish" tag');
$this->assertContains('PHP', $tags, 'It includes the "PHP" tag');
$this->assertEquals(3, count($tags));
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
$this->assertEquals('2016-10-26', $content->getCreatedAt()->format('Y-m-d'));
}