Kraken\_Unit\Throwable\ExceptionHandlerTest::testStaticApiHandleException_HandlesExceptionAsString PHP Метод

testStaticApiHandleException_HandlesExceptionAsString() публичный Метод

    public function testStaticApiHandleException_HandlesExceptionAsString()
    {
        $ex = new Exception('Exception');
        $class = ExceptionHandler::class;
        $handler = function ($passedEx) use($ex) {
            $this->assertSame($ex, $passedEx);
        };
        $default = $this->getProtectedProperty($class, 'handler');
        $this->setProtectedProperty($class, 'handler', $handler);
        ExceptionHandler::handleException($ex);
        $this->setProtectedProperty($class, 'handler', $default);
    }