public function getRepositoryMock(\Psc\Code\Test\Base $testCase, $entityName, array $methods = NULL) { $realRepository = $this->getRepository($entityName); $class = Code::getClass($realRepository); return $testCase->getMock($class, $methods, array($this, $this->getClassMetadata($entityName))); }