private static function _extractMock($mock) { if ($mock instanceof SimpleMock) { return $mock; } return DynamicProxy::extractMethodHandler($mock); }
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); }