]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/front/controller/admin/ManageTagControllerTest.php
Compatibility with PHPUnit 9
[github/shaarli/Shaarli.git] / tests / front / controller / admin / ManageTagControllerTest.php
index eed99231ba1d49102c64ad585b5605d4c48ebe76..8a0ff7a96ead9956bd9429a746a2be64d47b2fa7 100644 (file)
@@ -4,11 +4,11 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin;
 
-use PHPUnit\Framework\TestCase;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\BookmarkFilter;
 use Shaarli\Front\Exception\WrongTokenException;
 use Shaarli\Security\SessionManager;
+use Shaarli\TestCase;
 use Slim\Http\Request;
 use Slim\Http\Response;
 
@@ -93,7 +93,7 @@ class ManageTagControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./?searchtags=new-tag'], $result->getHeader('location'));
+        static::assertSame(['/subfolder/?searchtags=new-tag'], $result->getHeader('location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayNotHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
@@ -146,7 +146,7 @@ class ManageTagControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./manage-tags'], $result->getHeader('location'));
+        static::assertSame(['/subfolder/admin/tags'], $result->getHeader('location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayNotHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
@@ -197,7 +197,7 @@ class ManageTagControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./manage-tags'], $result->getHeader('location'));
+        static::assertSame(['/subfolder/admin/tags'], $result->getHeader('location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
@@ -229,7 +229,7 @@ class ManageTagControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./manage-tags'], $result->getHeader('location'));
+        static::assertSame(['/subfolder/admin/tags'], $result->getHeader('location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);
@@ -262,7 +262,7 @@ class ManageTagControllerTest extends TestCase
         $result = $this->controller->save($request, $response);
 
         static::assertSame(302, $result->getStatusCode());
-        static::assertSame(['./manage-tags'], $result->getHeader('location'));
+        static::assertSame(['/subfolder/admin/tags'], $result->getHeader('location'));
 
         static::assertArrayNotHasKey(SessionManager::KEY_ERROR_MESSAGES, $session);
         static::assertArrayHasKey(SessionManager::KEY_WARNING_MESSAGES, $session);