getConfigs() 공개 메소드

return our list of configs
public getConfigs ( ) : array
리턴 array
예제 #1
0
 /**
  * @covers DataSift\Storyplayer\ConfigLib\HardCodedList::__construct
  * @covers DataSift\Storyplayer\ConfigLib\HardCodedList::addConfig
  * @covers DataSift\Storyplayer\ConfigLib\HardCodedList::getConfigs
  */
 public function testCanAddNewConfig()
 {
     // ----------------------------------------------------------------
     // setup the test
     $expectedName = 'test-config';
     $obj = new HardCodedList('DataSift\\Storyplayer\\ConfigLib\\WrappedConfig');
     // ----------------------------------------------------------------
     // perform the change
     $config = new WrappedConfig();
     $config->setName($expectedName);
     $obj->addConfig($config);
     // ----------------------------------------------------------------
     // test the results
     $configs = $obj->getConfigs();
     $this->assertTrue(isset($configs[$expectedName]));
     $this->assertSame($configs[$expectedName], $config);
 }
예제 #2
0
 /**
  * add config entries from a hard-coded list
  *
  * @param HardCodedList $hardCodedDefaults
  *        the entries to add
  */
 public function addHardCodedList(HardCodedList $hardCodedDefaults)
 {
     $list = $hardCodedDefaults->getConfigs();
     foreach ($list as $name => $config) {
         $this->addEntry($name, $config);
     }
 }