Skip to content

Commit 2c50292

Browse files
committed
Allow debug mode by default.
1 parent c248890 commit 2c50292

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/TestCase/Controller/DebugKitControllerTest.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,26 @@ private function _buildController()
7474
*/
7575
public function testIgnoreAuthorization()
7676
{
77-
Configure::write('DebugKit.ignoreAuthorization', true);
78-
7977
$controller = $this->_buildController();
8078
$event = new Event('testing');
8179
$controller->beforeFilter($event);
8280

8381
$this->assertTrue($controller->getRequest()->getAttribute('authorization')->authorizationChecked());
8482
}
83+
84+
/**
85+
* tests authorization is enabled but not ignored
86+
*
87+
* @return void
88+
*/
89+
public function testDontIgnoreAuthorization()
90+
{
91+
Configure::write('DebugKit.ignoreAuthorization', false);
92+
93+
$controller = $this->_buildController();
94+
$event = new Event('testing');
95+
$controller->beforeFilter($event);
96+
97+
$this->assertFalse($controller->getRequest()->getAttribute('authorization')->authorizationChecked());
98+
}
8599
}

0 commit comments

Comments
 (0)