mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 15:40:33 -06:00
Recover DB test only for platforms in which it passes
This commit is contained in:
parent
99c1a59dd4
commit
621f18bf40
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace ShlinkioDbTest\Shlink\Core\ShortUrl\Repository;
|
namespace ShlinkioDbTest\Shlink\Core\ShortUrl\Repository;
|
||||||
|
|
||||||
use Cake\Chronos\Chronos;
|
use Cake\Chronos\Chronos;
|
||||||
|
use Doctrine\DBAL\Platforms\SQLServerPlatform;
|
||||||
use Shlinkio\Shlink\Core\Domain\Entity\Domain;
|
use Shlinkio\Shlink\Core\Domain\Entity\Domain;
|
||||||
use Shlinkio\Shlink\Core\ShortUrl\Entity\ShortUrl;
|
use Shlinkio\Shlink\Core\ShortUrl\Entity\ShortUrl;
|
||||||
use Shlinkio\Shlink\Core\ShortUrl\Model\ShortUrlCreation;
|
use Shlinkio\Shlink\Core\ShortUrl\Model\ShortUrlCreation;
|
||||||
@ -60,10 +61,13 @@ class ShortUrlRepositoryTest extends DatabaseTestCase
|
|||||||
ShortUrlIdentifier::fromShortCodeAndDomain('fOo'),
|
ShortUrlIdentifier::fromShortCodeAndDomain('fOo'),
|
||||||
ShortUrlMode::LOOSELY,
|
ShortUrlMode::LOOSELY,
|
||||||
));
|
));
|
||||||
// self::assertNull($this->repo->findOneWithDomainFallback( // TODO MS is doing loosely checks always
|
// TODO MS is doing loosely checks always, making this fail.
|
||||||
// ShortUrlIdentifier::fromShortCodeAndDomain('foo'),
|
if (! $this->getEntityManager()->getConnection()->getDatabasePlatform() instanceof SQLServerPlatform) {
|
||||||
// ShortUrlMode::STRICT,
|
self::assertNull($this->repo->findOneWithDomainFallback(
|
||||||
// ));
|
ShortUrlIdentifier::fromShortCodeAndDomain('foo'),
|
||||||
|
ShortUrlMode::STRICT,
|
||||||
|
));
|
||||||
|
}
|
||||||
self::assertSame($regularOne, $this->repo->findOneWithDomainFallback(
|
self::assertSame($regularOne, $this->repo->findOneWithDomainFallback(
|
||||||
ShortUrlIdentifier::fromShortCodeAndDomain($withDomainDuplicatingRegular->getShortCode()),
|
ShortUrlIdentifier::fromShortCodeAndDomain($withDomainDuplicatingRegular->getShortCode()),
|
||||||
ShortUrlMode::STRICT,
|
ShortUrlMode::STRICT,
|
||||||
|
Loading…
Reference in New Issue
Block a user