Example #1
0
 /**
  * $configValue must be defined in config.xml
  * @covers XMLConfig::getString
  * @expectedException ConfigurationException
  * @expectedExceptionMessage Missing configuration value 'webap/defaultURL' in tests/config/config.xml
  */
 public function testGetStringException()
 {
     $configValue = "webap/defaultURL";
     $actual = $this->config->getString($configValue);
     $excepted = "/login/home";
     $this->assertEquals($excepted, $actual);
 }
Example #2
0
 function Adenter()
 {
     $config = new Config();
     //必要参数开始
     $cid = $config->getString("default_campaign_id");
     if (!empty($cid)) {
         $this->DEFAULT_CAMPAIGN_ID = $cid;
     }
     $target = $config->getString("default_target");
     if (!empty($target)) {
         $this->DEFAULT_TARGET = $target;
     }
     $cdomain = $config->getString("union_cookie_domain");
     if (!empty($cdomain)) {
         $this->UNION_COOKIE_DOMAIN = $cdomain;
     }
     $channel = $config->getString("default_channel");
     if (!empty($channel)) {
         $this->DEFAULT_CHANNEL = $channel;
     }
     $cname = $config->getString("union_cookie_name");
     if (!empty($cname)) {
         $this->UNION_COOKIE_NAME = $cname;
     }
     $cage = $config->getString("union_cookie_maxage");
     if (!empty($cage)) {
         $this->UNION_COOKIE_MAXAGE = $cage;
     }
     $cnames = $config->getString("clean_cookie_names");
     if (!empty($cnames)) {
         $this->CLEAN_COOKIE_NAMES = $cnames;
     }
 }