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); }
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()); }