Skip to content

Commit

Permalink
Update namespace for Debugger class.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 28, 2014
1 parent bf51a2b commit 8d61a55
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Component/AuthComponent.php
Expand Up @@ -20,11 +20,11 @@
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Error;
use Cake\Error\Debugger;
use Cake\Event\Event;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\Routing\Router;
use Cake\Utility\Debugger;
use Cake\Utility\Hash;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Error/BaseErrorHandler.php
Expand Up @@ -15,9 +15,9 @@
namespace Cake\Error;

use Cake\Core\Configure;
use Cake\Error\Debugger;
use Cake\Log\Log;
use Cake\Routing\Router;
use Cake\Utility\Debugger;

/**
* Base error handler that provides logic common to the CLI + web
Expand Down
2 changes: 1 addition & 1 deletion src/Error/ErrorHandler.php
Expand Up @@ -17,7 +17,7 @@
namespace Cake\Error;

use Cake\Core\App;
use Cake\Utility\Debugger;
use Cake\Error\Debugger;

/**
* Error Handler provides basic error and exception handling for your application. It captures and
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Element/exception_stack_trace.ctp
Expand Up @@ -14,7 +14,7 @@
* @since 1.3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Utility\Debugger;
use Cake\Error\Debugger;
?>
<h3>Stack Trace</h3>
<ul class="cake-stack-trace">
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Error/missing_route.ctp
Expand Up @@ -14,7 +14,7 @@
*/

use Cake\Routing\Router;
use Cake\Utility\Debugger;
use Cake\Error\Debugger;

?>
<h2>Missing Route</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Error/pdo_error.ctp
Expand Up @@ -12,7 +12,7 @@
* @since 0.10.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Utility\Debugger;
use Cake\Error\Debugger;
?>
<h2>Database Error</h2>
<p class="error">
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/BasicsTest.php
Expand Up @@ -502,13 +502,13 @@ public function testNamespaceSplit() {
*/
public function testStackTrace() {
ob_start();
list($r, $expected) = [stackTrace(), \Cake\Utility\Debugger::trace()];
list($r, $expected) = [stackTrace(), \Cake\Error\Debugger::trace()];
$result = ob_get_clean();
$this->assertEquals($expected, $result);

$opts = ['args' => true];
ob_start();
list($r, $expected) = [stackTrace($opts), \Cake\Utility\Debugger::trace($opts)];
list($r, $expected) = [stackTrace($opts), \Cake\Error\Debugger::trace($opts)];
$result = ob_get_clean();
$this->assertEquals($expected, $result);
}
Expand Down
14 changes: 7 additions & 7 deletions tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -117,7 +117,7 @@ public function testExcerpt() {
* @return void
*/
public function testOutput() {
set_error_handler('Cake\Utility\Debugger::showError');
set_error_handler('Cake\Error\Debugger::showError');
$this->_restoreError = true;

$result = Debugger::output(false);
Expand Down Expand Up @@ -174,7 +174,7 @@ public function testOutput() {
* @return void
*/
public function testChangeOutputFormats() {
set_error_handler('Cake\Utility\Debugger::showError');
set_error_handler('Cake\Error\Debugger::showError');
$this->_restoreError = true;

Debugger::output('js', array(
Expand Down Expand Up @@ -233,7 +233,7 @@ public function testOutputAsException() {
* @return void
*/
public function testAddFormat() {
set_error_handler('Cake\Utility\Debugger::showError');
set_error_handler('Cake\Error\Debugger::showError');
$this->_restoreError = true;

Debugger::addFormat('js', array(
Expand Down Expand Up @@ -272,7 +272,7 @@ public function testAddFormat() {
* @return void
*/
public function testAddFormatCallback() {
set_error_handler('Cake\Utility\Debugger::showError');
set_error_handler('Cake\Error\Debugger::showError');
$this->_restoreError = true;

Debugger::addFormat('callback', array('callback' => array($this, 'customFormat')));
Expand Down Expand Up @@ -559,16 +559,16 @@ public function testDump() {
*/
public function testGetInstance() {
$result = Debugger::getInstance();
$this->assertInstanceOf('Cake\Utility\Debugger', $result);
$this->assertInstanceOf('Cake\Error\Debugger', $result);

$result = Debugger::getInstance(__NAMESPACE__ . '\DebuggerTestCaseDebugger');
$this->assertInstanceOf(__NAMESPACE__ . '\DebuggerTestCaseDebugger', $result);

$result = Debugger::getInstance();
$this->assertInstanceOf(__NAMESPACE__ . '\DebuggerTestCaseDebugger', $result);

$result = Debugger::getInstance('Cake\Utility\Debugger');
$this->assertInstanceOf('Cake\Utility\Debugger', $result);
$result = Debugger::getInstance('Cake\Error\Debugger');
$this->assertInstanceOf('Cake\Error\Debugger', $result);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/test_app/TestApp/Template/Pages/home.ctp
Expand Up @@ -4,7 +4,7 @@ use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Datasource\ConnectionManager;
use Cake\Error;
use Cake\Utility\Debugger;
use Cake\Error\Debugger;
use Cake\Validation\Validation;

if (!Configure::read('debug')):
Expand Down

0 comments on commit 8d61a55

Please sign in to comment.