diff --git a/module/Rest/test-api/Action/ListShortUrlsTest.php b/module/Rest/test-api/Action/ListShortUrlsTest.php index 8f7db414..8264c4ee 100644 --- a/module/Rest/test-api/Action/ListShortUrlsTest.php +++ b/module/Rest/test-api/Action/ListShortUrlsTest.php @@ -63,13 +63,31 @@ class ListShortUrlsTest extends ApiTestCase ], 'originalUrl' => 'https://shlink.io', ], + [ + 'shortCode' => 'ghi789', + 'shortUrl' => 'http://example.com/ghi789', + 'longUrl' => + 'https://blog.alejandrocelaya.com/2019/04/27' + . '/considerations-to-properly-use-open-source-software-projects/', + 'dateCreated' => '2019-01-01T00:00:00+00:00', + 'visitsCount' => 0, + 'tags' => [], + 'meta' => [ + 'validSince' => null, + 'validUntil' => null, + 'maxVisits' => null, + ], + 'originalUrl' => + 'https://blog.alejandrocelaya.com/2019/04/27' + . '/considerations-to-properly-use-open-source-software-projects/', + ], ], 'pagination' => [ 'currentPage' => 1, 'pagesCount' => 1, 'itemsPerPage' => 10, - 'itemsInCurrentPage' => 3, - 'totalItems' => 3, + 'itemsInCurrentPage' => 4, + 'totalItems' => 4, ], ], ], $respPayload); diff --git a/module/Rest/test-api/Fixtures/ShortUrlsFixture.php b/module/Rest/test-api/Fixtures/ShortUrlsFixture.php index 51bdaaad..0313c5cf 100644 --- a/module/Rest/test-api/Fixtures/ShortUrlsFixture.php +++ b/module/Rest/test-api/Fixtures/ShortUrlsFixture.php @@ -34,6 +34,12 @@ class ShortUrlsFixture extends AbstractFixture )); $manager->persist($customShortUrl); + $withDomainShortUrl = $this->setShortUrlDate(new ShortUrl( + 'https://blog.alejandrocelaya.com/2019/04/27/considerations-to-properly-use-open-source-software-projects/', + ShortUrlMeta::createFromRawData(['domain' => 'example.com']) + ))->setShortCode('ghi789'); + $manager->persist($withDomainShortUrl); + $manager->flush(); $this->addReference('abc123_short_url', $abcShortUrl);