Exemple #1
0
 private static function _extractMock($mock)
 {
     if ($mock instanceof SimpleMock) {
         return $mock;
     }
     return DynamicProxy::extractMethodHandler($mock);
 }
Exemple #2
0
 public static function extractMock($mock)
 {
     if (is_null($mock)) {
         throw new InvalidArgumentException("Instance of class Mock or SimpleMock expected, null given");
     }
     if ($mock instanceof SimpleMock) {
         return $mock;
     }
     return DynamicProxy::extractMethodHandler($mock);
 }