Skip to content

Commit

Permalink
Remove custom TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 13, 2023
1 parent 2c18914 commit 177969c
Show file tree
Hide file tree
Showing 39 changed files with 48 additions and 86 deletions.
2 changes: 1 addition & 1 deletion tests/BC/AccessableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/ElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Exception/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Input/InputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Input/RequestInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Serializer/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
7 changes: 7 additions & 0 deletions tests/Fixtures/HelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,6 +29,12 @@
*/
trait HelperTrait
{
protected Manager $manager;

protected Factory $factory;

protected Accessable $parent;

/**
* Json Values Provider
*
Expand Down
45 changes: 0 additions & 45 deletions tests/Fixtures/TestCase.php

This file was deleted.

3 changes: 2 additions & 1 deletion tests/Functional/DotNotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/ErrorParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/ParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
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;

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/Helper/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Input/RequestStringInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Input/ResponseStringInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Manager/ErrorAbortManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Serializer/ArraySerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/DocumentLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ErrorCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ErrorLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ErrorSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/V1/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/JsonapiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/LinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/MetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/RelationshipCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/RelationshipLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/RelationshipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ResourceCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/V1/ResourceIdentifierCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 177969c

Please sign in to comment.