コード例 #1
0
 public function getMock(ReplacementRequest $request, ReturnValue $returnValue)
 {
     $className = $request->getClassName();
     $methodName = $request->getMethodName();
     $methods = ['__construct', $methodName];
     $mockObject = $this->getPHPUnitMockObjectFor($className, $methods);
     $this->setMockObjectExpectation($mockObject, $methodName, $returnValue);
     $wrapperInstance = $this->getWrappedMockObject($mockObject, $className, $request);
     return $wrapperInstance;
 }