mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
logging: fix failing tests when called via webrunner
This commit is contained in:
parent
3f6593311b
commit
907b3221ed
6 changed files with 16 additions and 2 deletions
|
@ -597,12 +597,16 @@ class BasicsTest extends CakeTestCase {
|
|||
@unlink(LOGS . 'error.log');
|
||||
|
||||
// disable stderr output for this test
|
||||
CakeLog::disable('stderr');
|
||||
if (CakeLog::stream('stderr')) {
|
||||
CakeLog::disable('stderr');
|
||||
}
|
||||
|
||||
LogError('Testing LogError() basic function');
|
||||
LogError("Testing with\nmulti-line\nstring");
|
||||
|
||||
CakeLog::enable('stderr');
|
||||
if (CakeLog::stream('stderr')) {
|
||||
CakeLog::enable('stderr');
|
||||
}
|
||||
|
||||
$result = file_get_contents(LOGS . 'error.log');
|
||||
$this->assertRegExp('/Error: Testing LogError\(\) basic function/', $result);
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ShellDispatcher', 'Console');
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses('AclShell', 'Console/Command');
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ShellDispatcher', 'Console');
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses('ApiShell', 'Console/Command');
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ShellDispatcher', 'Console');
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses('BakeShell', 'Console/Command');
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ShellDispatcher', 'Console');
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses('CakeSchema', 'Model');
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
|
||||
App::uses('Folder', 'Utility');
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ShellDispatcher', 'Console');
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses('ExtractTask', 'Console/Command/Task');
|
||||
|
|
Loading…
Reference in a new issue