mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Added stricter types for mocks
This commit is contained in:
@@ -30,8 +30,8 @@ use function sprintf;
|
||||
class VisitLocatorTest extends TestCase
|
||||
{
|
||||
private VisitLocator $visitService;
|
||||
private MockObject $em;
|
||||
private MockObject $repo;
|
||||
private MockObject & EntityManager $em;
|
||||
private MockObject & VisitRepositoryInterface $repo;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
||||
class NonOrphanVisitsPaginatorAdapterTest extends TestCase
|
||||
{
|
||||
private NonOrphanVisitsPaginatorAdapter $adapter;
|
||||
private MockObject $repo;
|
||||
private MockObject & VisitRepositoryInterface $repo;
|
||||
private VisitsParams $params;
|
||||
private ApiKey $apiKey;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use Shlinkio\Shlink\Core\Visit\Repository\VisitRepositoryInterface;
|
||||
class OrphanVisitsPaginatorAdapterTest extends TestCase
|
||||
{
|
||||
private OrphanVisitsPaginatorAdapter $adapter;
|
||||
private MockObject $repo;
|
||||
private MockObject & VisitRepositoryInterface $repo;
|
||||
private VisitsParams $params;
|
||||
|
||||
protected function setUp(): void
|
||||
|
||||
@@ -17,7 +17,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
||||
|
||||
class ShortUrlVisitsPaginatorAdapterTest extends TestCase
|
||||
{
|
||||
private MockObject $repo;
|
||||
private MockObject & VisitRepositoryInterface $repo;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
||||
|
||||
class VisitsForTagPaginatorAdapterTest extends TestCase
|
||||
{
|
||||
private MockObject $repo;
|
||||
private MockObject & VisitRepositoryInterface $repo;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
@@ -23,8 +23,8 @@ class RequestTrackerTest extends TestCase
|
||||
private const LONG_URL = 'https://domain.com/foo/bar?some=thing';
|
||||
|
||||
private RequestTracker $requestTracker;
|
||||
private MockObject $notFoundType;
|
||||
private MockObject $visitsTracker;
|
||||
private MockObject & VisitsTrackerInterface $visitsTracker;
|
||||
private MockObject & NotFoundType $notFoundType;
|
||||
private ServerRequestInterface $request;
|
||||
|
||||
protected function setUp(): void
|
||||
|
||||
@@ -38,7 +38,7 @@ class VisitsStatsHelperTest extends TestCase
|
||||
use ApiKeyHelpersTrait;
|
||||
|
||||
private VisitsStatsHelper $helper;
|
||||
private MockObject $em;
|
||||
private MockObject & EntityManagerInterface $em;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
@@ -17,8 +17,8 @@ use Shlinkio\Shlink\Core\Visit\VisitsTracker;
|
||||
|
||||
class VisitsTrackerTest extends TestCase
|
||||
{
|
||||
private MockObject $em;
|
||||
private MockObject $eventDispatcher;
|
||||
private MockObject & EntityManager $em;
|
||||
private MockObject & EventDispatcherInterface $eventDispatcher;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user