You are here

protected function DrupalBootTest::prepare in X Autoload 7.5

setUp() does not help us because of the process sharing problem. So we use this instead.

Throws

\Exception

Overrides AbstractDrupalBootTest::prepare

File

tests/src/DrupalBootTest/DrupalBootTest.php, line 130

Class

DrupalBootTest
@runTestsInSeparateProcesses @preserveGlobalState disabled

Namespace

Drupal\xautoload\Tests\DrupalBootTest

Code

protected function prepare() {
  $this
    ->initOnce();
  $filesystem = StreamWrapper::register('test');
  foreach ($this->exampleModules
    ->discoverModuleFilenames('module') as $name => $filename) {
    $this->exampleDrupal
      ->getSystemTable()
      ->addModuleWithFilename($name, $filename);
  }
  $this->exampleDrupal
    ->getSystemTable()
    ->moduleSetEnabled('system');
  $this->exampleDrupal
    ->initBootstrapStatus();

  # $this->exampleDrupal->getCache()->cacheSet('module_implements', $data, 'cache_bootstrap');
  xautoload()
    ->getServiceContainer()
    ->set('system', $this->exampleDrupal
    ->getMockDrupalSystem());
  $this->callLog = new CallLog();
  StaticCallLog::setCallLog($this->callLog);
}