Skip to content

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2017
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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"require-dev": {
"json-schema/JSON-Schema-Test-Suite": "1.2.0",
"friendsofphp/php-cs-fixer": "^2.1",
"phpunit/phpunit": "^4.8.22"
"phpunit/phpunit": "^4.8.35"
},
"autoload": {
"psr-4": { "JsonSchema\\": "src/JsonSchema/" }
Expand Down
3 changes: 2 additions & 1 deletion tests/ConstraintErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace JsonSchema\Tests;

use JsonSchema\ConstraintError;
use PHPUnit\Framework\TestCase;

class ConstraintErrorTest extends \PHPUnit_Framework_TestCase
class ConstraintErrorTest extends TestCase
{
public function testGetValidMessage()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Constraints/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use JsonSchema\Constraints\Constraint;
use JsonSchema\Constraints\Factory;
use JsonSchema\Entity\JsonPointer;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class MyBadConstraint
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/PointerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace JsonSchema\Tests\Constraints;

use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

class PointerTest extends \PHPUnit_Framework_TestCase
class PointerTest extends TestCase
{
protected $validateSchema = true;

Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/SchemaValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

use JsonSchema\Constraints\Constraint;
use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

class SchemaValidationTest extends \PHPUnit_Framework_TestCase
class SchemaValidationTest extends TestCase
{
protected $validateSchema = true;

Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use JsonSchema\Constraints\TypeCheck\LooseTypeCheck;
use JsonSchema\Constraints\TypeConstraint;
use PHPUnit\Framework\TestCase;

/**
* Class TypeTest
Expand All @@ -19,7 +20,7 @@
*
* @author hakre <https://github.com/hakre>
*/
class TypeTest extends \PHPUnit_Framework_TestCase
class TypeTest extends TestCase
{
/**
* @see testIndefiniteArticleForTypeInTypeCheckErrorMessage
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/ValidationExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
use JsonSchema\Constraints\Constraint;
use JsonSchema\Exception\ValidationException;
use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

class ValidationExceptionTest extends \PHPUnit_Framework_TestCase
class ValidationExceptionTest extends TestCase
{
public function testValidationException()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/VeryBaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@

namespace JsonSchema\Tests\Constraints;

use PHPUnit\Framework\TestCase;
use Prophecy\Argument;

/**
* @package JsonSchema\Tests\Constraints
*/
abstract class VeryBaseTestCase extends \PHPUnit_Framework_TestCase
abstract class VeryBaseTestCase extends TestCase
{
/** @var object */
private $jsonSchemaDraft03;
Expand Down
3 changes: 2 additions & 1 deletion tests/Entity/JsonPointerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
namespace JsonSchema\Tests\Entity;

use JsonSchema\Entity\JsonPointer;
use PHPUnit\Framework\TestCase;

/**
* @package JsonSchema\Tests\Entity
*
* @author Joost Nijhuis <[email protected]>
*/
class JsonPointerTest extends \PHPUnit_Framework_TestCase
class JsonPointerTest extends TestCase
{
/**
* @dataProvider getTestData
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/InvalidArgumentExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\InvalidArgumentException;
use PHPUnit\Framework\TestCase;

class InvalidArgumentExceptionTest extends \PHPUnit_Framework_TestCase
class InvalidArgumentExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/InvalidSchemaMediaTypeExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\InvalidSchemaMediaTypeException;
use PHPUnit\Framework\TestCase;

class InvalidSchemaMediaTypeExceptionTest extends \PHPUnit_Framework_TestCase
class InvalidSchemaMediaTypeExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/InvalidSourceUriExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\InvalidSourceUriException;
use PHPUnit\Framework\TestCase;

class InvalidSourceUriExceptionTest extends \PHPUnit_Framework_TestCase
class InvalidSourceUriExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/JsonDecodingExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\JsonDecodingException;
use PHPUnit\Framework\TestCase;

class JsonDecodingExceptionTest extends \PHPUnit_Framework_TestCase
class JsonDecodingExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/ResourceNotFoundExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\ResourceNotFoundException;
use PHPUnit\Framework\TestCase;

class ResourceNotFoundExceptionTest extends \PHPUnit_Framework_TestCase
class ResourceNotFoundExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/RuntimeExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\RuntimeException;
use PHPUnit\Framework\TestCase;

class RuntimeExceptionTest extends \PHPUnit_Framework_TestCase
class RuntimeExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/UnresolvableJsonPointerExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\UnresolvableJsonPointerException;
use PHPUnit\Framework\TestCase;

class UnresolvableJsonPointerExceptionTest extends \PHPUnit_Framework_TestCase
class UnresolvableJsonPointerExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Exception/UriResolverExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Exception;

use JsonSchema\Exception\UriResolverException;
use PHPUnit\Framework\TestCase;

class UriResolverExceptionTest extends \PHPUnit_Framework_TestCase
class UriResolverExceptionTest extends TestCase
{
public function testHierarchy()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Iterators/ObjectIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace JsonSchema\Tests\Iterators;

use JsonSchema\Iterator\ObjectIterator;
use PHPUnit\Framework\TestCase;

class ObjectIteratorTest extends \PHPUnit_Framework_TestCase
class ObjectIteratorTest extends TestCase
{
protected $testObject;

Expand Down
3 changes: 2 additions & 1 deletion tests/RefTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace JsonSchema\Tests;

use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

class RefTest extends \PHPUnit_Framework_TestCase
class RefTest extends TestCase
{
public function dataRefIgnoresSiblings()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Rfc3339Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests;

use JsonSchema\Rfc3339;
use PHPUnit\Framework\TestCase;

class Rfc3339Test extends \PHPUnit_Framework_TestCase
class Rfc3339Test extends TestCase
{
/**
* @param string $string
Expand Down
3 changes: 2 additions & 1 deletion tests/SchemaStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
use JsonSchema\SchemaStorage;
use JsonSchema\Uri\UriRetriever;
use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;

class SchemaStorageTest extends \PHPUnit_Framework_TestCase
class SchemaStorageTest extends TestCase
{
public function testResolveRef()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Uri/Retrievers/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Uri\Retrievers
{
use JsonSchema\Uri\Retrievers\Curl;
use PHPUnit\Framework\TestCase;

class CurlTest extends \PHPUnit_Framework_TestCase
class CurlTest extends TestCase
{
public function testRetrieveFile()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Uri/Retrievers/FileGetContentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
namespace JsonSchema\Tests\Uri\Retrievers
{
use JsonSchema\Uri\Retrievers\FileGetContents;
use PHPUnit\Framework\TestCase;

/**
* @group FileGetContents
*/
class FileGetContentsTest extends \PHPUnit_Framework_TestCase
class FileGetContentsTest extends TestCase
{
/**
* @expectedException \JsonSchema\Exception\ResourceNotFoundException
Expand Down
3 changes: 2 additions & 1 deletion tests/Uri/Retrievers/PredefinedArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
namespace JsonSchema\Tests\Uri\Retrievers;

use JsonSchema\Uri\Retrievers\PredefinedArray;
use PHPUnit\Framework\TestCase;

/**
* @group PredefinedArray
*/
class PredefinedArrayTest extends \PHPUnit_Framework_TestCase
class PredefinedArrayTest extends TestCase
{
private $retriever;

Expand Down
3 changes: 2 additions & 1 deletion tests/Uri/UriResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace JsonSchema\Tests\Uri;

use JsonSchema\Uri\UriResolver;
use PHPUnit\Framework\TestCase;

class UriResolverTest extends \PHPUnit_Framework_TestCase
class UriResolverTest extends TestCase
{
public function setUp()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Uri/UriRetrieverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
use JsonSchema\Exception\JsonDecodingException;
use JsonSchema\Uri\UriRetriever;
use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

/**
* @group UriRetriever
*/
class UriRetrieverTest extends \PHPUnit_Framework_TestCase
class UriRetrieverTest extends TestCase
{
protected $validator;

Expand Down
3 changes: 2 additions & 1 deletion tests/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use JsonSchema\Constraints\Constraint;
use JsonSchema\Validator;
use PHPUnit\Framework\TestCase;

class ValidatorTest extends \PHPUnit_Framework_TestCase
class ValidatorTest extends TestCase
{
public function testValidateWithAssocSchema()
{
Expand Down