File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
tests/TestCase/Controller Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments