コード例 #1
0
ファイル: config.php プロジェクト: olucao/owncloud-core
 public function testSavingDebugMode()
 {
     $this->config->setDebugMode(true);
     $this->config->deleteKey('foo');
     // change something so we save to the config file
     $this->assertAttributeEquals(array(), 'cache', $this->config);
     $this->assertAttributeEquals(true, 'debugMode', $this->config);
     $content = file_get_contents(self::CONFIG_FILE);
     $expected = "<?php\ndefine('DEBUG',true);\n\$CONFIG = array (\n);\n";
     $this->assertEquals($expected, $content);
 }
コード例 #2
0
ファイル: config.php プロジェクト: Romua1d/core
 public function testIsDebugMode()
 {
     // Default
     $this->assertFalse($this->config->isDebugMode());
     // Manually set to false
     $this->config->setDebugMode(false);
     $this->assertFalse($this->config->isDebugMode());
     // Manually set to true
     $this->config->setDebugMode(true);
     $this->assertTrue($this->config->isDebugMode());
 }