DataSift\Storyplayer\ConfigLib\ConfigListTest::testCanAddConfigManually PHP Method

testCanAddConfigManually() public method

    public function testCanAddConfigManually()
    {
        // ----------------------------------------------------------------
        // setup your test
        $obj = new ConfigList("DataSift\\Storyplayer\\ConfigLib\\StoryplayerConfig", __DIR__ . '/ConfigListTestData1');
        $obj->findConfigs();
        $expectedName = 'injected-1';
        $expectedConfig = new StoryplayerConfig();
        // ----------------------------------------------------------------
        // perform the change
        $obj->addEntry($expectedName, $expectedConfig);
        // ----------------------------------------------------------------
        // test the results
        $configs = $obj->getEntries();
        $this->assertTrue(isset($configs[$expectedName]));
        $this->assertEquals($expectedConfig, $configs[$expectedName]);
    }