mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
Update to Symfony 8.0
This commit is contained in:
@@ -114,6 +114,7 @@ class MatomoSendVisitsCommandTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $input
|
||||
* @return array{string, int, MatomoSendVisitsCommand}
|
||||
*/
|
||||
private function executeCommand(
|
||||
|
||||
@@ -64,6 +64,9 @@ class DeleteShortUrlCommandTest extends TestCase
|
||||
self::assertStringContainsString(sprintf('No URL found with short code "%s"', $shortCode), $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $retryAnswer
|
||||
*/
|
||||
#[Test, DataProvider('provideRetryDeleteAnswers')]
|
||||
public function deleteIsRetriedWhenThresholdIsReachedAndQuestionIsAccepted(
|
||||
array $retryAnswer,
|
||||
|
||||
@@ -27,6 +27,9 @@ class DeleteShortUrlVisitsCommandTest extends TestCase
|
||||
$this->commandTester = CliTestUtils::testerForCommand(new DeleteShortUrlVisitsCommand($this->deleter));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $input
|
||||
*/
|
||||
#[Test, DataProvider('provideCancellingInputs')]
|
||||
public function executionIsAbortedIfManuallyCancelled(array $input): void
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ class LocateVisitsCommandTest extends TestCase
|
||||
->willReturnCallback($mockMethodBehavior);
|
||||
$this->visitToLocation->expects(
|
||||
$this->exactly($expectedUnlocatedCalls + $expectedEmptyCalls + $expectedAllCalls),
|
||||
)->method('resolveVisitLocation')->withAnyParameters()->willReturn(Location::emptyInstance());
|
||||
)->method('resolveVisitLocation')->withAnyParameters()->willReturn(Location::empty());
|
||||
$this->downloadDbCommand->method('run')->willReturn(Command::SUCCESS);
|
||||
|
||||
$this->commandTester->setInputs(['y']);
|
||||
@@ -204,6 +204,9 @@ class LocateVisitsCommandTest extends TestCase
|
||||
self::assertStringContainsString('The --all flag has no effect on its own', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $inputs
|
||||
*/
|
||||
#[Test, DataProvider('provideAbortInputs')]
|
||||
public function processingAllCancelsCommandIfUserDoesNotActivelyAgreeToConfirmation(array $inputs): void
|
||||
{
|
||||
|
||||
@@ -40,9 +40,9 @@ class CliTestUtils
|
||||
public static function testerForCommand(Command $mainCommand, Command ...$extraCommands): CommandTester
|
||||
{
|
||||
$app = new Application();
|
||||
$app->add($mainCommand);
|
||||
$app->addCommand($mainCommand);
|
||||
foreach ($extraCommands as $command) {
|
||||
$app->add($command);
|
||||
$app->addCommand($command);
|
||||
}
|
||||
|
||||
return new CommandTester($mainCommand);
|
||||
|
||||
@@ -40,7 +40,7 @@ class LocateUnlocatedVisitsTest extends TestCase
|
||||
public function visitToLocationHelperIsCalledToGeolocateVisits(): void
|
||||
{
|
||||
$visit = Visit::forBasePath(Visitor::empty());
|
||||
$location = Location::emptyInstance();
|
||||
$location = Location::empty();
|
||||
|
||||
$this->visitToLocation->expects($this->once())->method('resolveVisitLocation')->with($visit)->willReturn(
|
||||
$location,
|
||||
|
||||
@@ -67,7 +67,7 @@ class VisitLocatorTest extends TestCase
|
||||
$this->visitService->{$serviceMethodName}(new class implements VisitGeolocationHelperInterface {
|
||||
public function geolocateVisit(Visit $visit): Location
|
||||
{
|
||||
return Location::emptyInstance();
|
||||
return Location::empty();
|
||||
}
|
||||
|
||||
public function onVisitLocated(VisitLocation $visitLocation, Visit $visit): void
|
||||
|
||||
Reference in New Issue
Block a user