]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3426 from wallabag/fix-migration-3373
authorNicolas LÅ“uillet <nicolas@loeuillet.org>
Tue, 21 Nov 2017 10:03:39 +0000 (11:03 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2017 10:03:39 +0000 (11:03 +0100)
Fix MySQL issue on mig from #3373

app/DoctrineMigrations/Version20171008195606.php
tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php

index c190f4ed38324a6ee07ca759de1953b25dd90a3d..f09726c8532dbf72e0eea8e22ba164273861399c 100644 (file)
@@ -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':
index 65a3ccd9a95a96d7b7e9d277df2c53e27c67a130..b0d4c4e1a609bfb8778fc1da9b310fe6cb64b082 100644 (file)
@@ -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()
index 5d6a29fec9fcd9ec3efef558c8c51e87adb9d89d..5aee9f5c0003d04324cd9403b7f6322492460679 100644 (file)
@@ -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());
index f94c2137252d44f011c3eecd874576f8d983d952..0731a0c0b9f1e28f92f03b8b00165b00edf0e43a 100644 (file)
@@ -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()