コード例 #1
0
 /**
  * Generate statements for setting up the mocks of the classes
  * injected by the dependency management system.
  * Static methods are expected to be invoked on these mocks.
  *
  * @return string
  * @throws \Box\TestScribe\Exception\TestScribeException
  */
 public function genMockedClassesStatements()
 {
     $mocks = $this->injectedMockClassMgr->getInjectedMockedClass();
     if (empty($mocks)) {
         return '';
     }
     $injectMockedClassMethodName = $this->globalComputedConfig->getInjectMockedClassMethodName();
     if (!$injectMockedClassMethodName) {
         throw new TestScribeException('Method name to generate statements for setting up mocked classes is not set.');
     }
     $statements = $this->multipleInjectedMocksRenderer->genInjectionStatements($mocks, $injectMockedClassMethodName);
     return $statements;
 }