]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/front/controller/admin/ConfigureControllerTest.php
Compatibility with PHPUnit 9
[github/shaarli/Shaarli.git] / tests / front / controller / admin / ConfigureControllerTest.php
index 40304a1885e332e3023c06764fa904bd3afbbbe4..aca6cff310394979c1677f22b41789d1f2571c9d 100644 (file)
@@ -4,10 +4,10 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin;
 
-use PHPUnit\Framework\TestCase;
 use Shaarli\Config\ConfigManager;
 use Shaarli\Front\Exception\WrongTokenException;
 use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
 use Shaarli\Thumbnailer;
 use Slim\Http\Request;
 use Slim\Http\Response;
@@ -62,7 +62,7 @@ class ConfigureControllerTest extends TestCase
         static::assertSame('privacy.hide_public_links', $assignedVariables['hide_public_links']);
         static::assertSame('api.enabled', $assignedVariables['api_enabled']);
         static::assertSame('api.secret', $assignedVariables['api_secret']);
-        static::assertCount(4, $assignedVariables['languages']);
+        static::assertCount(5, $assignedVariables['languages']);
         static::assertArrayHasKey('gd_enabled', $assignedVariables);
         static::assertSame('thumbnails.mode', $assignedVariables['thumbnails_mode']);
     }
@@ -142,7 +142,7 @@ class ConfigureControllerTest extends TestCase
 
         $result = $this->controller->save($request, $response);
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./configure'], $result->getHeader('Location'));
+        static::assertSame(['/subfolder/admin/configure'], $result->getHeader('Location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
@@ -193,7 +193,7 @@ class ConfigureControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./configure'], $result->getHeader('Location'));
+        static::assertSame(['/subfolder/admin/configure'], $result->getHeader('Location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
@@ -242,7 +242,7 @@ class ConfigureControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./configure'], $result->getHeader('Location'));
+        static::assertSame(['/subfolder/admin/configure'], $result->getHeader('Location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayNotHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);