mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
Removing dead tests and updating ones to reflect changes in how Configure works.
This commit is contained in:
parent
a621ac1ba3
commit
6c2c4f91df
1 changed files with 3 additions and 39 deletions
|
@ -135,54 +135,18 @@ class ConfigureTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testSetErrorReporting Level
|
* test setting display_errors with debug.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSetErrorReportingLevel() {
|
function testDebugSettingDisplayErrors() {
|
||||||
Configure::write('log', false);
|
|
||||||
|
|
||||||
Configure::write('debug', 0);
|
Configure::write('debug', 0);
|
||||||
$result = ini_get('error_reporting');
|
$result = ini_get('display_errors');
|
||||||
$this->assertEqual($result, 0);
|
$this->assertEqual($result, 0);
|
||||||
|
|
||||||
Configure::write('debug', 2);
|
Configure::write('debug', 2);
|
||||||
$result = ini_get('error_reporting');
|
|
||||||
$this->assertEqual($result, E_ALL & ~E_DEPRECATED);
|
|
||||||
|
|
||||||
$result = ini_get('display_errors');
|
$result = ini_get('display_errors');
|
||||||
$this->assertEqual($result, 1);
|
$this->assertEqual($result, 1);
|
||||||
|
|
||||||
Configure::write('debug', 0);
|
|
||||||
$result = ini_get('error_reporting');
|
|
||||||
$this->assertEqual($result, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test that log and debug configure values interact well.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function testInteractionOfDebugAndLog() {
|
|
||||||
Configure::write('log', false);
|
|
||||||
|
|
||||||
Configure::write('debug', 0);
|
|
||||||
$this->assertEqual(ini_get('error_reporting'), 0);
|
|
||||||
$this->assertEqual(ini_get('display_errors'), 0);
|
|
||||||
|
|
||||||
Configure::write('log', E_WARNING);
|
|
||||||
Configure::write('debug', 0);
|
|
||||||
$this->assertEqual(ini_get('error_reporting'), E_WARNING);
|
|
||||||
$this->assertEqual(ini_get('display_errors'), 0);
|
|
||||||
|
|
||||||
Configure::write('debug', 2);
|
|
||||||
$this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED);
|
|
||||||
$this->assertEqual(ini_get('display_errors'), 1);
|
|
||||||
|
|
||||||
Configure::write('debug', 0);
|
|
||||||
Configure::write('log', false);
|
|
||||||
$this->assertEqual(ini_get('error_reporting'), 0);
|
|
||||||
$this->assertEqual(ini_get('display_errors'), 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue