Updated testing tools

This commit is contained in:
Alejandro Celaya
2019-02-16 10:53:45 +01:00
parent 899bfdce2b
commit b8cb38ae5c
91 changed files with 192 additions and 192 deletions

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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']));

View File

@@ -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());
}
/**

View File

@@ -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());

View File

@@ -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());

View File

@@ -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());

View File

@@ -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(), [

View File

@@ -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(), []);

View File

@@ -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);

View File

@@ -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());

View File

@@ -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());

View File

@@ -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());

View File

@@ -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());

View File

@@ -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());