mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Updated testing tools
This commit is contained in:
@@ -22,7 +22,7 @@ class AuthenticateActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $jwtService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->apiKeyService = $this->prophesize(ApiKeyService::class);
|
||||
$this->jwtService = $this->prophesize(JWTService::class);
|
||||
|
||||
@@ -16,7 +16,7 @@ class HealthActionFactoryTest extends TestCase
|
||||
/** @var Action\HealthActionFactory */
|
||||
private $factory;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->factory = new Action\HealthActionFactory();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class HealthActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $conn;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->conn = $this->prophesize(Connection::class);
|
||||
$this->action = new HealthAction($this->conn->reveal(), new AppOptions(['version' => '1.2.3']));
|
||||
|
||||
@@ -25,7 +25,7 @@ class CreateShortUrlActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
||||
$this->action = new CreateShortUrlAction($this->urlShortener->reveal(), [
|
||||
@@ -97,7 +97,7 @@ class CreateShortUrlActionTest extends TestCase
|
||||
]);
|
||||
$response = $this->action->handle($request);
|
||||
$this->assertEquals(400, $response->getStatusCode());
|
||||
$this->assertContains(RestUtils::INVALID_SLUG_ERROR, (string) $response->getBody());
|
||||
$this->assertStringContainsString(RestUtils::INVALID_SLUG_ERROR, (string) $response->getBody());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ class DeleteShortUrlActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $service;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->service = $this->prophesize(DeleteShortUrlServiceInterface::class);
|
||||
$this->action = new DeleteShortUrlAction($this->service->reveal());
|
||||
|
||||
@@ -21,7 +21,7 @@ class EditShortUrlActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->shortUrlService = $this->prophesize(ShortUrlServiceInterface::class);
|
||||
$this->action = new EditShortUrlAction($this->shortUrlService->reveal());
|
||||
|
||||
@@ -18,7 +18,7 @@ class EditShortUrlTagsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->shortUrlService = $this->prophesize(ShortUrlService::class);
|
||||
$this->action = new EditShortUrlTagsAction($this->shortUrlService->reveal());
|
||||
|
||||
@@ -19,7 +19,7 @@ class ListShortUrlsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $service;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->service = $this->prophesize(ShortUrlService::class);
|
||||
$this->action = new ListShortUrlsAction($this->service->reveal(), [
|
||||
|
||||
@@ -22,7 +22,7 @@ class ResolveShortUrlActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
||||
$this->action = new ResolveShortUrlAction($this->urlShortener->reveal(), []);
|
||||
|
||||
@@ -25,7 +25,7 @@ class SingleStepCreateShortUrlActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->urlShortener = $this->prophesize(UrlShortenerInterface::class);
|
||||
$this->apiKeyService = $this->prophesize(ApiKeyServiceInterface::class);
|
||||
|
||||
@@ -18,7 +18,7 @@ class CreateTagsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
$this->action = new CreateTagsAction($this->tagService->reveal());
|
||||
|
||||
@@ -17,7 +17,7 @@ class DeleteTagsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
$this->action = new DeleteTagsAction($this->tagService->reveal());
|
||||
|
||||
@@ -19,7 +19,7 @@ class ListTagsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
$this->action = new ListTagsAction($this->tagService->reveal());
|
||||
|
||||
@@ -19,7 +19,7 @@ class UpdateTagActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
$this->action = new UpdateTagAction($this->tagService->reveal());
|
||||
|
||||
@@ -23,7 +23,7 @@ class GetVisitsActionTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $visitsTracker;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->visitsTracker = $this->prophesize(VisitsTracker::class);
|
||||
$this->action = new GetVisitsAction($this->visitsTracker->reveal());
|
||||
|
||||
Reference in New Issue
Block a user