public function testInterceptorIsCalledForInvocation()
{
$child = $this->getMock(self::FIRST_CLASS_NAME, array('none'));
$value = 'test';
$advice = $this->getMock(Interceptor::class);
$advice->expects($this->once())->method('invoke')->will($this->returnCallback(function (MethodInvocation $object) use(&$value) {
$value = 'ok';
return $object->proceed();
}));
$invocation = new self::$invocationClass(self::FIRST_CLASS_NAME, 'publicMethod', array($advice));
$result = $invocation($child, []);
$this->assertEquals('ok', $value);
$this->assertEquals(T_PUBLIC, $result);
}