DataSift\Storyplayer\ConfigLib\HardCodedListTest::testCanAddNewConfig PHP Method

testCanAddNewConfig() public method

public testCanAddNewConfig ( )
    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);
    }