aboutsummaryrefslogtreecommitdiff
path: root/tests/cli/i18n/I18nUsageValidatorTest.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-04-17 08:30:21 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-17 08:30:21 +0200
commitf3760f138dcbaf7a2190336a0378cf1b2190c9f5 (patch)
tree6fac8fbf9efd7aa74a8e3970ab70ccf85287b2cd /tests/cli/i18n/I18nUsageValidatorTest.php
parent41fa4e746df8c2e2399ed753b4994ca85cb21358 (diff)
Complete PHPStan Level 6 (#5305)
* Complete PHPStan Level 6 Fix https://github.com/FreshRSS/FreshRSS/issues/4112 And initiate PHPStan Level 7 * PHPStan Level 6 for tests * Use phpstan/phpstan-phpunit * Update to PHPStan version 1.10 * Fix mixed bug * Fix mixed return bug * Fix paginator bug * Fix FreshRSS_UserConfiguration * A couple more Minz_Configuration bug fixes * A few trivial PHPStan Level 7 fixes * A few more simple PHPStan Level 7 * More files passing PHPStan Level 7 Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251 * A few more PHPStan Level 7 preparations * A few last details
Diffstat (limited to 'tests/cli/i18n/I18nUsageValidatorTest.php')
-rw-r--r--tests/cli/i18n/I18nUsageValidatorTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/cli/i18n/I18nUsageValidatorTest.php b/tests/cli/i18n/I18nUsageValidatorTest.php
index 531e77c5d..fdd75bf64 100644
--- a/tests/cli/i18n/I18nUsageValidatorTest.php
+++ b/tests/cli/i18n/I18nUsageValidatorTest.php
@@ -4,6 +4,7 @@ require_once __DIR__ . '/../../../cli/i18n/I18nValue.php';
require_once __DIR__ . '/../../../cli/i18n/I18nUsageValidator.php';
class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
+ /** @var I18nValue */
private $value;
public function setUp(): void {
@@ -12,7 +13,7 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
->getMock();
}
- public function testDisplayReport() {
+ public function testDisplayReport(): void {
$validator = new I18nUsageValidator([], []);
$this->assertEquals("There is no data.\n", $validator->displayReport());
@@ -40,13 +41,13 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
$validator->displayReport();
}
- public function testValidateWhenNoData() {
+ public function testValidateWhenNoData(): void {
$validator = new I18nUsageValidator([], []);
$this->assertTrue($validator->validate());
$this->assertEquals('', $validator->displayResult());
}
- public function testValidateWhenParentKeyExistsWithoutTransformation() {
+ public function testValidateWhenParentKeyExistsWithoutTransformation(): void {
$validator = new I18nUsageValidator([
'file1' => [
'file1.l1.l2._' => $this->value,
@@ -62,7 +63,7 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
$this->assertEquals('', $validator->displayResult());
}
- public function testValidateWhenParentKeyExistsWithTransformation() {
+ public function testValidateWhenParentKeyExistsWithTransformation(): void {
$validator = new I18nUsageValidator([
'file1' => [
'file1.l1.l2._' => $this->value,
@@ -78,7 +79,7 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
$this->assertEquals('', $validator->displayResult());
}
- public function testValidateWhenParentKeyDoesNotExist() {
+ public function testValidateWhenParentKeyDoesNotExist(): void {
$validator = new I18nUsageValidator([
'file1' => [
'file1.l1.l2._' => $this->value,
@@ -91,7 +92,7 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
$this->assertEquals("Unused key file1.l1.l2._ - \nUnused key file2.l1.l2._ - \n", $validator->displayResult());
}
- public function testValidateWhenChildKeyExists() {
+ public function testValidateWhenChildKeyExists(): void {
$validator = new I18nUsageValidator([
'file1' => [
'file1.l1.l2.k1' => $this->value,
@@ -107,7 +108,7 @@ class I18nUsageValidatorTest extends PHPUnit\Framework\TestCase {
$this->assertEquals('', $validator->displayResult());
}
- public function testValidateWhenChildKeyDoesNotExist() {
+ public function testValidateWhenChildKeyDoesNotExist(): void {
$validator = new I18nUsageValidator([
'file1' => [
'file1.l1.l2.k1' => $this->value,