Kraken\_Unit\Throwable\ThrowableProxyTest::testApiConstructor_CreatesInstance_WithPreviousElementBeingFrameworkError PHP Method

testApiConstructor_CreatesInstance_WithPreviousElementBeingFrameworkError() public method

    public function testApiConstructor_CreatesInstance_WithPreviousElementBeingFrameworkError()
    {
        $prev = new \Kraken\Throwable\Error('Previous');
        $ex = new \Kraken\Throwable\Error('Error', $prev);
        $proxy = $this->createThrowableProxy($ex);
        $throwable = $proxy->toThrowable();
        $this->assertInstanceOf(\Kraken\Throwable\Error::class, $throwable);
        $this->assertSame('Error', $throwable->getMessage());
        $throwable = $throwable->getPrevious();
        $this->assertInstanceOf(\Kraken\Throwable\Error::class, $throwable);
        $this->assertSame('Previous', $throwable->getMessage());
    }