Browse Source

Fix syntax error in 7.2 and assertion in Driver test

Mark Story 6 years ago
parent
commit
3f77df0455

+ 1 - 1
tests/TestCase/Database/DriverTest.php

@@ -48,7 +48,7 @@ class DriverTest extends TestCase
      */
     public function testConstructorException()
     {
-        $this->expectException(\InvalidArgumentException::class);
+        $this->expectException(\Exception::class);
         $this->expectExceptionMessage('Please pass "username" instead of "login" for connecting to the database');
         $arg = ['login' => 'Bear'];
         $this->getMockForAbstractClass(Driver::class, [$arg]);

+ 6 - 6
tests/TestCase/Shell/Task/ExtractTaskTest.php

@@ -249,7 +249,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             'i18n extract ' .
             '--extract-core=no ' .
             '--plugin=TestPlugin ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
 
@@ -273,7 +273,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             'i18n extract ' .
             '--extract-core=no ' .
             '--plugin=Company/TestPluginThree ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
 
@@ -301,7 +301,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             '--extract-core=no ' .
             '--overwrite ' .
             '--paths=' . TEST_APP . 'TestApp/ ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
 
@@ -321,7 +321,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             'i18n extract ' .
             '--extract-core=yes ' .
             '--paths=' . TEST_APP . 'TestApp/ ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
 
@@ -348,7 +348,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             '--merge=no ' .
             '--extract-core=no ' .
             '--paths=' . TEST_APP . 'templates/Pages ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
         $this->assertErrorContains('Invalid marker content in');
@@ -367,7 +367,7 @@ class ExtractTaskTest extends ConsoleIntegrationTestCase
             '--relative-paths ' .
             '--extract-core=no ' .
             '--paths=' . TEST_APP . 'templates ' .
-            '--output=' . $this->path . DS,
+            '--output=' . $this->path . DS
         );
         $this->assertExitSuccess();
         $this->assertFileExists($this->path . DS . 'default.pot');