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

Sets the result (return object) of the intercepted method
public setResult ( mixed $result ) : void
$result mixed The result of the intercepted method
Результат void
 /**
  * @test
  */
 public function invokeReturnsTheResultPreviouslySetBySetResultIfTheMethodIsNotIntercepted()
 {
     $mockSecurityContext = $this->createMock(Security\Context::class);
     $mockAfterInvocationManager = $this->createMock(Security\Authorization\AfterInvocationManagerInterface::class);
     $theResult = new \ArrayObject(['some' => 'stuff']);
     $interceptor = new Security\Authorization\Interceptor\AfterInvocation($mockSecurityContext, $mockAfterInvocationManager);
     $interceptor->setResult($theResult);
     $this->assertSame($theResult, $interceptor->invoke());
 }