From 06d00995049db9c7b915f67cfd4a5708aace458f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 30 Oct 2023 20:47:27 +0100 Subject: Require PHP 7.4+ (#5720) * Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types --- tests/app/Models/LogDAOTest.php | 7 ++----- tests/cli/i18n/I18nDataTest.php | 2 +- tests/cli/i18n/I18nUsageValidatorTest.php | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/app/Models/LogDAOTest.php b/tests/app/Models/LogDAOTest.php index dc9fbd316..4d9ec0e7d 100644 --- a/tests/app/Models/LogDAOTest.php +++ b/tests/app/Models/LogDAOTest.php @@ -6,11 +6,9 @@ use PHPUnit\Framework\TestCase; class LogDAOTest extends TestCase { private const LOG_FILE_TEST = 'logFileTest.txt'; - /** @var FreshRSS_LogDAO */ - private $logDAO; + private FreshRSS_LogDAO $logDAO; - /** @var string */ - private $logPath; + private string $logPath; protected function setUp(): void { $this->logDAO = new FreshRSS_LogDAO(); @@ -27,7 +25,6 @@ class LogDAOTest extends TestCase { $line = $this->logDAO::lines(self::LOG_FILE_TEST); - self::assertIsArray($line); self::assertCount(1, $line); self::assertInstanceOf(FreshRSS_Log::class, $line[0]); self::assertEquals('Wed, 08 Feb 2023 15:35:05 +0000', $line[0]->date()); diff --git a/tests/cli/i18n/I18nDataTest.php b/tests/cli/i18n/I18nDataTest.php index fda4a4734..ca578a94b 100644 --- a/tests/cli/i18n/I18nDataTest.php +++ b/tests/cli/i18n/I18nDataTest.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; class I18nDataTest extends PHPUnit\Framework\TestCase { /** @var array>> */ - private $referenceData; + private array $referenceData; /** @var I18nValue&PHPUnit\Framework\MockObject\MockObject */ private $value; diff --git a/tests/cli/i18n/I18nUsageValidatorTest.php b/tests/cli/i18n/I18nUsageValidatorTest.php index 163c0ce82..f2c7b5651 100644 --- a/tests/cli/i18n/I18nUsageValidatorTest.php +++ b/tests/cli/i18n/I18nUsageValidatorTest.php @@ -4,8 +4,8 @@ require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; require_once __DIR__ . '/../../../cli/i18n/I18nUsageValidator.php'; class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase { - /** @var I18nValue */ - private $value; + + private I18nValue $value; public function setUp(): void { $this->value = $this->getMockBuilder(I18nValue::class) -- cgit v1.2.3