getProviderClass(); /** @var ServiceProvider $providerClass */ $provider = new $providerClass($container); $this->assertInstanceOf($providerClass, $provider); $provider->register(); $bindings = $provider->bindings; foreach ($bindings as $abstract => $concrete) { $this->assertTrue($container->bound($abstract), "The $abstract is not bound in the container."); $this->assertNotNull($container->make($abstract), "The $abstract could not be resolved."); $this->assertInstanceOf( $concrete, $container->make($abstract), "The $abstract is not an instance of $concrete." ); } } }