Exemplo n.º 1
0
 /**
  * @test
  */
 function it_intercepts_proxy_suffix()
 {
     $interception = new ProxyInterceptionSuffix(new \stdClass(), 'someMethod', ['key1' => 'param1'], 'returnValue');
     $result = new HitResult($interception, 'key', ['pool'], 'someNewValue');
     $this->interceptor->method('canInterceptAnnotation')->with($this->annotation)->willReturn(true);
     $this->interceptor->method('interceptSuffix')->with($this->annotation, $interception)->willReturn($result);
     $this->resultCollector->expects($this->once())->method('collect')->with($result);
     $result = $this->cacheHandler->interceptProxySuffix(new AnnotationCollection([$this->annotation]), $interception);
     $this->assertEquals('someNewValue', $result);
 }