From b3d85e69e913ea4590a03498ced6c8589df3a36f Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Mon, 20 Nov 2017 22:39:33 +0100 Subject: [PATCH 1/2] Fix MySQL issue on mig from #3373 Signed-off-by: Kevin Decherf --- app/DoctrineMigrations/Version20171008195606.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php index c190f4ed3..f09726c85 100644 --- a/app/DoctrineMigrations/Version20171008195606.php +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -31,6 +31,7 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI switch ($this->connection->getDatabasePlatform()->getName()) { case 'mysql': + $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;'); break; case 'postgresql': From 64a5a6cfc5211a42b267a623588ddb3c0b527aa4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 21 Nov 2017 10:30:35 +0100 Subject: [PATCH 2/2] CS --- tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 2 +- .../GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php | 2 +- tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 65a3ccd9a..b0d4c4e1a 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -983,7 +983,7 @@ class EntryRestControllerTest extends WallabagApiTestCase $content = json_decode($this->client->getResponse()->getContent(), true); - $this->assertSame(false, $content['exists']); + $this->assertFalse($content['exists']); } public function testGetEntriesExistsWithNoUrl() diff --git a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php index 5d6a29fec..5aee9f5c0 100644 --- a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php +++ b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php @@ -68,7 +68,7 @@ class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase $config = $this->builder->buildForHost('www.example.com'); $this->assertSame('example.com', $config->getHost()); - $this->assertSame(true, $config->requiresLogin()); + $this->assertTrue($config->requiresLogin()); $this->assertSame('http://www.example.com/login', $config->getLoginUri()); $this->assertSame('login', $config->getUsernameField()); $this->assertSame('password', $config->getPasswordField()); diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index f94c21372..0731a0c0b 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php @@ -51,7 +51,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase $this->assertEmpty($entry->getMimetype()); $this->assertEmpty($entry->getLanguage()); $this->assertSame(0.0, $entry->getReadingTime()); - $this->assertSame(null, $entry->getDomainName()); + $this->assertNull($entry->getDomainName()); } public function testWithEmptyContent()