You are here

function DrupalBootHookTest::initOnce in X Autoload 7.5

1 call to DrupalBootHookTest::initOnce()
DrupalBootHookTest::prepare in tests/src/DrupalBootTest/DrupalBootHookTest.php
setUp() does not help us because of the process sharing problem. So we use this instead.

File

tests/src/DrupalBootTest/DrupalBootHookTest.php, line 111

Class

DrupalBootHookTest
Tests modules that use hook_xautoload() and hook_libraries_info()

Namespace

Drupal\xautoload\Tests\DrupalBootTest

Code

function initOnce() {
  if (isset($this->exampleDrupal)) {
    return;
  }
  $this->exampleModules = new HookTestExampleModules();
  $this->exampleDrupal = new DrupalEnvironment($this->exampleModules);
  $this->exampleDrupal
    ->setStaticInstance();
}