diff --git a/.gitignore b/.gitignore index ff0b781..8bacd1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .idea .php-cs-fixer.cache -.phpunit.result.cache +.phpunit.cache composer.phar composer.lock php-cs-fixer.phar diff --git a/composer.json b/composer.json index ae83a95..7ed44f3 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9" + "phpunit/phpunit": "^9 || ^10" }, "autoload": { "psr-4": { @@ -31,6 +31,7 @@ } }, "scripts": { + "coverage": "phpunit --coverage-html=\".phpunit.cache/code-coverage\"", "phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon", "phpunit": "phpunit" }, diff --git a/phpunit.xml b/phpunit.xml index 5874f45..03c0f13 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,10 +1,18 @@ - - - - src/ - - + + tests/Unit/ @@ -18,4 +26,9 @@ tests/Functional/ + + + src/ + + diff --git a/tests/BC/AccessableTest.php b/tests/BC/AccessableTest.php index 5099efc..c86f0fc 100644 --- a/tests/BC/AccessableTest.php +++ b/tests/BC/AccessableTest.php @@ -20,7 +20,7 @@ namespace Art4\JsonApiClient\Tests\BC; use Art4\JsonApiClient\Accessable; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class AccessableTest extends TestCase { diff --git a/tests/BC/ElementTest.php b/tests/BC/ElementTest.php index d7de778..b0a086e 100644 --- a/tests/BC/ElementTest.php +++ b/tests/BC/ElementTest.php @@ -22,7 +22,7 @@ use Art4\JsonApiClient\Accessable; use Art4\JsonApiClient\Element; use Art4\JsonApiClient\Manager; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ElementTest extends TestCase { diff --git a/tests/BC/Exception/ExceptionTest.php b/tests/BC/Exception/ExceptionTest.php index 8ac6d9a..19bc9d0 100644 --- a/tests/BC/Exception/ExceptionTest.php +++ b/tests/BC/Exception/ExceptionTest.php @@ -20,7 +20,7 @@ namespace Art4\JsonApiClient\Tests\BC\Exception; use Art4\JsonApiClient\Exception\Exception; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ExceptionTest extends TestCase { diff --git a/tests/BC/FactoryTest.php b/tests/BC/FactoryTest.php index c747df3..71d9e15 100644 --- a/tests/BC/FactoryTest.php +++ b/tests/BC/FactoryTest.php @@ -20,7 +20,7 @@ namespace Art4\JsonApiClient\Tests\BC; use Art4\JsonApiClient\Factory; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class FactoryTest extends TestCase { diff --git a/tests/BC/Input/InputTest.php b/tests/BC/Input/InputTest.php index 5ce48e0..677a665 100644 --- a/tests/BC/Input/InputTest.php +++ b/tests/BC/Input/InputTest.php @@ -20,7 +20,7 @@ namespace Art4\JsonApiClient\Tests\BC\Input; use Art4\JsonApiClient\Input\Input; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class InputTest extends TestCase { diff --git a/tests/BC/Input/RequestInputTest.php b/tests/BC/Input/RequestInputTest.php index 60269a8..4c8be41 100644 --- a/tests/BC/Input/RequestInputTest.php +++ b/tests/BC/Input/RequestInputTest.php @@ -20,7 +20,7 @@ namespace Art4\JsonApiClient\Tests\BC\Input; use Art4\JsonApiClient\Input\RequestInput; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class RequestInputTest extends TestCase { diff --git a/tests/BC/ManagerTest.php b/tests/BC/ManagerTest.php index 6681c03..e297289 100644 --- a/tests/BC/ManagerTest.php +++ b/tests/BC/ManagerTest.php @@ -21,7 +21,7 @@ use Art4\JsonApiClient\Input\Input; use Art4\JsonApiClient\Manager; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ManagerTest extends TestCase { diff --git a/tests/BC/Serializer/SerializerTest.php b/tests/BC/Serializer/SerializerTest.php index b07d20c..5cf7f37 100644 --- a/tests/BC/Serializer/SerializerTest.php +++ b/tests/BC/Serializer/SerializerTest.php @@ -21,7 +21,7 @@ use Art4\JsonApiClient\Accessable; use Art4\JsonApiClient\Serializer\Serializer; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class SerializerTest extends TestCase { diff --git a/tests/Fixtures/HelperTrait.php b/tests/Fixtures/HelperTrait.php index b404043..4ede04f 100644 --- a/tests/Fixtures/HelperTrait.php +++ b/tests/Fixtures/HelperTrait.php @@ -19,6 +19,7 @@ namespace Art4\JsonApiClient\Tests\Fixtures; +use Art4\JsonApiClient\Accessable; use Art4\JsonApiClient\Factory; use Art4\JsonApiClient\Manager; use Art4\JsonApiClient\Tests\Fixtures\Factory as FixtureFactory; @@ -28,12 +29,18 @@ */ trait HelperTrait { + protected Manager $manager; + + protected Factory $factory; + + protected Accessable $parent; + /** * Json Values Provider * * @see http://json.org/ */ - public function jsonValuesProvider() + public static function jsonValuesProvider(): array { return [ [new \stdClass()], @@ -53,9 +60,9 @@ public function jsonValuesProvider() * * @see http://json.org/ */ - public function jsonValuesProviderWithoutObject() + public static function jsonValuesProviderWithoutObject(): array { - $data = $this->jsonValuesProvider(); + $data = static::jsonValuesProvider(); unset($data[0]); @@ -67,9 +74,9 @@ public function jsonValuesProviderWithoutObject() * * @see http://json.org/ */ - public function jsonValuesProviderWithoutArray() + public static function jsonValuesProviderWithoutArray(): array { - $data = $this->jsonValuesProvider(); + $data = static::jsonValuesProvider(); unset($data[1]); @@ -81,9 +88,9 @@ public function jsonValuesProviderWithoutArray() * * @see http://json.org/ */ - public function jsonValuesProviderWithoutString() + public static function jsonValuesProviderWithoutString(): array { - $data = $this->jsonValuesProvider(); + $data = static::jsonValuesProvider(); unset($data[2]); @@ -95,9 +102,9 @@ public function jsonValuesProviderWithoutString() * * @see http://json.org/ */ - public function jsonValuesProviderWithoutObjectAndString() + public static function jsonValuesProviderWithoutObjectAndString(): array { - $data = $this->jsonValuesProvider(); + $data = static::jsonValuesProvider(); unset($data[0]); unset($data[2]); @@ -110,7 +117,7 @@ public function jsonValuesProviderWithoutObjectAndString() * * @see http://json.org/ */ - public function jsonValuesAsStringProvider() + public static function jsonValuesAsStringProvider(): array { return [ ['{}'], @@ -130,9 +137,9 @@ public function jsonValuesAsStringProvider() * * @see http://json.org/ */ - public function jsonValuesAsStringProviderWithoutObject() + public static function jsonValuesAsStringProviderWithoutObject(): array { - $data = $this->jsonValuesAsStringProvider(); + $data = static::jsonValuesAsStringProvider(); unset($data[0]); diff --git a/tests/Fixtures/TestCase.php b/tests/Fixtures/TestCase.php deleted file mode 100644 index e549ab1..0000000 --- a/tests/Fixtures/TestCase.php +++ /dev/null @@ -1,45 +0,0 @@ -. - */ - -namespace Art4\JsonApiClient\Tests\Fixtures; - -#[\AllowDynamicProperties] -class TestCase extends \PHPUnit\Framework\TestCase -{ - /** - * Shim for PHPUnit 6 - * - * @param mixed $exceptionName - * @param string $exceptionMessage - * @param int $exceptionCode - */ - public function setExpectedException($exceptionName, $exceptionMessage = '', $exceptionCode = null) - { - if (is_callable('parent::setExpectedException')) { - return parent::setExpectedException($exceptionName, $exceptionMessage, $exceptionCode); - } - - $this->expectException($exceptionName); - $this->expectExceptionMessage($exceptionMessage); - - if ($exceptionCode !== null) { - $this->expectExceptionCode($exceptionCode); - } - } -} diff --git a/tests/Functional/DotNotationTest.php b/tests/Functional/DotNotationTest.php index 91f936f..8e2287f 100644 --- a/tests/Functional/DotNotationTest.php +++ b/tests/Functional/DotNotationTest.php @@ -25,8 +25,9 @@ use Art4\JsonApiClient\Manager\ErrorAbortManager; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; use Art4\JsonApiClient\V1\Factory; +use PHPUnit\Framework\TestCase; -class DotNotationTest extends \Art4\JsonApiClient\Tests\Fixtures\TestCase +class DotNotationTest extends TestCase { use HelperTrait; diff --git a/tests/Functional/ErrorParsingTest.php b/tests/Functional/ErrorParsingTest.php index 1937037..176bb62 100644 --- a/tests/Functional/ErrorParsingTest.php +++ b/tests/Functional/ErrorParsingTest.php @@ -21,8 +21,9 @@ use Art4\JsonApiClient\Helper\Parser; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; +use PHPUnit\Framework\TestCase; -class ErrorParsingTest extends \Art4\JsonApiClient\Tests\Fixtures\TestCase +class ErrorParsingTest extends TestCase { use HelperTrait; diff --git a/tests/Functional/ParsingTest.php b/tests/Functional/ParsingTest.php index 85a2e4b..ad1107b 100644 --- a/tests/Functional/ParsingTest.php +++ b/tests/Functional/ParsingTest.php @@ -23,18 +23,18 @@ use Art4\JsonApiClient\Helper\Parser; use Art4\JsonApiClient\Input\ResponseStringInput; use Art4\JsonApiClient\Manager\ErrorAbortManager; -use Art4\JsonApiClient\Serializer\ArraySerializer; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; use Art4\JsonApiClient\V1\Factory; +use PHPUnit\Framework\TestCase; -class ParsingTest extends \Art4\JsonApiClient\Tests\Fixtures\TestCase +class ParsingTest extends TestCase { use HelperTrait; /** * Provide Parser */ - public function createParserProvider() + public static function createParserProvider(): array { $errorAbortManagerParser = function ($string) { $manager = new ErrorAbortManager(new Factory()); diff --git a/tests/Functional/SerializerTest.php b/tests/Functional/SerializerTest.php index 7010d98..732b7f1 100644 --- a/tests/Functional/SerializerTest.php +++ b/tests/Functional/SerializerTest.php @@ -24,8 +24,8 @@ use Art4\JsonApiClient\Manager\ErrorAbortManager; use Art4\JsonApiClient\Serializer\ArraySerializer; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Factory; +use PHPUnit\Framework\TestCase; class SerializerTest extends TestCase { @@ -34,7 +34,7 @@ class SerializerTest extends TestCase /** * Provide JSON API data */ - public function jsonapiDataProvider() + public static function jsonapiDataProvider(): array { $path = str_replace('/', \DIRECTORY_SEPARATOR, __DIR__ . '/../files/'); $files = []; diff --git a/tests/Unit/Helper/ParserTest.php b/tests/Unit/Helper/ParserTest.php index db0ee5d..33fed81 100644 --- a/tests/Unit/Helper/ParserTest.php +++ b/tests/Unit/Helper/ParserTest.php @@ -20,10 +20,9 @@ namespace Art4\JsonApiClient\Tests\Unit\Helper; use Art4\JsonApiClient\Exception\InputException; -use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Helper\Parser; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Document; +use PHPUnit\Framework\TestCase; class ParserTest extends TestCase { diff --git a/tests/Unit/Input/RequestStringInputTest.php b/tests/Unit/Input/RequestStringInputTest.php index 201cb6d..e0906fe 100644 --- a/tests/Unit/Input/RequestStringInputTest.php +++ b/tests/Unit/Input/RequestStringInputTest.php @@ -22,7 +22,7 @@ use Art4\JsonApiClient\Exception\InputException; use Art4\JsonApiClient\Input\RequestStringInput; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class RequestStringInputTest extends TestCase { diff --git a/tests/Unit/Input/ResponseStringInputTest.php b/tests/Unit/Input/ResponseStringInputTest.php index aec77f4..c49e92e 100644 --- a/tests/Unit/Input/ResponseStringInputTest.php +++ b/tests/Unit/Input/ResponseStringInputTest.php @@ -22,7 +22,7 @@ use Art4\JsonApiClient\Exception\InputException; use Art4\JsonApiClient\Input\ResponseStringInput; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ResponseStringInputTest extends TestCase { diff --git a/tests/Unit/Manager/ErrorAbortManagerTest.php b/tests/Unit/Manager/ErrorAbortManagerTest.php index f7f2bf4..864f1e9 100644 --- a/tests/Unit/Manager/ErrorAbortManagerTest.php +++ b/tests/Unit/Manager/ErrorAbortManagerTest.php @@ -21,7 +21,7 @@ use Art4\JsonApiClient\Factory; use Art4\JsonApiClient\Manager\ErrorAbortManager; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ErrorAbortManagerTest extends TestCase { diff --git a/tests/Unit/Serializer/ArraySerializerTest.php b/tests/Unit/Serializer/ArraySerializerTest.php index 993472a..4cd21c6 100644 --- a/tests/Unit/Serializer/ArraySerializerTest.php +++ b/tests/Unit/Serializer/ArraySerializerTest.php @@ -21,7 +21,7 @@ use Art4\JsonApiClient\Accessable; use Art4\JsonApiClient\Serializer\ArraySerializer; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; +use PHPUnit\Framework\TestCase; class ArraySerializerTest extends TestCase { diff --git a/tests/Unit/V1/AttributesTest.php b/tests/Unit/V1/AttributesTest.php index 26aac28..ad04f57 100644 --- a/tests/Unit/V1/AttributesTest.php +++ b/tests/Unit/V1/AttributesTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Attributes; +use PHPUnit\Framework\TestCase; class AttributesTest extends TestCase { diff --git a/tests/Unit/V1/DocumentLinkTest.php b/tests/Unit/V1/DocumentLinkTest.php index 591e490..548d3ae 100644 --- a/tests/Unit/V1/DocumentLinkTest.php +++ b/tests/Unit/V1/DocumentLinkTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\DocumentLink; +use PHPUnit\Framework\TestCase; class DocumentLinkTest extends TestCase { diff --git a/tests/Unit/V1/DocumentTest.php b/tests/Unit/V1/DocumentTest.php index d49b41d..f98ca05 100644 --- a/tests/Unit/V1/DocumentTest.php +++ b/tests/Unit/V1/DocumentTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Document; +use PHPUnit\Framework\TestCase; class DocumentTest extends TestCase { diff --git a/tests/Unit/V1/ErrorCollectionTest.php b/tests/Unit/V1/ErrorCollectionTest.php index ffdb030..e9550ee 100644 --- a/tests/Unit/V1/ErrorCollectionTest.php +++ b/tests/Unit/V1/ErrorCollectionTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ErrorCollection; +use PHPUnit\Framework\TestCase; class ErrorCollectionTest extends TestCase { diff --git a/tests/Unit/V1/ErrorLinkTest.php b/tests/Unit/V1/ErrorLinkTest.php index efb47b6..6251cba 100644 --- a/tests/Unit/V1/ErrorLinkTest.php +++ b/tests/Unit/V1/ErrorLinkTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ErrorLink; +use PHPUnit\Framework\TestCase; class ErrorLinkTest extends TestCase { diff --git a/tests/Unit/V1/ErrorSourceTest.php b/tests/Unit/V1/ErrorSourceTest.php index ac8fdef..bc6a851 100644 --- a/tests/Unit/V1/ErrorSourceTest.php +++ b/tests/Unit/V1/ErrorSourceTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ErrorSource; +use PHPUnit\Framework\TestCase; class ErrorSourceTest extends TestCase { diff --git a/tests/Unit/V1/ErrorTest.php b/tests/Unit/V1/ErrorTest.php index 0561f03..d17a5ee 100644 --- a/tests/Unit/V1/ErrorTest.php +++ b/tests/Unit/V1/ErrorTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Error; +use PHPUnit\Framework\TestCase; class ErrorTest extends TestCase { diff --git a/tests/Unit/V1/FactoryTest.php b/tests/Unit/V1/FactoryTest.php index f46c391..37a37a6 100644 --- a/tests/Unit/V1/FactoryTest.php +++ b/tests/Unit/V1/FactoryTest.php @@ -25,8 +25,9 @@ use Art4\JsonApiClient\Manager; use Art4\JsonApiClient\V1\Factory; use Art4\JsonApiClient\V1\ResourceNull; +use PHPUnit\Framework\TestCase; -class FactoryTest extends \Art4\JsonApiClient\Tests\Fixtures\TestCase +class FactoryTest extends TestCase { /** * @test diff --git a/tests/Unit/V1/JsonapiTest.php b/tests/Unit/V1/JsonapiTest.php index 059c2aa..43d505f 100644 --- a/tests/Unit/V1/JsonapiTest.php +++ b/tests/Unit/V1/JsonapiTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Jsonapi; +use PHPUnit\Framework\TestCase; class JsonapiTest extends TestCase { diff --git a/tests/Unit/V1/LinkTest.php b/tests/Unit/V1/LinkTest.php index 5389a9a..8cf0b29 100644 --- a/tests/Unit/V1/LinkTest.php +++ b/tests/Unit/V1/LinkTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Link; +use PHPUnit\Framework\TestCase; class LinkTest extends TestCase { diff --git a/tests/Unit/V1/MetaTest.php b/tests/Unit/V1/MetaTest.php index dbc4966..5126ba8 100644 --- a/tests/Unit/V1/MetaTest.php +++ b/tests/Unit/V1/MetaTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Meta; +use PHPUnit\Framework\TestCase; class MetaTest extends TestCase { diff --git a/tests/Unit/V1/RelationshipCollectionTest.php b/tests/Unit/V1/RelationshipCollectionTest.php index 84bc1c9..a0c8557 100644 --- a/tests/Unit/V1/RelationshipCollectionTest.php +++ b/tests/Unit/V1/RelationshipCollectionTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\RelationshipCollection; +use PHPUnit\Framework\TestCase; class RelationshipCollectionTest extends TestCase { diff --git a/tests/Unit/V1/RelationshipLinkTest.php b/tests/Unit/V1/RelationshipLinkTest.php index 18758c3..bef28da 100644 --- a/tests/Unit/V1/RelationshipLinkTest.php +++ b/tests/Unit/V1/RelationshipLinkTest.php @@ -23,14 +23,16 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceIdentifierCollection; use Art4\JsonApiClient\V1\RelationshipLink; +use PHPUnit\Framework\TestCase; class RelationshipLinkTest extends TestCase { use HelperTrait; + private Accessable $relationship; + /** * @setup */ diff --git a/tests/Unit/V1/RelationshipTest.php b/tests/Unit/V1/RelationshipTest.php index 4f07bf0..2621917 100644 --- a/tests/Unit/V1/RelationshipTest.php +++ b/tests/Unit/V1/RelationshipTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\Relationship; +use PHPUnit\Framework\TestCase; class RelationshipTest extends TestCase { diff --git a/tests/Unit/V1/ResourceCollectionTest.php b/tests/Unit/V1/ResourceCollectionTest.php index 4ad539d..2959c34 100644 --- a/tests/Unit/V1/ResourceCollectionTest.php +++ b/tests/Unit/V1/ResourceCollectionTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceCollection; +use PHPUnit\Framework\TestCase; class ResourceCollectionTest extends TestCase { diff --git a/tests/Unit/V1/ResourceIdentifierCollectionTest.php b/tests/Unit/V1/ResourceIdentifierCollectionTest.php index 42d7bc7..a438230 100644 --- a/tests/Unit/V1/ResourceIdentifierCollectionTest.php +++ b/tests/Unit/V1/ResourceIdentifierCollectionTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceIdentifierCollection; +use PHPUnit\Framework\TestCase; class ResourceIdentifierCollectionTest extends TestCase { diff --git a/tests/Unit/V1/ResourceIdentifierTest.php b/tests/Unit/V1/ResourceIdentifierTest.php index 272fdef..8d80e7d 100644 --- a/tests/Unit/V1/ResourceIdentifierTest.php +++ b/tests/Unit/V1/ResourceIdentifierTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceIdentifier; +use PHPUnit\Framework\TestCase; class ResourceIdentifierTest extends TestCase { diff --git a/tests/Unit/V1/ResourceItemLinkTest.php b/tests/Unit/V1/ResourceItemLinkTest.php index 4fca5ba..1930446 100644 --- a/tests/Unit/V1/ResourceItemLinkTest.php +++ b/tests/Unit/V1/ResourceItemLinkTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceItemLink; +use PHPUnit\Framework\TestCase; class ResourceItemLinkTest extends TestCase { diff --git a/tests/Unit/V1/ResourceItemTest.php b/tests/Unit/V1/ResourceItemTest.php index 48d9d1a..7c01985 100644 --- a/tests/Unit/V1/ResourceItemTest.php +++ b/tests/Unit/V1/ResourceItemTest.php @@ -23,8 +23,8 @@ use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Exception\ValidationException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceItem; +use PHPUnit\Framework\TestCase; class ResourceItemTest extends TestCase { diff --git a/tests/Unit/V1/ResourceNullTest.php b/tests/Unit/V1/ResourceNullTest.php index 7e7c83e..b3ca292 100644 --- a/tests/Unit/V1/ResourceNullTest.php +++ b/tests/Unit/V1/ResourceNullTest.php @@ -20,12 +20,10 @@ namespace Art4\JsonApiClient\Tests\Unit\V1; use Art4\JsonApiClient\Accessable; -use Art4\JsonApiClient\Manager; use Art4\JsonApiClient\Exception\AccessException; use Art4\JsonApiClient\Tests\Fixtures\HelperTrait; -use Art4\JsonApiClient\Tests\Fixtures\V1Factory; -use Art4\JsonApiClient\Tests\Fixtures\TestCase; use Art4\JsonApiClient\V1\ResourceNull; +use PHPUnit\Framework\TestCase; class ResourceNullTest extends TestCase {