forked from wallabag/wallabag
Enable PHPStan
- Fix error for level 0 & 1 (level 7 has 699 errors...) - Add `updated_at` to site_credential (so the `timestamps()` method applies correctly)
This commit is contained in:
@ -121,7 +121,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
|
||||
$this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
|
||||
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.usinenouvelle.com is ok');
|
||||
$this->assertNotEmpty($content->getLanguage(), 'Language for http://www.usinenouvelle.com is ok');
|
||||
$this->assertSame(1, \count($content->getTags()));
|
||||
$this->assertCount(1, $content->getTags());
|
||||
|
||||
$createdAt = $content->getCreatedAt();
|
||||
$this->assertSame('2011', $createdAt->format('Y'));
|
||||
|
||||
@ -122,7 +122,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
|
||||
$this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://lexpansion.lexpress.fr is ok');
|
||||
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok');
|
||||
$this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.fr is ok');
|
||||
$this->assertSame(3, \count($content->getTags()));
|
||||
$this->assertCount(3, $content->getTags());
|
||||
|
||||
$content = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
|
||||
@ -124,7 +124,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is ok');
|
||||
$this->assertNotEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is ok');
|
||||
$this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag');
|
||||
$this->assertSame(1, \count($content->getTags()));
|
||||
$this->assertCount(1, $content->getTags());
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
|
||||
$content = $client->getContainer()
|
||||
@ -138,7 +138,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
|
||||
$this->assertContains('foot', $content->getTags());
|
||||
$this->assertContains('test_tag', $content->getTags());
|
||||
|
||||
$this->assertSame(2, \count($content->getTags()));
|
||||
$this->assertCount(2, $content->getTags());
|
||||
}
|
||||
|
||||
public function testImportInstapaperWithFileAndMarkAllAsRead()
|
||||
|
||||
@ -127,7 +127,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
|
||||
$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->assertSame(3, \count($tags));
|
||||
$this->assertCount(3, $tags);
|
||||
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
$this->assertSame('2016-10-26', $content->getCreatedAt()->format('Y-m-d'));
|
||||
|
||||
@ -125,7 +125,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$tags = $content->getTags();
|
||||
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
|
||||
$this->assertSame(1, \count($tags));
|
||||
$this->assertCount(1, $tags);
|
||||
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
$this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
|
||||
|
||||
@ -127,7 +127,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
$tags = $content->getTags();
|
||||
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
|
||||
$this->assertContains('framabag', $tags, 'It includes the "framabag" tag');
|
||||
$this->assertSame(2, \count($tags));
|
||||
$this->assertCount(2, $tags);
|
||||
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$tags = $content->getTags();
|
||||
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
|
||||
$this->assertSame(1, \count($tags));
|
||||
$this->assertCount(1, $tags);
|
||||
|
||||
$content = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
@ -147,7 +147,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
|
||||
$this->assertContains('mediapart', $tags, 'It includes the "mediapart" tag');
|
||||
$this->assertContains('blog', $tags, 'It includes the "blog" tag');
|
||||
$this->assertSame(3, \count($tags));
|
||||
$this->assertCount(3, $tags);
|
||||
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
$this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
|
||||
|
||||
Reference in New Issue
Block a user