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;
public function testDefaultInvokeWithHttps(): void
{
- $this->createValidContainerMockSet();
-
$request = $this->createMock(Request::class);
$response = new Response();
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();
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']);
}
}