public function getSettingsStub(array $providers, $resolver) { $settings = new Settings(); $settings->addProviders($providers); $settings->setResolver($resolver); return $settings; }
public function testGetNotExistingProvider() { $this->setExpectedException('OutOfBoundsException'); $settings = new Settings(); // No providers, try to access anything. $settings->getProvider('not_existing_provider'); }
public function testRuntimeExeptionWhenNoResolverFound() { $this->setExpectedException('RuntimeException'); $settings = new Settings(); $settings->addProvider(new Blackhole()); $settings->get(' this_should_throw_exception _couse_no_resolver_was_attached_to_object'); }