Added stricter types for mocks

This commit is contained in:
Alejandro Celaya
2022-10-24 19:53:13 +02:00
parent aeafb244d9
commit 51f243995a
87 changed files with 156 additions and 152 deletions

View File

@@ -17,7 +17,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
class DomainVisitsActionTest extends TestCase
{
private DomainVisitsAction $action;
private MockObject $visitsHelper;
private MockObject & VisitsStatsHelperInterface $visitsHelper;
protected function setUp(): void
{

View File

@@ -16,7 +16,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
class GlobalVisitsActionTest extends TestCase
{
private GlobalVisitsAction $action;
private MockObject $helper;
private MockObject & VisitsStatsHelperInterface $helper;
protected function setUp(): void
{

View File

@@ -18,7 +18,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
class NonOrphanVisitsActionTest extends TestCase
{
private NonOrphanVisitsAction $action;
private MockObject $visitsHelper;
private MockObject & VisitsStatsHelperInterface $visitsHelper;
protected function setUp(): void
{

View File

@@ -22,8 +22,8 @@ use function count;
class OrphanVisitsActionTest extends TestCase
{
private OrphanVisitsAction $action;
private MockObject $visitsHelper;
private MockObject $orphanVisitTransformer;
private MockObject & VisitsStatsHelperInterface $visitsHelper;
private MockObject & DataTransformerInterface $orphanVisitTransformer;
protected function setUp(): void
{

View File

@@ -21,7 +21,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
class ShortUrlVisitsActionTest extends TestCase
{
private ShortUrlVisitsAction $action;
private MockObject $visitsHelper;
private MockObject & VisitsStatsHelperInterface $visitsHelper;
protected function setUp(): void
{

View File

@@ -17,7 +17,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
class TagVisitsActionTest extends TestCase
{
private TagVisitsAction $action;
private MockObject $visitsHelper;
private MockObject & VisitsStatsHelperInterface $visitsHelper;
protected function setUp(): void
{