diff --git a/Tests/ServiceProvider/FakeServiceProvider.php b/Tests/ServiceProvider/FakeServiceProvider.php index 18d9fb7..83f9e12 100644 --- a/Tests/ServiceProvider/FakeServiceProvider.php +++ b/Tests/ServiceProvider/FakeServiceProvider.php @@ -19,9 +19,9 @@ class FakeServiceProvider extends BaseServiceProvider { - public function register(ServiceContainer $container): void + public function register(): void { - $container->alias('user.model', UserModel::class) + $this->container->alias('user.model', UserModel::class) ->define('user.model', [':userName' => new Person('Joseph Smith')]); } } diff --git a/Tests/ServiceProviderTest.php b/Tests/ServiceProviderTest.php index 80d1fb4..ef6126e 100644 --- a/Tests/ServiceProviderTest.php +++ b/Tests/ServiceProviderTest.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\Assert; use PHPUnit\Framework\TestCase; use Qubus\Injector\Config\Factory; -use Qubus\Injector\Psr11\Container; +use Qubus\Injector\Injector; use Qubus\Injector\Tests\ServiceProvider\FakeServiceProvider; use Qubus\Injector\Tests\ServiceProvider\Person; @@ -23,10 +23,10 @@ class ServiceProviderTest extends TestCase { public function testFakeServiceProvider() { - $injector = new Container(Factory::create([])); + $injector = new Injector(Factory::create([])); - $service = new FakeServiceProvider(); - $service->register($injector); + $service = new FakeServiceProvider($injector); + $service->register(); $name = new Person('Joseph Smith');