Example #1
0
 public function testAccessDeniedTriggeredWithCallback()
 {
     Apricot::reset();
     Apricot::setEnvironment('test');
     Apricot::when('/', function () {
         Apricot::triggerAccessDenied();
     });
     Apricot::accessDenied(function () {
         echo 'Stop!';
     });
     $this->assertTrue('Stop!' === Apricot::browse('/'));
 }