Updated dependencies

This commit is contained in:
Alejandro Celaya
2020-11-02 11:50:19 +01:00
parent ae636aef5a
commit 1621f3a943
76 changed files with 248 additions and 37 deletions

View File

@@ -7,6 +7,7 @@ namespace ShlinkioTest\Shlink\Core\Action;
use Laminas\Diactoros\ServerRequest;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Server\RequestHandlerInterface;
use Shlinkio\Shlink\Common\Response\PixelResponse;
@@ -19,6 +20,8 @@ use Shlinkio\Shlink\Core\Service\VisitsTracker;
class PixelActionTest extends TestCase
{
use ProphecyTrait;
private PixelAction $action;
private ObjectProphecy $urlResolver;
private ObjectProphecy $visitTracker;

View File

@@ -9,6 +9,7 @@ use Laminas\Diactoros\ServerRequest;
use Mezzio\Router\RouterInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Server\RequestHandlerInterface;
use Shlinkio\Shlink\Common\Response\QrCodeResponse;
@@ -20,6 +21,8 @@ use Shlinkio\Shlink\Core\Service\ShortUrl\ShortUrlResolverInterface;
class QrCodeActionTest extends TestCase
{
use ProphecyTrait;
private QrCodeAction $action;
private ObjectProphecy $urlResolver;

View File

@@ -10,6 +10,7 @@ use Laminas\Diactoros\ServerRequest;
use Mezzio\Router\Middleware\ImplicitHeadMiddleware;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Server\RequestHandlerInterface;
use Shlinkio\Shlink\Core\Action\RedirectAction;
@@ -24,6 +25,8 @@ use function array_key_exists;
class RedirectActionTest extends TestCase
{
use ProphecyTrait;
private RedirectAction $action;
private ObjectProphecy $urlResolver;
private ObjectProphecy $visitTracker;

View File

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\Domain;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Domain\DomainService;
use Shlinkio\Shlink\Core\Domain\Repository\DomainRepositoryInterface;
@@ -13,6 +14,8 @@ use Shlinkio\Shlink\Core\Entity\Domain;
class DomainServiceTest extends TestCase
{
use ProphecyTrait;
private DomainService $domainService;
private ObjectProphecy $em;

View File

@@ -7,12 +7,15 @@ namespace ShlinkioTest\Shlink\Core\Domain\Resolver;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ObjectRepository;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Domain\Resolver\PersistenceDomainResolver;
use Shlinkio\Shlink\Core\Entity\Domain;
class PersistenceDomainResolverTest extends TestCase
{
use ProphecyTrait;
private PersistenceDomainResolver $domainResolver;
private ObjectProphecy $em;

View File

@@ -10,6 +10,7 @@ use Laminas\Diactoros\Uri;
use Mezzio\Router\Route;
use Mezzio\Router\RouteResult;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
@@ -19,6 +20,8 @@ use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions;
class NotFoundRedirectHandlerTest extends TestCase
{
use ProphecyTrait;
private NotFoundRedirectHandler $middleware;
private NotFoundRedirectOptions $redirectOptions;

View File

@@ -10,6 +10,7 @@ use Mezzio\Router\Route;
use Mezzio\Router\RouteResult;
use Mezzio\Template\TemplateRendererInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
@@ -17,6 +18,8 @@ use Shlinkio\Shlink\Core\ErrorHandler\NotFoundTemplateHandler;
class NotFoundTemplateHandlerTest extends TestCase
{
use ProphecyTrait;
private NotFoundTemplateHandler $handler;
private ObjectProphecy $renderer;

View File

@@ -2,9 +2,10 @@
declare(strict_types=1);
namespace ShlinkioTest\Shlink\Rest\EventDispatcher;
namespace ShlinkioTest\Shlink\Core\EventDispatcher;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Container\ContainerInterface;
use Shlinkio\Shlink\Common\Doctrine\ReopeningEntityManagerInterface;
@@ -12,6 +13,8 @@ use Shlinkio\Shlink\Core\EventDispatcher\CloseDbConnectionEventListenerDelegator
class CloseDbConnectionEventListenerDelegatorTest extends TestCase
{
use ProphecyTrait;
private CloseDbConnectionEventListenerDelegator $delegator;
private ObjectProphecy $container;

View File

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\EventDispatcher;
use Doctrine\DBAL\Connection;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use RuntimeException;
use Shlinkio\Shlink\Common\Doctrine\ReopeningEntityManagerInterface;
@@ -15,6 +16,8 @@ use Throwable;
class CloseDbConnectionEventListenerTest extends TestCase
{
use ProphecyTrait;
private ObjectProphecy $em;
public function setUp(): void

View File

@@ -7,6 +7,7 @@ namespace ShlinkioTest\Shlink\Core\EventDispatcher;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
@@ -26,6 +27,8 @@ use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
class LocateShortUrlVisitTest extends TestCase
{
use ProphecyTrait;
private LocateShortUrlVisit $locateVisit;
private ObjectProphecy $ipLocationResolver;
private ObjectProphecy $em;

View File

@@ -7,6 +7,7 @@ namespace ShlinkioTest\Shlink\Core\EventDispatcher;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Log\LoggerInterface;
use RuntimeException;
@@ -21,6 +22,8 @@ use Symfony\Component\Mercure\Update;
class NotifyVisitToMercureTest extends TestCase
{
use ProphecyTrait;
private NotifyVisitToMercure $listener;
private ObjectProphecy $publisher;
private ObjectProphecy $updatesGenerator;

View File

@@ -14,6 +14,7 @@ use GuzzleHttp\RequestOptions;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\Log\LoggerInterface;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
@@ -28,6 +29,8 @@ use function Functional\contains;
class NotifyVisitToWebHooksTest extends TestCase
{
use ProphecyTrait;
private ObjectProphecy $httpClient;
private ObjectProphecy $em;
private ObjectProphecy $logger;

View File

@@ -8,6 +8,7 @@ use Fig\Http\Message\StatusCodeInterface;
use Laminas\InputFilter\InputFilterInterface;
use LogicException;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use RuntimeException;
use Shlinkio\Shlink\Core\Exception\ValidationException;
use Throwable;
@@ -17,6 +18,8 @@ use function print_r;
class ValidationExceptionTest extends TestCase
{
use ProphecyTrait;
/**
* @test
* @dataProvider provideExceptions

View File

@@ -8,6 +8,7 @@ use Cake\Chronos\Chronos;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Domain\Resolver\SimpleDomainResolver;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
@@ -25,6 +26,8 @@ use function str_contains;
class ImportedLinksProcessorTest extends TestCase
{
use ProphecyTrait;
private ImportedLinksProcessor $processor;
private ObjectProphecy $em;
private ObjectProphecy $shortCodeHelper;

View File

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\Paginator\Adapter;
use Cake\Chronos\Chronos;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Model\ShortUrlsParams;
use Shlinkio\Shlink\Core\Paginator\Adapter\ShortUrlRepositoryAdapter;
@@ -13,6 +14,8 @@ use Shlinkio\Shlink\Core\Repository\ShortUrlRepositoryInterface;
class ShortUrlRepositoryAdapterTest extends TestCase
{
use ProphecyTrait;
private ObjectProphecy $repo;
public function setUp(): void

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Paginator\Adapter;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Model\VisitsParams;
@@ -13,6 +14,8 @@ use Shlinkio\Shlink\Core\Repository\VisitRepositoryInterface;
class VisitsForTagPaginatorAdapterTest extends TestCase
{
use ProphecyTrait;
private VisitsForTagPaginatorAdapter $adapter;
private ObjectProphecy $repo;

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Paginator\Adapter;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Model\ShortUrlIdentifier;
@@ -14,6 +15,8 @@ use Shlinkio\Shlink\Core\Repository\VisitRepositoryInterface;
class VisitsPaginatorAdapterTest extends TestCase
{
use ProphecyTrait;
private VisitsPaginatorAdapter $adapter;
private ObjectProphecy $repo;

View File

@@ -8,6 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Entity\Visit;
@@ -24,6 +25,8 @@ use function sprintf;
class DeleteShortUrlServiceTest extends TestCase
{
use ProphecyTrait;
private ObjectProphecy $em;
private ObjectProphecy $urlResolver;
private string $shortCode;

View File

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\Service\ShortUrl;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\Domain;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
@@ -14,6 +15,8 @@ use Shlinkio\Shlink\Core\Service\ShortUrl\ShortCodeHelper;
class ShortCodeHelperTest extends TestCase
{
use ProphecyTrait;
private ShortCodeHelper $helper;
private ObjectProphecy $em;
private ObjectProphecy $shortUrl;

View File

@@ -8,6 +8,7 @@ use Cake\Chronos\Chronos;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Entity\Visit;
@@ -23,6 +24,8 @@ use function range;
class ShortUrlResolverTest extends TestCase
{
use ProphecyTrait;
private ShortUrlResolver $urlResolver;
private ObjectProphecy $em;

View File

@@ -9,6 +9,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Entity\Tag;
@@ -24,6 +25,8 @@ use function count;
class ShortUrlServiceTest extends TestCase
{
use ProphecyTrait;
private ShortUrlService $service;
private ObjectProphecy $em;
private ObjectProphecy $urlResolver;

View File

@@ -7,6 +7,7 @@ namespace ShlinkioTest\Shlink\Core\Service\Tag;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\Tag;
use Shlinkio\Shlink\Core\Exception\TagConflictException;
@@ -17,6 +18,8 @@ use Shlinkio\Shlink\Core\Tag\TagService;
class TagServiceTest extends TestCase
{
use ProphecyTrait;
private TagService $service;
private ObjectProphecy $em;
private ObjectProphecy $repo;

View File

@@ -11,6 +11,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\ORMException;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Domain\Resolver\SimpleDomainResolver;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
@@ -24,6 +25,8 @@ use Shlinkio\Shlink\Core\Util\UrlValidatorInterface;
class UrlShortenerTest extends TestCase
{
use ProphecyTrait;
private UrlShortener $urlShortener;
private ObjectProphecy $em;
private ObjectProphecy $urlValidator;

View File

@@ -8,6 +8,7 @@ use Doctrine\ORM\EntityManager;
use Laminas\Stdlib\ArrayUtils;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psr\EventDispatcher\EventDispatcherInterface;
use Shlinkio\Shlink\Common\Util\DateRange;
@@ -30,6 +31,8 @@ use function range;
class VisitsTrackerTest extends TestCase
{
use ProphecyTrait;
private VisitsTracker $visitsTracker;
private ObjectProphecy $em;
private ObjectProphecy $eventDispatcher;

View File

@@ -6,12 +6,15 @@ namespace ShlinkioTest\Shlink\Core\Util;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use RuntimeException;
use Shlinkio\Shlink\Core\Util\DoctrineBatchHelper;
class DoctrineBatchHelperTest extends TestCase
{
use ProphecyTrait;
private DoctrineBatchHelper $helper;
private ObjectProphecy $em;

View File

@@ -11,6 +11,7 @@ use GuzzleHttp\RequestOptions;
use Laminas\Diactoros\Response;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
use Shlinkio\Shlink\Core\Options\UrlShortenerOptions;
@@ -18,6 +19,8 @@ use Shlinkio\Shlink\Core\Util\UrlValidator;
class UrlValidatorTest extends TestCase
{
use ProphecyTrait;
private UrlValidator $urlValidator;
private ObjectProphecy $httpClient;
private UrlShortenerOptions $options;

View File

@@ -9,6 +9,7 @@ use Exception;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\MethodProphecy;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\ShortUrl;
@@ -31,6 +32,8 @@ use function sprintf;
class VisitLocatorTest extends TestCase
{
use ProphecyTrait;
private VisitLocator $visitService;
private ObjectProphecy $em;
private ObjectProphecy $repo;

View File

@@ -6,6 +6,7 @@ namespace ShlinkioTest\Shlink\Core\Visit;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Repository\VisitRepository;
@@ -17,6 +18,8 @@ use function range;
class VisitsStatsHelperTest extends TestCase
{
use ProphecyTrait;
private VisitsStatsHelper $helper;
private ObjectProphecy $em;