Skip to content

Commit

Permalink
Merge pull request #143 from gsteel/normalize-phpunit-config
Browse files Browse the repository at this point in the history
Normalize PHPUnit Config
  • Loading branch information
gsteel authored Oct 23, 2024
2 parents 5ed7e5c + 5cf2727 commit aa36bbf
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 57 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
"laminas/laminas-translator": "^1.0"
},
"require-dev": {
"laminas/laminas-cache": "^3.12.1",
"laminas/laminas-cache": "^3.12.2",
"laminas/laminas-cache-storage-adapter-memory": "^2.3.0",
"laminas/laminas-cache-storage-deprecated-factory": "^1.2",
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-config": "^3.9.0",
"laminas/laminas-eventmanager": "^3.13",
"laminas/laminas-filter": "^2.34",
"laminas/laminas-validator": "^2.49",
"laminas/laminas-view": "^2.34",
"phpunit/phpunit": "^10.5.11",
"laminas/laminas-eventmanager": "^3.13.1",
"laminas/laminas-filter": "^2.37",
"laminas/laminas-validator": "^2.64.1",
"laminas/laminas-view": "^2.35",
"phpunit/phpunit": "^10.5.36",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.22.2"
"vimeo/psalm": "^5.26.1"
},
"conflict": {
"laminas/laminas-view": "<2.20.0",
Expand Down
88 changes: 44 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
failOnPhpunitDeprecation="true"
failOnDeprecation="true"
failOnNotice="true"
failOnWarning="true"
>
<testsuites>
<testsuite name="laminas-i18n Test Suite">
Expand Down
14 changes: 10 additions & 4 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/ConfigProvider.php">
<DeprecatedClass>
<code><![CDATA[Validator\PhoneNumber::class]]></code>
Expand All @@ -15,6 +15,9 @@
</UnusedClass>
</file>
<file src="src/Filter/AbstractLocale.php">
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
<InvalidPropertyAssignmentValue>
<code><![CDATA[$this->options]]></code>
<code><![CDATA[$this->options]]></code>
Expand All @@ -28,6 +31,9 @@
</MixedReturnStatement>
</file>
<file src="src/Filter/Alnum.php">
<DeprecatedClass>
<code><![CDATA[$this->setOptions($allowWhiteSpaceOrOptions)]]></code>
</DeprecatedClass>
<MixedArgumentTypeCoercion>
<code><![CDATA[$value]]></code>
</MixedArgumentTypeCoercion>
Expand All @@ -45,6 +51,9 @@
</ArgumentTypeCoercion>
</file>
<file src="src/Filter/NumberParse.php">
<DeprecatedClass>
<code><![CDATA[$this->setOptions($localeOrOptions)]]></code>
</DeprecatedClass>
<RedundantCastGivenDocblockType>
<code><![CDATA[(int) $style]]></code>
<code><![CDATA[(int) $type]]></code>
Expand Down Expand Up @@ -946,9 +955,6 @@
<code><![CDATA[dateTestsDataProvider]]></code>
<code><![CDATA[dateTestsDataProviderWithPattern]]></code>
</PossiblyUnusedMethod>
<TooManyArguments>
<code><![CDATA[new IntlGregorianCalendar(2013, 6, 1)]]></code>
</TooManyArguments>
</file>
<file src="test/View/Helper/NumberFormatTest.php">
<PossiblyNullArgument>
Expand Down
7 changes: 5 additions & 2 deletions test/View/Helper/DateFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,15 @@ public function testDifferentTimezone(): void

public function testIntlCalendarIsHandledAsWell(): void
{
$calendar = new IntlGregorianCalendar(2013, 6, 1);
$date = DateTime::createFromFormat('!Y-m-d', '2013-06-01');
self::assertNotFalse($date);
$calendar = IntlGregorianCalendar::fromDateTime($date);
self::assertNotNull($calendar);

$helper = new DateFormatHelper();
$helper->setTimezone('Europe/Berlin');
self::assertEquals(
'01-07-2013',
'01-06-2013',
$helper->__invoke($calendar, IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'it_IT', 'dd-MM-Y')
);
}
Expand Down

0 comments on commit aa36bbf

Please sign in to comment.