|
|
@@ -109,4 +109,12 @@ final class EntryTest extends \PHPUnit\Framework\TestCase {
|
|
|
self::assertSame('A & B', $item['title']);
|
|
|
self::assertSame('B & C', $item['author']);
|
|
|
}
|
|
|
+
|
|
|
+ /** Above PHP_INT_MAX, an integer literal is a float on 32-bit platforms, so an entry ID is only ever a string */
|
|
|
+ public function test_idRejectsAFloat(): void {
|
|
|
+ $entry = new FreshRSS_Entry(1, 'guid-1', 'Title', '', '', 'https://example.net/1', 1700000000);
|
|
|
+ $this->expectException(\TypeError::class);
|
|
|
+ // @phpstan-ignore argument.type
|
|
|
+ $entry->_id(1700000000000001.0);
|
|
|
+ }
|
|
|
}
|