예제 #1
0
파일: RuntimeTest.php 프로젝트: mvc5/tests
 /**
  *
  */
 function test_php_runtime_exception()
 {
     try {
         PHPException::runtime('foo');
     } catch (\Exception $exception) {
     }
     $this->assertEquals('foo', $exception->getMessage());
     $this->assertEquals(__FILE__, $exception->getFile());
     $this->assertEquals(39, $exception->getLine());
     $this->assertInstanceOf(\RuntimeException::class, $exception);
 }
예제 #2
0
 /**
  *
  */
 function test_php_invalid_argument_exception()
 {
     try {
         PHPException::invalidArgument('foo');
     } catch (\Exception $exception) {
     }
     $this->assertEquals('foo', $exception->getMessage());
     $this->assertEquals(__FILE__, $exception->getFile());
     $this->assertEquals(39, $exception->getLine());
     $this->assertInstanceOf(\InvalidArgumentException::class, $exception);
 }