/** * Get the service providers that have been loaded. * * @return array * @static */ public static function getLoadedProviders() { return \Illuminate\Foundation\Application::getLoadedProviders(); }
public function testServiceProvidersAreCorrectlyRegistered() { $provider = m::mock('Illuminate\\Support\\ServiceProvider'); $class = get_class($provider); $provider->shouldReceive('register')->once(); $app = new Application(); $app->register($provider); $this->assertTrue(in_array($class, $app->getLoadedProviders())); }