X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Ffront%2Fcontroller%2Fadmin%2FToolsControllerTest.php;h=e82f8b143c050b67e790e41ab64d153b17a6acde;hb=a5a9cf23acd1248585173aa32757d9720b5f2d62;hp=47c5746e1f058e1ed27379249f4c0d5af4d97159;hpb=ba43064ddb7771fc97df135a32f9b0d5e373dd36;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/front/controller/admin/ToolsControllerTest.php b/tests/front/controller/admin/ToolsControllerTest.php index 47c5746e..e82f8b14 100644 --- a/tests/front/controller/admin/ToolsControllerTest.php +++ b/tests/front/controller/admin/ToolsControllerTest.php @@ -4,11 +4,11 @@ declare(strict_types=1); namespace Shaarli\Front\Controller\Admin; -use PHPUnit\Framework\TestCase; +use Shaarli\TestCase; use Slim\Http\Request; use Slim\Http\Response; -class ToolsControllerTestControllerTest extends TestCase +class ToolsControllerTest extends TestCase { use FrontAdminControllerMockHelper; @@ -24,8 +24,6 @@ class ToolsControllerTestControllerTest extends TestCase public function testDefaultInvokeWithHttps(): void { - $this->createValidContainerMockSet(); - $request = $this->createMock(Request::class); $response = new Response(); @@ -43,14 +41,12 @@ class ToolsControllerTestControllerTest extends TestCase static::assertSame(200, $result->getStatusCode()); static::assertSame('tools', (string) $result->getBody()); - static::assertSame('https://shaarli', $assignedVariables['pageabsaddr']); + static::assertSame('https://shaarli/', $assignedVariables['pageabsaddr']); static::assertTrue($assignedVariables['sslenabled']); } public function testDefaultInvokeWithoutHttps(): void { - $this->createValidContainerMockSet(); - $request = $this->createMock(Request::class); $response = new Response(); @@ -67,7 +63,7 @@ class ToolsControllerTestControllerTest extends TestCase static::assertSame(200, $result->getStatusCode()); static::assertSame('tools', (string) $result->getBody()); - static::assertSame('http://shaarli', $assignedVariables['pageabsaddr']); + static::assertSame('http://shaarli/', $assignedVariables['pageabsaddr']); static::assertFalse($assignedVariables['sslenabled']); } }