Go\Aop\Framework\BeforeInterceptorTest::testAdviceIsCalledBeforeInvocation PHP Method

testAdviceIsCalledBeforeInvocation() public method

    public function testAdviceIsCalledBeforeInvocation()
    {
        $sequence = [];
        $advice = $this->getAdvice($sequence);
        $invocation = $this->getInvocation($sequence);
        $interceptor = new BeforeInterceptor($advice);
        $result = $interceptor->invoke($invocation);
        $this->assertEquals('invocation', $result, "Advice should not affect the return value of invocation");
        $this->assertEquals(array('advice', 'invocation'), $sequence, "Before advice should be invoked before invocation");
    }