getConfig() */ public function testGetConfig() { $containerConfig = new ContainerConfig(Config::get('container_path')); $config = $containerConfig->getConfig('default', 'gadgets.features'); $this->assertArrayHasKey('core.io', $config); $this->assertArrayHasKey('views', $config); $this->assertArrayHasKey('rpc', $config); $this->assertArrayHasKey('skins', $config); $this->assertArrayHasKey('opensocial', $config); $this->assertArrayHasKey('path', $config['opensocial']); } /** * Tests ContainerConfig::removeComments() */ public function testRemoveComments() { $jsFile = <<assertNotEquals($uncommented, $jsonObj); $this->assertEquals(array("default"), $jsonObj["gadgets.container"]); $this->assertEquals(null, $jsonObj["gadgets.parent"]); $this->assertEquals("-a.example.com:8080", $jsonObj["gadgets.lockedDomainSuffix"]); $this->assertEquals("/gadgets/ifr", $jsonObj["gadgets.iframeBaseUri"]); $this->assertEquals("http://%host%/gadgets/js/%js%", $jsonObj["gadgets.jsUriTemplate"]); $this->assertEquals("//%host%/gadgets/oauthcallback", $jsonObj["gadgets.oauthGadgetCallbackTemplate"]); } }