mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Fix API tests
This commit is contained in:
@@ -33,7 +33,6 @@ use function Shlinkio\Shlink\Core\enumValues;
|
||||
use function Shlinkio\Shlink\Core\generateRandomShortCode;
|
||||
use function Shlinkio\Shlink\Core\normalizeDate;
|
||||
use function Shlinkio\Shlink\Core\normalizeOptionalDate;
|
||||
use function str_contains;
|
||||
|
||||
class ShortUrl extends AbstractEntity
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ class ShortUrlInputFilter extends InputFilter
|
||||
|
||||
$deviceLongUrlsInput = $this->createInput(self::DEVICE_LONG_URLS, false);
|
||||
$deviceLongUrlsInput->getValidatorChain()->attach(
|
||||
new DeviceLongUrlsValidator($this->longUrlValidators(allowNull: ! $requireLongUrl))
|
||||
new DeviceLongUrlsValidator($this->longUrlValidators(allowNull: ! $requireLongUrl)),
|
||||
);
|
||||
$this->add($deviceLongUrlsInput);
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ class ShortUrlRepositoryTest extends DatabaseTestCase
|
||||
self::assertSame(
|
||||
$shortUrl,
|
||||
$this->repo->findOneMatching(ShortUrlCreation::fromRawData(
|
||||
['validSince' => $start, 'longUrl' => 'https://foo', 'tags' => ['foo', 'bar']]
|
||||
['validSince' => $start, 'longUrl' => 'https://foo', 'tags' => ['foo', 'bar']],
|
||||
)),
|
||||
);
|
||||
self::assertSame(
|
||||
|
||||
@@ -240,10 +240,9 @@ class TagRepositoryTest extends DatabaseTestCase
|
||||
|
||||
[$firstUrlTags, $secondUrlTags] = array_chunk($names, 3);
|
||||
|
||||
$shortUrl = ShortUrl::create(
|
||||
ShortUrlCreation::fromRawData(['apiKey' => $authorApiKey, 'longUrl' => 'https://longUrl', 'tags' => $firstUrlTags]),
|
||||
$this->relationResolver,
|
||||
);
|
||||
$shortUrl = ShortUrl::create(ShortUrlCreation::fromRawData(
|
||||
['apiKey' => $authorApiKey, 'longUrl' => 'https://longUrl', 'tags' => $firstUrlTags],
|
||||
), $this->relationResolver);
|
||||
$this->getEntityManager()->persist($shortUrl);
|
||||
|
||||
$shortUrl2 = ShortUrl::create(
|
||||
|
||||
Reference in New Issue
Block a user