public function getProvider($provider) { $provider = strtolower($provider); // Check if an instance has already been initiated. If not // build it and then add to the providers array. if (!isset($this->providers[$provider])) { $this->addProvider($provider); } return $this->providers[$provider]; }
/** * @test * @expectedException \seregazhuk\PinterestBot\Exceptions\WrongProviderException */ public function getWrongProvider() { $this->container->getProvider('unknown'); }