Removed use of deprecated methods in DB tests

This commit is contained in:
Alejandro Celaya
2021-01-31 11:50:45 +01:00
parent 1cd6fdeede
commit c58fa586e1
6 changed files with 89 additions and 109 deletions

View File

@@ -81,11 +81,10 @@ class ShortUrlServiceTest extends TestCase
*/
public function providedTagsAreGetFromRepoAndSetToTheShortUrl(?ApiKey $apiKey): void
{
$shortUrl = $this->prophesize(ShortUrl::class);
$shortUrl->setTags(Argument::any())->shouldBeCalledOnce();
$shortUrl = ShortUrl::createEmpty();
$shortCode = 'abc123';
$this->urlResolver->resolveShortUrl(new ShortUrlIdentifier($shortCode), $apiKey)
->willReturn($shortUrl->reveal())
->willReturn($shortUrl)
->shouldBeCalledOnce();
$tagRepo = $this->prophesize(EntityRepository::class);