Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.editorconfig
/.php-cs-fixer.cache
/.phpunit.result.cache
/.phpunit.cache
/composer.lock
/vendor
/vendor-bin/*/composer.lock
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bamarni/composer-bin-plugin": "^1.8",
"doctrine/common": "^3.5",
"roave/security-advisories": "dev-latest",
"symfony/phpunit-bridge": "^7.2"
"phpunit/phpunit": "^12.2.5"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi"
],
"test": [
"simple-phpunit",
"phpunit",
"vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v"
]
}
Expand Down
6 changes: 0 additions & 6 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
includes:
- vendor/21torr/janus/phpstan/lib.neon

# If you use simple-phpunit, you need to uncomment the following line.
# Always make sure to first run simple-phpunit and then PHPStan.
parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
42 changes: 42 additions & 0 deletions phpunit.dist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
failOnNotice="true"
failOnWarning="true"
cacheDirectory=".phpunit.cache"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Bundle Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<source
ignoreSuppressionOfDeprecations="true"
ignoreIndirectDeprecations="true"
restrictNotices="true"
restrictWarnings="true"
>
<include>
<directory>src</directory>
</include>

<deprecationTrigger>
<function>trigger_deprecation</function>
</deprecationTrigger>
</source>

<extensions>
</extensions>
</phpunit>
25 changes: 0 additions & 25 deletions phpunit.xml

This file was deleted.

7 changes: 5 additions & 2 deletions tests/Normalizer/ArrayNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Torr\SimpleNormalizer\Normalizer;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Torr\SimpleNormalizer\Test\SimpleNormalizerTestTrait;

Expand All @@ -24,8 +25,9 @@ public static function provideListArray () : iterable
}

/**
* @dataProvider provideListArray
*
*/
#[DataProvider("provideListArray")]
public function testListArray (array $input, array $expected) : void
{
$normalizer = $this->createNormalizer();
Expand All @@ -46,8 +48,9 @@ public static function provideAssociativeArray () : iterable
}

/**
* @dataProvider provideAssociativeArray
*
*/
#[DataProvider("provideAssociativeArray")]
public function testAssociativeArray (array $input, array $expected) : void
{
$normalizer = $this->createNormalizer();
Expand Down
7 changes: 5 additions & 2 deletions tests/Normalizer/BasicTypesNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Torr\SimpleNormalizer\Normalizer;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Torr\SimpleNormalizer\Exception\UnsupportedTypeException;
use Torr\SimpleNormalizer\Test\SimpleNormalizerTestTrait;
Expand All @@ -26,8 +27,9 @@ public static function provideBasicValue () : iterable
}

/**
* @dataProvider provideBasicValue
*
*/
#[DataProvider("provideBasicValue")]
public function testBasicValue (mixed $input, mixed $expected) : void
{
$normalizer = $this->createNormalizer();
Expand All @@ -43,8 +45,9 @@ public static function provideInvalidValue () : iterable
}

/**
* @dataProvider provideInvalidValue
*
*/
#[DataProvider("provideInvalidValue")]
public function testInvalidValue (mixed $input) : void
{
$this->expectException(UnsupportedTypeException::class);
Expand Down
4 changes: 3 additions & 1 deletion tests/Normalizer/SimpleNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Torr\SimpleNormalizer\Normalizer;

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Tests\Torr\SimpleNormalizer\Fixture\DummyVO;
use Torr\SimpleNormalizer\Exception\IncompleteNormalizationException;
Expand Down Expand Up @@ -31,8 +32,9 @@ public static function provideJsonVerifierEnabled () : iterable
}

/**
* @dataProvider provideJsonVerifierEnabled
*
*/
#[DataProvider('provideJsonVerifierEnabled')]
public function testJsonVerifierEnabled (callable $call) : void
{
$verifier = $this->createMock(ValidJsonVerifier::class);
Expand Down
Loading