You are here

function XAutoloadUnitTestCase::testNsRegNested in X Autoload 7.2

File

./xautoload.test, line 24

Class

XAutoloadUnitTestCase

Code

function testNsRegNested() {
  $finder = new xautoload_ClassFinder_NamespaceOrPrefix();
  $finder
    ->registerNamespaceDeep('Drupal\\menu_block', 'sites/all/modules/contrib/menu_block/lib');
  $finder
    ->registerPrefixDeep('menu_block', 'sites/all/modules/contrib/menu_block/lib');
  $finder_str = print_r($finder, TRUE);
  $this
    ->_findClass($finder, 'Drupal\\menu_block\\Abc_Def', array(
    'sites/all/modules/contrib/menu_block/lib/Abc/Def.php',
  ));
  $this
    ->_findClass($finder, 'menu_block_Abc_Def', array(
    'sites/all/modules/contrib/menu_block/lib/Abc/Def.php',
  ));
  $this
    ->assert(print_r($finder, TRUE) === $finder_str, "Finder configuration may not change during the process.");

  // $this->assert(TRUE, '<pre>' . print_r($finder, TRUE) . '</pre>');
}