mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Updated testing tools
This commit is contained in:
@@ -18,7 +18,7 @@ class DisableKeyCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->apiKeyService = $this->prophesize(ApiKeyService::class);
|
||||
$command = new DisableKeyCommand($this->apiKeyService->reveal());
|
||||
@@ -41,7 +41,7 @@ class DisableKeyCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('API key "abcd1234" properly disabled', $output);
|
||||
$this->assertStringContainsString('API key "abcd1234" properly disabled', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ class DisableKeyCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('API key "abcd1234" does not exist.', $output);
|
||||
$this->assertStringContainsString('API key "abcd1234" does not exist.', $output);
|
||||
$disable->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class GenerateKeyCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->apiKeyService = $this->prophesize(ApiKeyService::class);
|
||||
$command = new GenerateKeyCommand($this->apiKeyService->reveal());
|
||||
@@ -41,7 +41,7 @@ class GenerateKeyCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Generated API key: ', $output);
|
||||
$this->assertStringContainsString('Generated API key: ', $output);
|
||||
$create->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class ListKeysCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->apiKeyService = $this->prophesize(ApiKeyService::class);
|
||||
$command = new ListKeysCommand($this->apiKeyService->reveal());
|
||||
@@ -27,10 +27,8 @@ class ListKeysCommandTest extends TestCase
|
||||
$this->commandTester = new CommandTester($command);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function everythingIsListedIfEnabledOnlyIsNotProvided()
|
||||
/** @test */
|
||||
public function everythingIsListedIfEnabledOnlyIsNotProvided(): void
|
||||
{
|
||||
$this->apiKeyService->listKeys(false)->willReturn([
|
||||
new ApiKey(),
|
||||
@@ -43,17 +41,15 @@ class ListKeysCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Key', $output);
|
||||
$this->assertContains('Is enabled', $output);
|
||||
$this->assertContains(' +++ ', $output);
|
||||
$this->assertNotContains(' --- ', $output);
|
||||
$this->assertContains('Expiration date', $output);
|
||||
$this->assertStringContainsString('Key', $output);
|
||||
$this->assertStringContainsString('Is enabled', $output);
|
||||
$this->assertStringContainsString(' +++ ', $output);
|
||||
$this->assertStringNotContainsString(' --- ', $output);
|
||||
$this->assertStringContainsString('Expiration date', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function onlyEnabledKeysAreListedIfEnabledOnlyIsProvided()
|
||||
/** @test */
|
||||
public function onlyEnabledKeysAreListedIfEnabledOnlyIsProvided(): void
|
||||
{
|
||||
$this->apiKeyService->listKeys(true)->willReturn([
|
||||
(new ApiKey())->disable(),
|
||||
@@ -66,10 +62,10 @@ class ListKeysCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Key', $output);
|
||||
$this->assertNotContains('Is enabled', $output);
|
||||
$this->assertNotContains(' +++ ', $output);
|
||||
$this->assertNotContains(' --- ', $output);
|
||||
$this->assertContains('Expiration date', $output);
|
||||
$this->assertStringContainsString('Key', $output);
|
||||
$this->assertStringNotContainsString('Is enabled', $output);
|
||||
$this->assertStringNotContainsString(' +++ ', $output);
|
||||
$this->assertStringNotContainsString(' --- ', $output);
|
||||
$this->assertStringContainsString('Expiration date', $output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class GenerateCharsetCommandTest extends TestCase
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$command = new GenerateCharsetCommand();
|
||||
$app = new Application();
|
||||
@@ -38,7 +38,7 @@ class GenerateCharsetCommandTest extends TestCase
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
// Both default character set and the new one should have the same length
|
||||
$this->assertContains($prefix, $output);
|
||||
$this->assertStringContainsString($prefix, $output);
|
||||
}
|
||||
|
||||
protected function orderStringLetters($string)
|
||||
|
||||
@@ -21,7 +21,7 @@ class DeleteShortCodeCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $service;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->service = $this->prophesize(DeleteShortUrlServiceInterface::class);
|
||||
|
||||
@@ -44,7 +44,10 @@ class DeleteShortCodeCommandTest extends TestCase
|
||||
$this->commandTester->execute(['shortCode' => $shortCode]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains(sprintf('Short URL with short code "%s" successfully deleted.', $shortCode), $output);
|
||||
$this->assertStringContainsString(
|
||||
sprintf('Short URL with short code "%s" successfully deleted.', $shortCode),
|
||||
$output
|
||||
);
|
||||
$deleteByShortCode->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
@@ -61,7 +64,7 @@ class DeleteShortCodeCommandTest extends TestCase
|
||||
$this->commandTester->execute(['shortCode' => $shortCode]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains(sprintf('Provided short code "%s" could not be found.', $shortCode), $output);
|
||||
$this->assertStringContainsString(sprintf('Provided short code "%s" could not be found.', $shortCode), $output);
|
||||
$deleteByShortCode->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
@@ -85,11 +88,14 @@ class DeleteShortCodeCommandTest extends TestCase
|
||||
$this->commandTester->execute(['shortCode' => $shortCode]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains(sprintf(
|
||||
$this->assertStringContainsString(sprintf(
|
||||
'It was not possible to delete the short URL with short code "%s" because it has more than 10 visits.',
|
||||
$shortCode
|
||||
), $output);
|
||||
$this->assertContains(sprintf('Short URL with short code "%s" successfully deleted.', $shortCode), $output);
|
||||
$this->assertStringContainsString(
|
||||
sprintf('Short URL with short code "%s" successfully deleted.', $shortCode),
|
||||
$output
|
||||
);
|
||||
$deleteByShortCode->shouldHaveBeenCalledTimes(2);
|
||||
}
|
||||
|
||||
@@ -107,11 +113,11 @@ class DeleteShortCodeCommandTest extends TestCase
|
||||
$this->commandTester->execute(['shortCode' => $shortCode]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains(sprintf(
|
||||
$this->assertStringContainsString(sprintf(
|
||||
'It was not possible to delete the short URL with short code "%s" because it has more than 10 visits.',
|
||||
$shortCode
|
||||
), $output);
|
||||
$this->assertContains('Short URL was not deleted.', $output);
|
||||
$this->assertStringContainsString('Short URL was not deleted.', $output);
|
||||
$deleteByShortCode->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class GeneratePreviewCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->previewGenerator = $this->prophesize(PreviewGenerator::class);
|
||||
$this->shortUrlService = $this->prophesize(ShortUrlService::class);
|
||||
@@ -60,10 +60,10 @@ class GeneratePreviewCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Processing URL http://foo.com', $output);
|
||||
$this->assertContains('Processing URL https://bar.com', $output);
|
||||
$this->assertContains('Processing URL http://baz.com/something', $output);
|
||||
$this->assertContains('Finished processing all URLs', $output);
|
||||
$this->assertStringContainsString('Processing URL http://foo.com', $output);
|
||||
$this->assertStringContainsString('Processing URL https://bar.com', $output);
|
||||
$this->assertStringContainsString('Processing URL http://baz.com/something', $output);
|
||||
$this->assertStringContainsString('Finished processing all URLs', $output);
|
||||
$generatePreview1->shouldHaveBeenCalledOnce();
|
||||
$generatePreview2->shouldHaveBeenCalledOnce();
|
||||
$generatePreview3->shouldHaveBeenCalledOnce();
|
||||
|
||||
@@ -22,7 +22,7 @@ class GenerateShortUrlCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
||||
$command = new GenerateShortUrlCommand($this->urlShortener->reveal(), [
|
||||
@@ -50,7 +50,7 @@ class GenerateShortUrlCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('http://foo.com/abc123', $output);
|
||||
$this->assertStringContainsString('http://foo.com/abc123', $output);
|
||||
$urlToShortCode->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class GenerateShortUrlCommandTest extends TestCase
|
||||
'longUrl' => 'http://domain.com/invalid',
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains(
|
||||
$this->assertStringContainsString(
|
||||
'Provided URL "http://domain.com/invalid" is invalid.',
|
||||
$output
|
||||
);
|
||||
@@ -94,7 +94,7 @@ class GenerateShortUrlCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('http://foo.com/abc123', $output);
|
||||
$this->assertStringContainsString('http://foo.com/abc123', $output);
|
||||
$urlToShortCode->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class GetVisitsCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $visitsTracker;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->visitsTracker = $this->prophesize(VisitsTrackerInterface::class);
|
||||
$command = new GetVisitsCommand($this->visitsTracker->reveal());
|
||||
@@ -94,8 +94,8 @@ class GetVisitsCommandTest extends TestCase
|
||||
'shortCode' => $shortCode,
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('foo', $output);
|
||||
$this->assertContains('Spain', $output);
|
||||
$this->assertContains('bar', $output);
|
||||
$this->assertStringContainsString('foo', $output);
|
||||
$this->assertStringContainsString('Spain', $output);
|
||||
$this->assertStringContainsString('bar', $output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ListShortUrlsCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->shortUrlService = $this->prophesize(ShortUrlServiceInterface::class);
|
||||
$app = new Application();
|
||||
@@ -61,9 +61,9 @@ class ListShortUrlsCommandTest extends TestCase
|
||||
$this->commandTester->execute(['command' => 'shortcode:list']);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Continue with page 2?', $output);
|
||||
$this->assertContains('Continue with page 3?', $output);
|
||||
$this->assertContains('Continue with page 4?', $output);
|
||||
$this->assertStringContainsString('Continue with page 2?', $output);
|
||||
$this->assertStringContainsString('Continue with page 3?', $output);
|
||||
$this->assertStringContainsString('Continue with page 4?', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,13 +84,13 @@ class ListShortUrlsCommandTest extends TestCase
|
||||
$this->commandTester->execute(['command' => 'shortcode:list']);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('url_1', $output);
|
||||
$this->assertContains('url_9', $output);
|
||||
$this->assertNotContains('url_10', $output);
|
||||
$this->assertNotContains('url_20', $output);
|
||||
$this->assertNotContains('url_30', $output);
|
||||
$this->assertContains('Continue with page 2?', $output);
|
||||
$this->assertNotContains('Continue with page 3?', $output);
|
||||
$this->assertStringContainsString('url_1', $output);
|
||||
$this->assertStringContainsString('url_9', $output);
|
||||
$this->assertStringNotContainsString('url_10', $output);
|
||||
$this->assertStringNotContainsString('url_20', $output);
|
||||
$this->assertStringNotContainsString('url_30', $output);
|
||||
$this->assertStringContainsString('Continue with page 2?', $output);
|
||||
$this->assertStringNotContainsString('Continue with page 3?', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,6 +123,6 @@ class ListShortUrlsCommandTest extends TestCase
|
||||
'--showTags' => true,
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('Tags', $output);
|
||||
$this->assertStringContainsString('Tags', $output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ResolveUrlCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
||||
$command = new ResolveUrlCommand($this->urlShortener->reveal());
|
||||
@@ -64,7 +64,7 @@ class ResolveUrlCommandTest extends TestCase
|
||||
'shortCode' => $shortCode,
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('Provided short code "' . $shortCode . '" could not be found.', $output);
|
||||
$this->assertStringContainsString('Provided short code "' . $shortCode . '" could not be found.', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +81,6 @@ class ResolveUrlCommandTest extends TestCase
|
||||
'shortCode' => $shortCode,
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('Provided short code "' . $shortCode . '" has an invalid format.', $output);
|
||||
$this->assertStringContainsString('Provided short code "' . $shortCode . '" has an invalid format.', $output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class CreateTagCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
|
||||
@@ -38,7 +38,7 @@ class CreateTagCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('You have to provide at least one tag name', $output);
|
||||
$this->assertStringContainsString('You have to provide at least one tag name', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ class CreateTagCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Tags properly created', $output);
|
||||
$this->assertStringContainsString('Tags properly created', $output);
|
||||
$createTags->shouldHaveBeenCalled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class DeleteTagsCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
|
||||
@@ -39,7 +39,7 @@ class DeleteTagsCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
|
||||
$output = $this->commandTester->getDisplay();
|
||||
$this->assertContains('You have to provide at least one tag name', $output);
|
||||
$this->assertStringContainsString('You have to provide at least one tag name', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ class DeleteTagsCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Tags properly deleted', $output);
|
||||
$this->assertStringContainsString('Tags properly deleted', $output);
|
||||
$deleteTags->shouldHaveBeenCalled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ListTagsCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ListTagsCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('No tags yet', $output);
|
||||
$this->assertStringContainsString('No tags yet', $output);
|
||||
$listTags->shouldHaveBeenCalled();
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ class ListTagsCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('foo', $output);
|
||||
$this->assertContains('bar', $output);
|
||||
$this->assertStringContainsString('foo', $output);
|
||||
$this->assertStringContainsString('bar', $output);
|
||||
$listTags->shouldHaveBeenCalled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class RenameTagCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->tagService = $this->prophesize(TagServiceInterface::class);
|
||||
|
||||
@@ -49,7 +49,7 @@ class RenameTagCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('A tag with name "foo" was not found', $output);
|
||||
$this->assertStringContainsString('A tag with name "foo" was not found', $output);
|
||||
$renameTag->shouldHaveBeenCalled();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class RenameTagCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Tag properly renamed', $output);
|
||||
$this->assertStringContainsString('Tag properly renamed', $output);
|
||||
$renameTag->shouldHaveBeenCalled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class ProcessVisitsCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $lock;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->visitService = $this->prophesize(VisitService::class);
|
||||
$this->ipResolver = $this->prophesize(IpApiLocationResolver::class);
|
||||
@@ -84,7 +84,7 @@ class ProcessVisitsCommandTest extends TestCase
|
||||
]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('Processing IP 1.2.3.0', $output);
|
||||
$this->assertStringContainsString('Processing IP 1.2.3.0', $output);
|
||||
$locateVisits->shouldHaveBeenCalledOnce();
|
||||
$resolveIpLocation->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class ProcessVisitsCommandTest extends TestCase
|
||||
|
||||
$this->assertInstanceOf(IpCannotBeLocatedException::class, $e);
|
||||
|
||||
$this->assertContains($message, $output);
|
||||
$this->assertStringContainsString($message, $output);
|
||||
$locateVisits->shouldHaveBeenCalledOnce();
|
||||
$resolveIpLocation->shouldNotHaveBeenCalled();
|
||||
}
|
||||
@@ -161,7 +161,7 @@ class ProcessVisitsCommandTest extends TestCase
|
||||
|
||||
$this->assertInstanceOf(IpCannotBeLocatedException::class, $e);
|
||||
|
||||
$this->assertContains('An error occurred while locating IP. Skipped', $output);
|
||||
$this->assertStringContainsString('An error occurred while locating IP. Skipped', $output);
|
||||
$locateVisits->shouldHaveBeenCalledOnce();
|
||||
$resolveIpLocation->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class ProcessVisitsCommandTest extends TestCase
|
||||
], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains(
|
||||
$this->assertStringContainsString(
|
||||
sprintf('There is already an instance of the "%s" command', ProcessVisitsCommand::NAME),
|
||||
$output
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ class UpdateDbCommandTest extends TestCase
|
||||
/** @var ObjectProphecy */
|
||||
private $dbUpdater;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->dbUpdater = $this->prophesize(DbUpdaterInterface::class);
|
||||
|
||||
@@ -41,7 +41,7 @@ class UpdateDbCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('GeoLite2 database properly updated', $output);
|
||||
$this->assertStringContainsString('GeoLite2 database properly updated', $output);
|
||||
$download->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class UpdateDbCommandTest extends TestCase
|
||||
$this->commandTester->execute([]);
|
||||
$output = $this->commandTester->getDisplay();
|
||||
|
||||
$this->assertContains('An error occurred while updating GeoLite2 database', $output);
|
||||
$this->assertStringContainsString('An error occurred while updating GeoLite2 database', $output);
|
||||
$download->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class ConfigProviderTest extends TestCase
|
||||
/** @var ConfigProvider */
|
||||
private $configProvider;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->configProvider = new ConfigProvider();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class ApplicationFactoryTest extends TestCase
|
||||
/** @var ApplicationFactory */
|
||||
private $factory;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->factory = new ApplicationFactory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user