diff options
| author | 2023-11-16 22:43:00 +0100 | |
|---|---|---|
| committer | 2023-11-16 22:43:00 +0100 | |
| commit | 30c7a61a9b410f023c56ef19b9389a61647d8768 (patch) | |
| tree | bb58408980ce5b86f1d2b4a9be29d55b2d46dbb1 /tests | |
| parent | ee99e7e2cc228500efc1b539954c0ca6cd4c146d (diff) | |
Use strict_types (#5830)
* Little's optimisations and booleans in conditions
* Apply strict type
* Apply strict type
* Apply strict type
* Fix multiple bugs with PHP 8.2 and 8.3
* Many declares missing, more errors fixed
* Apply strict type
* Another approach
* Stronger typing for Minz_Session
* Fix case of SQLite
---------
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/app/Models/CategoryTest.php | 1 | ||||
| -rw-r--r-- | tests/app/Models/SearchTest.php | 2 | ||||
| -rw-r--r-- | tests/app/Models/UserQueryTest.php | 1 | ||||
| -rw-r--r-- | tests/app/Utils/passwordUtilTest.php | 1 | ||||
| -rw-r--r-- | tests/bootstrap.php | 2 | ||||
| -rw-r--r-- | tests/cli/i18n/I18nCompletionValidatorTest.php | 2 | ||||
| -rw-r--r-- | tests/cli/i18n/I18nDataTest.php | 2 | ||||
| -rw-r--r-- | tests/cli/i18n/I18nFileTest.php | 2 | ||||
| -rw-r--r-- | tests/cli/i18n/I18nUsageValidatorTest.php | 2 | ||||
| -rw-r--r-- | tests/cli/i18n/I18nValueTest.php | 2 | ||||
| -rw-r--r-- | tests/fixtures/migrations/2019_12_22_FooBar.php | 1 | ||||
| -rw-r--r-- | tests/fixtures/migrations/2019_12_23_Baz.php | 1 | ||||
| -rw-r--r-- | tests/fixtures/migrations_with_failing/2020_01_11_FooBar.php | 1 | ||||
| -rw-r--r-- | tests/fixtures/migrations_with_failing/2020_01_12_Baz.php | 1 | ||||
| -rw-r--r-- | tests/lib/CssXPath/CssXPathTest.php | 1 | ||||
| -rw-r--r-- | tests/lib/Minz/MigratorTest.php | 2 | ||||
| -rw-r--r-- | tests/lib/PHPMailer/PHPMailerTest.php | 1 |
17 files changed, 17 insertions, 8 deletions
diff --git a/tests/app/Models/CategoryTest.php b/tests/app/Models/CategoryTest.php index afa74d53f..bdb2a971b 100644 --- a/tests/app/Models/CategoryTest.php +++ b/tests/app/Models/CategoryTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class CategoryTest extends PHPUnit\Framework\TestCase { diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index afec683d5..12159caeb 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once(LIB_PATH . '/lib_date.php'); class SearchTest extends PHPUnit\Framework\TestCase { diff --git a/tests/app/Models/UserQueryTest.php b/tests/app/Models/UserQueryTest.php index 668327139..9f067e848 100644 --- a/tests/app/Models/UserQueryTest.php +++ b/tests/app/Models/UserQueryTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * Description of UserQueryTest diff --git a/tests/app/Utils/passwordUtilTest.php b/tests/app/Utils/passwordUtilTest.php index e2fe78b97..c6d7a37e9 100644 --- a/tests/app/Utils/passwordUtilTest.php +++ b/tests/app/Utils/passwordUtilTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class passwordUtilTest extends PHPUnit\Framework\TestCase { public function testCheck(): void { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c99fecaf0..447b038a4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); error_reporting(E_ALL); ini_set('display_errors', 1); diff --git a/tests/cli/i18n/I18nCompletionValidatorTest.php b/tests/cli/i18n/I18nCompletionValidatorTest.php index 3c6fc99eb..03896c11b 100644 --- a/tests/cli/i18n/I18nCompletionValidatorTest.php +++ b/tests/cli/i18n/I18nCompletionValidatorTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once __DIR__ . '/../../../cli/i18n/I18nCompletionValidator.php'; require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; diff --git a/tests/cli/i18n/I18nDataTest.php b/tests/cli/i18n/I18nDataTest.php index ca578a94b..b2fa5c5fd 100644 --- a/tests/cli/i18n/I18nDataTest.php +++ b/tests/cli/i18n/I18nDataTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once __DIR__ . '/../../../cli/i18n/I18nData.php'; require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; diff --git a/tests/cli/i18n/I18nFileTest.php b/tests/cli/i18n/I18nFileTest.php index 47464c2e2..755ea12f2 100644 --- a/tests/cli/i18n/I18nFileTest.php +++ b/tests/cli/i18n/I18nFileTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once __DIR__ . '/../../../cli/i18n/I18nFile.php'; class I18nFileTest extends PHPUnit\Framework\TestCase { diff --git a/tests/cli/i18n/I18nUsageValidatorTest.php b/tests/cli/i18n/I18nUsageValidatorTest.php index f2c7b5651..720cab32e 100644 --- a/tests/cli/i18n/I18nUsageValidatorTest.php +++ b/tests/cli/i18n/I18nUsageValidatorTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; require_once __DIR__ . '/../../../cli/i18n/I18nUsageValidator.php'; diff --git a/tests/cli/i18n/I18nValueTest.php b/tests/cli/i18n/I18nValueTest.php index 4454ea073..06d57eb08 100644 --- a/tests/cli/i18n/I18nValueTest.php +++ b/tests/cli/i18n/I18nValueTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); require_once __DIR__ . '/../../../cli/i18n/I18nValue.php'; class I18nValueTest extends PHPUnit\Framework\TestCase { diff --git a/tests/fixtures/migrations/2019_12_22_FooBar.php b/tests/fixtures/migrations/2019_12_22_FooBar.php index 21f673213..4a5bcb314 100644 --- a/tests/fixtures/migrations/2019_12_22_FooBar.php +++ b/tests/fixtures/migrations/2019_12_22_FooBar.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class FreshRSS_Migration_2019_12_22_FooBar { /** diff --git a/tests/fixtures/migrations/2019_12_23_Baz.php b/tests/fixtures/migrations/2019_12_23_Baz.php index 056b0836c..05513c385 100644 --- a/tests/fixtures/migrations/2019_12_23_Baz.php +++ b/tests/fixtures/migrations/2019_12_23_Baz.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class FreshRSS_Migration_2019_12_23_Baz { /** diff --git a/tests/fixtures/migrations_with_failing/2020_01_11_FooBar.php b/tests/fixtures/migrations_with_failing/2020_01_11_FooBar.php index 2edc79964..6816f582a 100644 --- a/tests/fixtures/migrations_with_failing/2020_01_11_FooBar.php +++ b/tests/fixtures/migrations_with_failing/2020_01_11_FooBar.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class FreshRSS_Migration_2020_01_11_FooBar { /** diff --git a/tests/fixtures/migrations_with_failing/2020_01_12_Baz.php b/tests/fixtures/migrations_with_failing/2020_01_12_Baz.php index 75f39f7b5..92a9fad63 100644 --- a/tests/fixtures/migrations_with_failing/2020_01_12_Baz.php +++ b/tests/fixtures/migrations_with_failing/2020_01_12_Baz.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class FreshRSS_Migration_2020_01_12_Baz { /** diff --git a/tests/lib/CssXPath/CssXPathTest.php b/tests/lib/CssXPath/CssXPathTest.php index 1cfbcf58f..ed92ece16 100644 --- a/tests/lib/CssXPath/CssXPathTest.php +++ b/tests/lib/CssXPath/CssXPathTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class CssXPathTest extends PHPUnit\Framework\TestCase { diff --git a/tests/lib/Minz/MigratorTest.php b/tests/lib/Minz/MigratorTest.php index 1803e6e86..5d090b2fa 100644 --- a/tests/lib/Minz/MigratorTest.php +++ b/tests/lib/Minz/MigratorTest.php @@ -1,5 +1,5 @@ <?php - +declare(strict_types=1); use PHPUnit\Framework\TestCase; class MigratorTest extends TestCase diff --git a/tests/lib/PHPMailer/PHPMailerTest.php b/tests/lib/PHPMailer/PHPMailerTest.php index 5873c58a9..021337a3b 100644 --- a/tests/lib/PHPMailer/PHPMailerTest.php +++ b/tests/lib/PHPMailer/PHPMailerTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); class PHPMailerTest extends PHPUnit\Framework\TestCase { |
