コード例 #1
0
ファイル: ConfigTest.php プロジェクト: lixiongyou/pudding
 /**
  * @return void
  */
 public function testSetAndGetProfile()
 {
     BaseConfig::setProfile('abcdef123');
     $this->assertEquals('abcdef123', BaseConfig::getProfile());
     BaseConfig::setProfile('');
     $this->assertEquals('', BaseConfig::getProfile());
 }
コード例 #2
0
ファイル: CoreConfigTest.php プロジェクト: lixiongyou/pudding
 /**
  * @depends testGenerate
  * @depends testGet
  */
 public function testGenerateProfileConfigWhileSettingProfileByBaseConfig()
 {
     BaseConfig::setProfile('production');
     $production_core_config = new CoreConfig();
     $this->assertEquals('It is a secret!', $production_core_config->get('db', 'password'));
     BaseConfig::setProfile('');
 }
コード例 #3
0
ファイル: Config.php プロジェクト: lixiongyou/pudding
 /**
  * @return string
  */
 public function getProfile()
 {
     return BaseConfig::getProfile();
 }