diff --git a/.travis.yml b/.travis.yml index 29387fba..b66e4957 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ sudo: false branches: only: - master - - 1.x matrix: include: diff --git a/composer.json b/composer.json index 880844fc..ebe7ad56 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,15 @@ ], "require": { "php": "^7.1", - "symfony/options-resolver": "^3.2.1", - "symfony/property-access": "^3.2.1", - "symfony/intl": "^3.2.1", + "symfony/options-resolver": "^3.3.6", + "symfony/property-access": "^3.3.6", + "symfony/intl": "^3.3.6", "psr/container": "^1.0.0" }, "require-dev": { "moneyphp/money": "^3.0.0", - "phpunit/phpunit": "^5.7.5", - "symfony/phpunit-bridge": "^3.2.1", + "phpunit/phpunit": "^6.2.4.", + "symfony/phpunit-bridge": "^3.3.6", "symfony/var-dumper": "^3.2.1" }, "suggest": { @@ -38,7 +38,7 @@ "psr-4": { "Rollerworks\\Component\\Search\\": "src/" }, - "exclude-from-classmap": ["Tests/", "test/"] + "exclude-from-classmap": ["test/"] }, "autoload-dev": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d44ea966..2d54b9aa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,7 @@ ./vendor/ ./tests/ ./doc/ - ./bin/ diff --git a/src/Test/FieldTransformationAssertion.php b/src/Test/FieldTransformationAssertion.php index ab4b0d4b..106d38d6 100644 --- a/src/Test/FieldTransformationAssertion.php +++ b/src/Test/FieldTransformationAssertion.php @@ -13,8 +13,8 @@ namespace Rollerworks\Component\Search\Test; -use PHPUnit_Framework_Assert; -use PHPUnit_Framework_AssertionFailedError as AssertionFailedError; +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\AssertionFailedError; use Rollerworks\Component\Search\Exception\TransformationFailedException; use Rollerworks\Component\Search\Field\FieldConfig; @@ -66,8 +66,8 @@ public function successfullyTransformsTo($model): self throw new AssertionFailedError('Norm->model: '.$e->getMessage(), $e->getCode(), $e); } - PHPUnit_Framework_Assert::assertEquals($model, $viewValue, 'View->model value does not equal'); - PHPUnit_Framework_Assert::assertEquals($model, $normValue, 'Norm->model value does not equal'); + Assert::assertEquals($model, $viewValue, 'View->model value does not equal'); + Assert::assertEquals($model, $normValue, 'Norm->model value does not equal'); $this->transformed = true; $this->model = $model; @@ -120,8 +120,8 @@ public function andReverseTransformsTo($expectedView = null, $expectedNorm = nul throw new AssertionFailedError('Model->norm: '.$e->getMessage(), $e->getCode(), $e); } - PHPUnit_Framework_Assert::assertEquals($expectedView, $viewValue, 'View value does not equal'); - PHPUnit_Framework_Assert::assertEquals($expectedNorm ?? $expectedView, $normValue, 'Norm value does not equal'); + Assert::assertEquals($expectedView, $viewValue, 'View value does not equal'); + Assert::assertEquals($expectedNorm ?? $expectedView, $normValue, 'Norm value does not equal'); } private function viewToModel($value) diff --git a/tests/Extension/Core/ChoiceList/LazyChoiceListTest.php b/tests/Extension/Core/ChoiceList/LazyChoiceListTest.php index 67778630..c48a3729 100644 --- a/tests/Extension/Core/ChoiceList/LazyChoiceListTest.php +++ b/tests/Extension/Core/ChoiceList/LazyChoiceListTest.php @@ -13,6 +13,7 @@ namespace Rollerworks\Component\Search\Tests\Extension\Core\ChoiceList; +use PHPUnit\Framework\TestCase; use Rollerworks\Component\Search\Extension\Core\ChoiceList\ChoiceList; use Rollerworks\Component\Search\Extension\Core\ChoiceList\LazyChoiceList; use Rollerworks\Component\Search\Extension\Core\ChoiceList\Loader\ChoiceLoader; @@ -20,7 +21,7 @@ /** * @author Bernhard Schussek */ -class LazyChoiceListTest extends \PHPUnit_Framework_TestCase +class LazyChoiceListTest extends TestCase { /** * @var LazyChoiceList diff --git a/tests/assertDateTimeEqualsTrait.php b/tests/assertDateTimeEqualsTrait.php index 80299396..556ab064 100644 --- a/tests/assertDateTimeEqualsTrait.php +++ b/tests/assertDateTimeEqualsTrait.php @@ -13,11 +13,13 @@ namespace Rollerworks\Component\Search\Tests; +use PHPUnit\Framework\Assert; + trait assertDateTimeEqualsTrait { public static function assertDateTimeEquals(\DateTimeInterface $expected, \DateTimeInterface $actual) { - \PHPUnit_Framework_Assert::assertEquals( + Assert::assertEquals( $expected->format('U'), $actual->format('U'), $expected->format('c').' <=> '.$actual->format('c')