Skip to content
Permalink
Browse files

Fixing up the include for the console error handler, and adding a tes…

…t for stderr handle.
  • Loading branch information...
markstory committed Sep 4, 2010
1 parent fa7549d commit 42d998ca3bae7ed4494fde1c50e9004ca446eb44
Showing with 13 additions and 1 deletion.
  1. +13 −1 cake/tests/cases/console/console_error_handler.test.php
@@ -17,7 +17,7 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', 'ConsoleErrorHandler');
require CAKE . 'console' . DS . 'console_error_handler.php';
class TestConsoleErrorHandler extends ConsoleErrorHandler {
public $output = array();
@@ -100,4 +100,16 @@ function testError500Exception() {
$this->assertEquals(1, count($result));
$this->assertEquals('dont use me in cli.', $result[0]);
}
/**
* test that ConsoleErrorHandler has a stderr file handle.
*
* @return void
*/
function testStdErrFilehandle() {
$exception = new Error500Exception('dont use me in cli.');
$error = new TestConsoleErrorHandler($exception);
$this->assertTrue(is_resource($error->stderr), 'No handle.');
}
}

0 comments on commit 42d998c

Please sign in to comment.
You can’t perform that action at this time.