예제 #1
0
<?php

use Drupal\Composer\ClassLoader\AutoloaderBootstrap;
// Load Composer's autoloader.
$loader = (require __DIR__ . '/../../autoload.php');
$autoloader_init = new AutoloaderBootstrap($loader);
$autoloader_init->register();
 /**
  * Tests the ::getClassLoader method.
  *
  * @covers ::getClassLoader()
  */
 public function test_getClassLoader()
 {
     $loader = m::mock('\\Composer\\Autoload\\ClassLoader');
     $autoloader = new AutoloaderBootstrap($loader, 'data/docroot/sites/all/modules/testmodule/composer.json');
     $this->assertEquals($loader, $autoloader->getClassLoader());
 }