diff --git a/.gitignore b/.gitignore
index 7caaf50..b608d69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
/vendor
composer.lock
clover.xml
+.phpunit.result.cache
+phpunit.xml.bak
diff --git a/.travis.yml b/.travis.yml
index 90481ad..1259d83 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,19 +1,11 @@
language: php
php:
- - 5.5
- - 5.6
- - 7.0
- - hhvm
- - nightly
-
-matrix:
- allow_failures:
- - php: 5.5
- - php: nightly
+ - 7.4
+ - 8.0
install:
- composer install --dev
script:
- - vendor/bin/phpunit
\ No newline at end of file
+ - vendor/bin/phpunit
diff --git a/composer.json b/composer.json
index b5647f7..7f91501 100644
--- a/composer.json
+++ b/composer.json
@@ -11,12 +11,12 @@
],
"minimum-stability": "stable",
"require": {
- "php": ">=5.6,<8.0-DEV"
+ "php": ">=7.4",
+ "composer-plugin-api": "^1.0.0 || ^2.0.0"
},
"require-dev": {
- "composer/composer": "~1.1",
- "phpunit/phpunit": "~5.3",
- "etsy/phpunit-extensions": "0.7.*"
+ "composer/composer": "^2",
+ "phpunit/phpunit": "^9"
},
"scripts": {
"post-package-install": [
diff --git a/phpunit.xml b/phpunit.xml
index fc42835..7c46165 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,5 +1,5 @@
-
+
+
+ ./src
+
+
+ ./vendor
+ ./tests
+ ./template
+ ./bin
+
+
+
+
+
+
./tests
-
-
- ./src
-
- ./vendor
- ./tests
- ./template
- ./bin
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
diff --git a/tests/CustomAssertionsTrait.php b/tests/CustomAssertionsTrait.php
new file mode 100644
index 0000000..14fa095
--- /dev/null
+++ b/tests/CustomAssertionsTrait.php
@@ -0,0 +1,17 @@
+ ['Foo\\Bar\\' => 'foo/bar/src/']], []],
];
}
-}
\ No newline at end of file
+}
diff --git a/tests/Guesser/InterfaceClassGuesserTest.php b/tests/Guesser/InterfaceClassGuesserTest.php
index 552145b..f6920ea 100644
--- a/tests/Guesser/InterfaceClassGuesserTest.php
+++ b/tests/Guesser/InterfaceClassGuesserTest.php
@@ -5,8 +5,9 @@
use Composer\Package\Package;
use Jenko\Sunscreen\Guesser\InterfaceGuesser;
use Jenko\Sunscreen\Util;
+use PHPUnit\Framework\TestCase;
-class InterfaceGuesserTest extends \PHPUnit_Framework_TestCase
+class InterfaceGuesserTest extends TestCase
{
/**
* @dataProvider getAutoloadsAndExpectedClasses
@@ -33,4 +34,4 @@ public function getAutoloadsAndExpectedClasses()
[['psr-9999' => ['Foo\\Bar\\' => 'foo/bar/src/']], []],
];
}
-}
\ No newline at end of file
+}
diff --git a/tests/Processor/AdapterMethodsProcessorTest.php b/tests/Processor/AdapterMethodsProcessorTest.php
index 4884e70..a820550 100644
--- a/tests/Processor/AdapterMethodsProcessorTest.php
+++ b/tests/Processor/AdapterMethodsProcessorTest.php
@@ -3,10 +3,14 @@
namespace Jenko\Sunscreen\Tests\Processor;
use Jenko\Sunscreen\Processor\AdapterMethodsProcessor;
+use Jenko\Sunscreen\Tests\CustomAssertionsTrait;
use Jenko\Sunscreen\Tests\Fixtures\Foo;
+use PHPUnit\Framework\TestCase;
-class AdapterMethodsProcessorTest extends \PHPUnit_Framework_TestCase
+class AdapterMethodsProcessorTest extends TestCase
{
+ use CustomAssertionsTrait;
+
/**
* @dataProvider getMethodsAndExpectedStrings
* @param array $methods
@@ -16,7 +20,7 @@ public function testProcessGeneratesExpectedMethodsString($methods, $expectedMet
{
$processor = new AdapterMethodsProcessor($methods, 'myInterface');
- \PHPUnit_Extensions_Assert_More::assertStringMatchIgnoreWhitespace(
+ self::assertStringMatchIgnoreWhitespace(
$expectedMethodsString,
$processor->process(true)
);
diff --git a/tests/Processor/AdapterProcessorTest.php b/tests/Processor/AdapterProcessorTest.php
index 3fd6a2e..3463484 100644
--- a/tests/Processor/AdapterProcessorTest.php
+++ b/tests/Processor/AdapterProcessorTest.php
@@ -3,10 +3,14 @@
namespace Jenko\Sunscreen\Tests\Processor;
use Jenko\Sunscreen\Processor\AdapterProcessor;
+use Jenko\Sunscreen\Tests\CustomAssertionsTrait;
use Jenko\Sunscreen\Util;
+use PHPUnit\Framework\TestCase;
-class AdapterProcessorTest extends \PHPUnit_Framework_TestCase
+class AdapterProcessorTest extends TestCase
{
+ use CustomAssertionsTrait;
+
/**
* @dataProvider getInterfaceAndExpectedStrings
*
@@ -20,7 +24,7 @@ public function testProcessGeneratesExpectedAdapterString($interfaceFqn, $expect
$processor = new AdapterProcessor($interfaceFqn, $namespace, $fileLocation);
- \PHPUnit_Extensions_Assert_More::assertStringMatchIgnoreWhitespace($expectedAdapterString, $processor->process(true));
+ self::assertStringMatchIgnoreWhitespace($expectedAdapterString, $processor->process(true));
}
public function getInterfaceAndExpectedStrings()
diff --git a/tests/Processor/ClassProcessorTest.php b/tests/Processor/ClassProcessorTest.php
index ba58ffa..1e35d5b 100644
--- a/tests/Processor/ClassProcessorTest.php
+++ b/tests/Processor/ClassProcessorTest.php
@@ -3,10 +3,14 @@
namespace Jenko\Sunscreen\Tests\Processor;
use Jenko\Sunscreen\Processor\ClassProcessor;
+use Jenko\Sunscreen\Tests\CustomAssertionsTrait;
use Jenko\Sunscreen\Util;
+use PHPUnit\Framework\TestCase;
-class ClassProcessorTest extends \PHPUnit_Framework_TestCase
+class ClassProcessorTest extends TestCase
{
+ use CustomAssertionsTrait;
+
/**
* @dataProvider getClassAndExpectedStrings
*
@@ -20,7 +24,7 @@ public function testProcessGeneratesExpectedClassString($classFqn, $expectedClas
$processor = new ClassProcessor($classFqn, $namespace, $fileLocation);
- \PHPUnit_Extensions_Assert_More::assertStringMatchIgnoreWhitespace(
+ self::assertStringMatchIgnoreWhitespace(
$expectedClassString,
$processor->process(true)
);
diff --git a/tests/Processor/InterfaceMethodsProcessorTest.php b/tests/Processor/InterfaceMethodsProcessorTest.php
index f1fd3a4..18e9ea7 100644
--- a/tests/Processor/InterfaceMethodsProcessorTest.php
+++ b/tests/Processor/InterfaceMethodsProcessorTest.php
@@ -3,9 +3,13 @@
namespace Jenko\Sunscreen\Tests\Processor;
use Jenko\Sunscreen\Processor\InterfaceMethodsProcessor;
+use Jenko\Sunscreen\Tests\CustomAssertionsTrait;
+use PHPUnit\Framework\TestCase;
-class InterfaceMethodsProcessorTest extends \PHPUnit_Framework_TestCase
+class InterfaceMethodsProcessorTest extends TestCase
{
+ use CustomAssertionsTrait;
+
/**
* @dataProvider getMethodsAndExpectedStrings
* @param array $methods
@@ -15,7 +19,7 @@ public function testProcessGeneratesExpectedMethodsString($methods, $expectedMet
{
$processor = new InterfaceMethodsProcessor($methods);
- \PHPUnit_Extensions_Assert_More::assertStringMatchIgnoreWhitespace(
+ self::assertStringMatchIgnoreWhitespace(
$expectedMethodsString,
$processor->process(true)
);
diff --git a/tests/Processor/InterfaceProcessorTest.php b/tests/Processor/InterfaceProcessorTest.php
index 3ab6017..8f75081 100644
--- a/tests/Processor/InterfaceProcessorTest.php
+++ b/tests/Processor/InterfaceProcessorTest.php
@@ -3,10 +3,14 @@
namespace Jenko\Sunscreen\Tests\Processor;
use Jenko\Sunscreen\Processor\InterfaceProcessor;
+use Jenko\Sunscreen\Tests\CustomAssertionsTrait;
use Jenko\Sunscreen\Util;
+use PHPUnit\Framework\TestCase;
-class InterfaceProcessorTest extends \PHPUnit_Framework_TestCase
+class InterfaceProcessorTest extends TestCase
{
+ use CustomAssertionsTrait;
+
/**
* @dataProvider getInterfaceAndExpectedStrings
*
@@ -20,7 +24,7 @@ public function testProcessGeneratesExpectedInterfaceString($interfaceFqn, $expe
$processor = new InterfaceProcessor($interfaceFqn, $namespace, $fileLocation);
- \PHPUnit_Extensions_Assert_More::assertStringMatchIgnoreWhitespace(
+ self::assertStringMatchIgnoreWhitespace(
$expectedClassString,
$processor->process(true)
);
diff --git a/tests/UtilTest.php b/tests/UtilTest.php
index 60e7c8d..d888db2 100644
--- a/tests/UtilTest.php
+++ b/tests/UtilTest.php
@@ -4,8 +4,9 @@
use Composer\Package\Package;
use Jenko\Sunscreen\Util;
+use PHPUnit\Framework\TestCase;
-class UtilTest extends \PHPUnit_Framework_TestCase
+class UtilTest extends TestCase
{
/**
* @dataProvider getAutoloadsAndExpectedNamespaces
@@ -77,4 +78,4 @@ public function getInterfaceFqnAndExpectedClassName()
['Jenko\Sunscreen\Tests\Fixtures\BazInterface', 'JenkoBaz']
];
}
-}
\ No newline at end of file
+}