]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/UtilsTest.php
Merge pull request #1569 from ArthurHoaro/fix/bad-encoding
[github/shaarli/Shaarli.git] / tests / UtilsTest.php
index 8225d95ae067d3c5db9fb4a352860bb341c8b961..93b77539cb33fb8c16e069415f5e81a3a4f7554c 100644 (file)
@@ -26,7 +26,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Assign reference data
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$defaultTimeZone = date_default_timezone_get();
         // Timezone without DST for test consistency
@@ -36,7 +36,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Reset the timezone
      */
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         date_default_timezone_set(self::$defaultTimeZone);
     }
@@ -44,7 +44,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Resets test data before each test
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$testLogFile)) {
             unlink(self::$testLogFile);
@@ -203,7 +203,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     public function testGenerateLocationLoop()
     {
         $ref = 'http://localhost/?test';
-        $this->assertEquals('?', generateLocation($ref, 'localhost', array('test')));
+        $this->assertEquals('./?', generateLocation($ref, 'localhost', array('test')));
     }
 
     /**
@@ -212,7 +212,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     public function testGenerateLocationOut()
     {
         $ref = 'http://somewebsite.com/?test';
-        $this->assertEquals('?', generateLocation($ref, 'localhost'));
+        $this->assertEquals('./?', generateLocation($ref, 'localhost'));
     }