Standardized ordering field handling and added validation for short URLs list

This commit is contained in:
Alejandro Celaya
2022-01-09 11:23:27 +01:00
parent d0c9f5a776
commit 2abcaf02e2
12 changed files with 68 additions and 92 deletions

View File

@@ -82,11 +82,11 @@ class ShortUrlRepositoryAdapterTest extends TestCase
yield ['search'];
yield ['search', []];
yield ['search', ['foo', 'bar']];
yield ['search', ['foo', 'bar'], null, null, 'order'];
yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'order'];
yield ['search', ['foo', 'bar'], null, Chronos::now()->toAtomString(), 'order'];
yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString(), 'order'];
yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'order'];
yield ['search', ['foo', 'bar'], null, null, 'longUrl'];
yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'longUrl'];
yield ['search', ['foo', 'bar'], null, Chronos::now()->toAtomString(), 'longUrl'];
yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString(), 'longUrl'];
yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'longUrl'];
yield [null, ['foo', 'bar'], Chronos::now()->toAtomString()];
yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString()];
}