function test_Sites_set() { //Arrange $id = null; $services_id = null; $name = 'hotel deluxe'; $analytics_profile = '5271170'; $test_site = new Sites($id, $services_id, $name, $analytics_profile); //Act $test_site->setName('hotel max'); $result1 = $test_site->getName(); $test_site->setAnalyticsProfile('5271201'); $result2 = $test_site->getAnalyticsProfile(); //Assert $this->assertEquals('hotel max', $result1); $this->assertEquals('5271201', $result2); }
if ($isError) { switch ($errorType) { case 1: $koala->alert($itext['TXT_PNAME_ALREADY_USED']); break; case 2: $koala->alert($itext['TXT_PNAME_BLACKLISTED']); break; } // Reset PName to old PName /* $oldPname = $siteMgr->getPName($objectID); $jsQueue->add ($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'site', NULL, NULL, $objectID.'-site', 'pname', $oldPname); */ } else { $siteMgr->setName($objectID, $name); $siteMgr->setPName($objectID, $pname); $siteMgr->setFavicon($objectID, $favicon); $siteMgr->setDefaultTemplate($objectID, $defaulttemplate); $siteMgr->setTemplateRoot($objectID, $templateroot); $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'site', NULL, NULL, $objectID . '-site', 'name', $name); $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'page', NULL, NULL, $objectID . '-site', 'name', $name); $jsQueue->add($objectID, HISTORYTYPE_SITE, 'OBJECT_CHANGE', sGuiUS(), 'site', NULL, NULL, $objectID . '-site', 'pname', $pname); // Re-sort the list $koala->queueScript('if (Koala.windows[Koala.windows[\'' . $wid . '\'].boundWindow].sortList) Koala.windows[Koala.windows[\'' . $wid . '\'].boundWindow].sortList();'); $jsQueue->add($objectID, HISTORYTYPE_SITE, 'REFRESH_WINDOW', sGuiUS(), 'name'); // Fade all green fields $koala->queueScript("Koala.yg_fadeFields(\$('" . $wid . "'), 'input.changed');"); $jsQueue->add($objectID, HISTORYTYPE_SITE, 'UNHIGHLIGHT_SITE', sGuiUS(), 'name'); } break;