Beispiel #1
0
 /**
  *
  */
 function test_exception()
 {
     try {
         Exception::exception('foo');
     } catch (\Exception $exception) {
     }
     $this->assertEquals('foo', $exception->getMessage());
     $this->assertEquals(__FILE__, $exception->getFile());
     $this->assertEquals(21, $exception->getLine());
     $this->assertInstanceOf(Exception::class, $exception);
 }
Beispiel #2
0
 /**
  *
  */
 function test_exception()
 {
     $this->setExpectedException(Exception::class, 'foo');
     Exception::exception('foo');
 }