public function testGetProviderFallbackToDefault() { $provider = $this->getProviderMock(); // Register default provider: $provider->expects($this->any())->method('getNamespace')->will($this->returnValue('default')); $settings = new Settings(); $settings->addProvider($provider); // Now. try to get provider null $this->assertSame($provider, $settings->getProvider(null)); }
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'); }