You are here

function XAutoloadUnitTestCase::setUp in X Autoload 7.3

Same name and namespace in other branches
  1. 7.5 lib/Drupal/xautoload/Tests/XAutoloadUnitTestCase.php \Drupal\xautoload\Tests\XAutoloadUnitTestCase::setUp()
  2. 7.4 lib/Drupal/xautoload/Tests/XAutoloadUnitTestCase.php \Drupal\xautoload\Tests\XAutoloadUnitTestCase::setUp()

File

lib/Drupal/xautoload/Tests/XAutoloadUnitTestCase.php, line 28

Class

XAutoloadUnitTestCase

Namespace

Drupal\xautoload\Tests

Code

function setUp() {

  // drupal_load('module', 'xautoload') would register namespaces for all
  // enabled modules, which is not intended for this unit test.
  // Instead, we just include xautoload.early.inc.
  require_once dirname(__FILE__) . '/../../../../xautoload.early.inc';

  // Make sure we use the regular loader, not the APC one.
  // Also make sure to prepend this one. Otherwise, the core class loader will
  // try to load xautoload-related stuff, e.g. xautoload_Mock_* stuff, and
  // will fail due to the database.
  xautoload('loaderManager')
    ->register('default', TRUE);

  // Do the regular setUp().
  parent::setUp();
}