X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Ffront%2Fcontroller%2Fadmin%2FToolsControllerTest.php;h=39144d2f0dca0960098db18e1c241f050d5f73b5;hb=98e7a59ca21b51cbd86d09cd5d217c0c8bf3db77;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..39144d2f 100644 --- a/tests/front/controller/admin/ToolsControllerTest.php +++ b/tests/front/controller/admin/ToolsControllerTest.php @@ -8,7 +8,7 @@ use PHPUnit\Framework\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']); } }