Go\Aop\Framework\AfterThrowingInterceptorTest::testAdviceIsCalledAfterExceptionInInvocation PHP Method

testAdviceIsCalledAfterExceptionInInvocation() public method

    public function testAdviceIsCalledAfterExceptionInInvocation()
    {
        $sequence = [];
        $advice = $this->getAdvice($sequence);
        $invocation = $this->getInvocation($sequence, true);
        $interceptor = new AfterThrowingInterceptor($advice);
        $this->setExpectedException('RuntimeException');
        try {
            $interceptor->invoke($invocation);
        } catch (\Exception $e) {
            $this->assertEquals(array('invocation', 'advice'), $sequence, "Advice should be invoked after invocation");
            throw $e;
        }
    }