Пример #1
0
 /**
  * Bootstraps composer-autoloader
  */
 protected function loadComposerAutoloader()
 {
     $path = $this->directoryFinder->getVendorDir() . '/autoload.php';
     if (file_exists($path)) {
         $this->composerClassLoader = (require $path);
     }
 }
Пример #2
0
 public function testFindDirectories_WhenModuleIsInstalledInSubdirectory()
 {
     $directoryStructure = array('www' => array('oxseo.php' => '', 'modules' => array('subdir' => array('testmodule' => array('tests' => array()))), 'vendor' => array('composer' => array('autoload_classmap.php' => ''))));
     $finder = new DirectoryFinder($this->setUpFilesystem($directoryStructure) . '/www/modules/subdir/testmodule/tests');
     $this->assertEquals("vfs://project/www", $finder->getShopBaseDir(), 'Expected shop-base-dir is not correct.');
     $this->assertEquals("vfs://project/www/modules/subdir/testmodule", $finder->getModuleDir(), 'Expected module-dir is not correct.');
     $this->assertEquals("vfs://project/www/modules/subdir/testmodule/tests", $finder->getTestDir(), 'Expected test-dir is not correct.');
     $this->assertEquals("vfs://project/www/vendor", $finder->getVendorDir(), 'Expected vendor-dir is not correct.');
 }