public function __construct() { parent::__construct(self::ROOT_IS_OBJECT); }
/** * @covers DataSift\Storyplayer\ConfigLib\HardCodedList::__construct * @covers DataSift\Storyplayer\ConfigLib\HardCodedList::addConfig * @expectedException DataSift\Storyplayer\ConfigLib\E4xx_IncompatibleConfigClass */ public function testCanAddedConfigsMustBeCompatibleType() { // ---------------------------------------------------------------- // setup the test $expectedName = 'test-config'; $obj = new HardCodedList('DataSift\\Storyplayer\\ConfigLib\\StoryplayerConfig'); // ---------------------------------------------------------------- // perform the change $config = new WrappedConfig(); $config->setName($expectedName); $obj->addConfig($config); }
/** * @covers DataSift\Storyplayer\ConfigLib\WrappedConfig::hasData() */ public function testHasDataReturnsFalseWhenConfigPathNotFoundInAScalar() { // ---------------------------------------------------------------- // setup your test $obj = new WrappedConfig(); $obj->loadConfigFromFile(__DIR__ . "/wrapped-config-2.json"); // ---------------------------------------------------------------- // perform the change $actual = $obj->hasData("storyplayer.ipAddress.netmask"); // ---------------------------------------------------------------- // test the results $this->assertFalse($actual); }