Merge pull request #1592 from ArthurHoaro/fix/strict-type-daily

Strict types: fix an issue in daily where the date could be an int
This commit is contained in:
ArthurHoaro 2020-10-16 12:16:54 +02:00 committed by GitHub
commit cd2878edee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -349,7 +349,7 @@ class BookmarkFileService implements BookmarkServiceInterface
$bookmarkDays = array_keys($bookmarkDays); $bookmarkDays = array_keys($bookmarkDays);
sort($bookmarkDays); sort($bookmarkDays);
return $bookmarkDays; return array_map('strval', $bookmarkDays);
} }
/** /**

View file

@ -690,12 +690,12 @@ class BookmarkFileServiceTest extends TestCase
*/ */
public function testDays() public function testDays()
{ {
$this->assertEquals( $this->assertSame(
['20100309', '20100310', '20121206', '20121207', '20130614', '20150310'], ['20100309', '20100310', '20121206', '20121207', '20130614', '20150310'],
$this->publicLinkDB->days() $this->publicLinkDB->days()
); );
$this->assertEquals( $this->assertSame(
['20100309', '20100310', '20121206', '20121207', '20130614', '20141125', '20150310'], ['20100309', '20100310', '20121206', '20121207', '20130614', '20141125', '20150310'],
$this->privateLinkDB->days() $this->privateLinkDB->days()
); );