Example #1
0
 public function testFailureCallbackIsCalled()
 {
     Apricot::fail(function ($e) {
         echo "Failed: " . $e->getMessage();
     });
     Apricot::when('/', function () {
         throw new \Exception("Whow!");
     });
     $this->assertTrue(Apricot::browse('/') === "Failed: Whow!");
 }