Skip to content

Commit f5cc92c

Browse files
authored
Merge pull request #71 from Art4/phpunit-10
Update to PHPUnit 10
2 parents fddfbad + 23e3043 commit f5cc92c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+86
-108
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.idea
22
.php-cs-fixer.cache
3-
.phpunit.result.cache
3+
.phpunit.cache
44
composer.phar
55
composer.lock
66
php-cs-fixer.phar

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require-dev": {
1919
"friendsofphp/php-cs-fixer": "^3.2",
2020
"phpstan/phpstan": "^1.10",
21-
"phpunit/phpunit": "^9"
21+
"phpunit/phpunit": "^9 || ^10"
2222
},
2323
"autoload": {
2424
"psr-4": {
@@ -31,6 +31,7 @@
3131
}
3232
},
3333
"scripts": {
34+
"coverage": "phpunit --coverage-html=\".phpunit.cache/code-coverage\"",
3435
"phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon",
3536
"phpunit": "phpunit"
3637
},

phpunit.xml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" stopOnError="false" stopOnIncomplete="false" stopOnSkipped="false" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory=".phpunit.cache"
6+
colors="true"
7+
beStrictAboutOutputDuringTests="true"
8+
displayDetailsOnIncompleteTests="true"
9+
displayDetailsOnSkippedTests="true"
10+
displayDetailsOnTestsThatTriggerDeprecations="true"
11+
displayDetailsOnTestsThatTriggerErrors="true"
12+
displayDetailsOnTestsThatTriggerNotices="true"
13+
displayDetailsOnTestsThatTriggerWarnings="true"
14+
>
15+
<coverage/>
816
<testsuites>
917
<testsuite name="all">
1018
<directory suffix="Test.php">tests/Unit/</directory>
@@ -18,4 +26,9 @@
1826
<directory suffix="Test.php">tests/Functional/</directory>
1927
</testsuite>
2028
</testsuites>
29+
<source>
30+
<include>
31+
<directory suffix=".php">src/</directory>
32+
</include>
33+
</source>
2134
</phpunit>

tests/BC/AccessableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Art4\JsonApiClient\Tests\BC;
2121

2222
use Art4\JsonApiClient\Accessable;
23-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
23+
use PHPUnit\Framework\TestCase;
2424

2525
class AccessableTest extends TestCase
2626
{

tests/BC/ElementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Art4\JsonApiClient\Accessable;
2323
use Art4\JsonApiClient\Element;
2424
use Art4\JsonApiClient\Manager;
25-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
25+
use PHPUnit\Framework\TestCase;
2626

2727
class ElementTest extends TestCase
2828
{

tests/BC/Exception/ExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Art4\JsonApiClient\Tests\BC\Exception;
2121

2222
use Art4\JsonApiClient\Exception\Exception;
23-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
23+
use PHPUnit\Framework\TestCase;
2424

2525
class ExceptionTest extends TestCase
2626
{

tests/BC/FactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Art4\JsonApiClient\Tests\BC;
2121

2222
use Art4\JsonApiClient\Factory;
23-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
23+
use PHPUnit\Framework\TestCase;
2424

2525
class FactoryTest extends TestCase
2626
{

tests/BC/Input/InputTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Art4\JsonApiClient\Tests\BC\Input;
2121

2222
use Art4\JsonApiClient\Input\Input;
23-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
23+
use PHPUnit\Framework\TestCase;
2424

2525
class InputTest extends TestCase
2626
{

tests/BC/Input/RequestInputTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Art4\JsonApiClient\Tests\BC\Input;
2121

2222
use Art4\JsonApiClient\Input\RequestInput;
23-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
23+
use PHPUnit\Framework\TestCase;
2424

2525
class RequestInputTest extends TestCase
2626
{

tests/BC/ManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
use Art4\JsonApiClient\Input\Input;
2323
use Art4\JsonApiClient\Manager;
24-
use Art4\JsonApiClient\Tests\Fixtures\TestCase;
24+
use PHPUnit\Framework\TestCase;
2525

2626
class ManagerTest extends TestCase
2727
{

0 commit comments

Comments
 (0)