From 5ee5acef242c2c8b9f45c76ccf594b6e33568e26 Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Thu, 16 May 2024 11:29:34 +0200 Subject: [PATCH] remove phpunit polyfills (#217) --- composer.json | 1 - tests/AbstractContainerConfigTestCase.php | 4 ++-- tests/ContainerBuilderTest.php | 6 +++--- tests/ContainerTest.php | 7 +++---- tests/Injection/LazyIncludeTest.php | 2 +- tests/Injection/LazyRequireTest.php | 2 +- tests/ResolutionHelperTest.php | 6 +++--- tests/Resolver/AutoResolverTest.php | 4 ++-- tests/Resolver/ResolverTest.php | 7 +++---- 9 files changed, 18 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index f01cffde..886d491b 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,6 @@ }, "require-dev": { "producer/producer": "^2.3", - "yoast/phpunit-polyfills": "^2.0", "phpunit/phpunit": "^9.0 || ^10.0", "phpstan/phpstan": "^1.11.1" }, diff --git a/tests/AbstractContainerConfigTestCase.php b/tests/AbstractContainerConfigTestCase.php index b30d8b89..199da178 100644 --- a/tests/AbstractContainerConfigTestCase.php +++ b/tests/AbstractContainerConfigTestCase.php @@ -8,7 +8,7 @@ */ namespace Aura\Di; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; /** * @@ -36,7 +36,7 @@ abstract class AbstractContainerConfigTestCase extends TestCase * @return null * */ - protected function set_up() + protected function setUp(): void { $builder = new ContainerBuilder(); $this->di = $builder->newConfiguredInstance( diff --git a/tests/ContainerBuilderTest.php b/tests/ContainerBuilderTest.php index b1c25979..aa6e05b3 100644 --- a/tests/ContainerBuilderTest.php +++ b/tests/ContainerBuilderTest.php @@ -2,7 +2,7 @@ namespace Aura\Di; use Aura\Di\Fake\FakeParentClass; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; class ContainerBuilderTest extends TestCase { @@ -11,9 +11,9 @@ class ContainerBuilderTest extends TestCase */ protected $builder; - protected function set_up() + protected function setUp(): void { - parent::set_up(); + parent::setUp(); $this->builder = new ContainerBuilder(); } diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php index dfb6a556..7b4e930c 100644 --- a/tests/ContainerTest.php +++ b/tests/ContainerTest.php @@ -6,12 +6,11 @@ use Aura\Di\Fake\FakeMutationWithDependencyClass; use Aura\Di\Fake\FakeOtherClass; use Aura\Di\Fake\FakeParamsClass; -use Aura\Di\Injection\InjectionFactory; use Aura\Di\Resolver\Blueprint; use Aura\Di\Resolver\Reflector; use Aura\Di\Resolver\Resolver; use PHPUnit\Framework\MockObject\MockObject; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; class ContainerTest extends TestCase { @@ -24,9 +23,9 @@ class ContainerTest extends TestCase */ protected $container; - protected function set_up() + protected function setUp(): void { - parent::set_up(); + parent::setUp(); $this->resolver = new Resolver(new Reflector()); $this->container = new Container($this->resolver); } diff --git a/tests/Injection/LazyIncludeTest.php b/tests/Injection/LazyIncludeTest.php index 5330d39a..fac45a60 100644 --- a/tests/Injection/LazyIncludeTest.php +++ b/tests/Injection/LazyIncludeTest.php @@ -3,7 +3,7 @@ use Aura\Di\Resolver\Reflector; use Aura\Di\Resolver\Resolver; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; class LazyIncludeTest extends TestCase { diff --git a/tests/Injection/LazyRequireTest.php b/tests/Injection/LazyRequireTest.php index 342fb123..42e9ada6 100644 --- a/tests/Injection/LazyRequireTest.php +++ b/tests/Injection/LazyRequireTest.php @@ -3,7 +3,7 @@ use Aura\Di\Resolver\Reflector; use Aura\Di\Resolver\Resolver; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; class LazyRequireTest extends TestCase { diff --git a/tests/ResolutionHelperTest.php b/tests/ResolutionHelperTest.php index f1b8bedd..3238f29e 100644 --- a/tests/ResolutionHelperTest.php +++ b/tests/ResolutionHelperTest.php @@ -1,7 +1,7 @@ container = $this->getMockBuilder(Container::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/Resolver/AutoResolverTest.php b/tests/Resolver/AutoResolverTest.php index 95f73245..4dc73c79 100644 --- a/tests/Resolver/AutoResolverTest.php +++ b/tests/Resolver/AutoResolverTest.php @@ -13,9 +13,9 @@ class AutoResolverTest extends ResolverTest */ protected $resolver; - protected function set_up() + protected function setUp(): void { - parent::set_up(); + parent::setUp(); $this->resolver = new AutoResolver(new Reflector()); } diff --git a/tests/Resolver/ResolverTest.php b/tests/Resolver/ResolverTest.php index 9a63a025..a2f6ba29 100644 --- a/tests/Resolver/ResolverTest.php +++ b/tests/Resolver/ResolverTest.php @@ -4,10 +4,9 @@ use Aura\Di\Fake\FakeInterfaceClass1; use Aura\Di\Fake\FakeInterfaceClass2; use Aura\Di\Injection\Factory; -use Aura\Di\Injection\InjectionFactory; use Aura\Di\Injection\Lazy; use Aura\Di\Injection\LazyGet; -use Yoast\PHPUnitPolyfills\TestCases\TestCase; +use PHPUnit\Framework\TestCase; class ResolverTest extends TestCase { @@ -16,9 +15,9 @@ class ResolverTest extends TestCase */ protected $resolver; - protected function set_up() + protected function setUp(): void { - parent::set_up(); + parent::setUp(); $this->resolver = new Resolver(new Reflector()); }