}
/**
- * @covers ConfigFactory::register
+ * @covers ConfigFactory::salvage
*/
public function testSalvage() {
$oldFactory = new ConfigFactory();
}
/**
- * @covers ConfigFactory::register
+ * @covers ConfigFactory::getConfigNames
*/
public function testGetConfigNames() {
$factory = new ConfigFactory();
/**
* @covers ConfigFactory::makeConfig
*/
- public function testMakeConfig() {
+ public function testMakeConfigWithCallback() {
$factory = new ConfigFactory();
$factory->register( 'unittest', 'GlobalVarConfig::newInstance' );
$this->assertSame( $conf, $factory->makeConfig( 'unittest' ) );
}
+ /**
+ * @covers ConfigFactory::makeConfig
+ */
+ public function testMakeConfigWithObject() {
+ $factory = new ConfigFactory();
+ $conf = new HashConfig();
+ $factory->register( 'test', $conf );
+ $this->assertSame( $conf, $factory->makeConfig( 'test' ) );
+ }
+
/**
* @covers ConfigFactory::makeConfig
*/