getConfigs() public method

return our list of configs
public getConfigs ( ) : array
return array
Esempio n. 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);
 }
Esempio n. 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);
     }
 }