Example #1
0
 public function testSingletonExceptionClassInstanceViaStaticMethod()
 {
     $app = new App($this->config, uniqid(rand()));
     $app->singleton('fakeException', function () use($app) {
         return new Exception($app, new \Exception('test exception'));
     });
     $this->assertEquals($app->fakeException(), App::fakeException());
 }