Ouzo\Tests\CatchException::get PHP Method

get() public static method

public static get ( )
    public static function get()
    {
        return self::$exception;
    }

Usage Example

コード例 #1
0
ファイル: CatchExceptionTest.php プロジェクト: letsdrink/ouzo
 /**
  * @test
  */
 public function getShouldReturnException()
 {
     // given
     $object = new MyClass();
     CatchException::when($object)->someMethodThatThrowsException();
     // when
     $exception = CatchException::get();
     // then
     $this->assertInstanceOf('Exception', $exception);
 }