getConfig() public method

get the config that we wrap
public getConfig ( ) : array | object
return array | object
Esempio n. 1
0
 /**
  * @covers DataSift\Storyplayer\ConfigLib\WrappedConfig::unsetData()
  */
 public function testCanUnsetAnArrayOfData()
 {
     // ----------------------------------------------------------------
     // setup your test
     $obj = new WrappedConfig();
     $obj->loadConfigFromFile(__DIR__ . "/wrapped-config-2.json");
     // ----------------------------------------------------------------
     // perform the change
     $obj->unsetData("storyplayer.roles.0");
     // ----------------------------------------------------------------
     // test the results
     $config = $obj->getConfig();
     $this->assertTrue(isset($config->storyplayer->roles));
     $this->assertFalse(isset($config->storyplayer->roles[0]));
 }