Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Have both composer and standard autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Jun 28, 2013
1 parent 7c077f5 commit b8126fc
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions tests/_autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
* Setup autoloading
*/

if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
include_once __DIR__ . '/../vendor/autoload.php';
} else {
// if composer autoloader is missing, explicitly add the ZF library path
require_once __DIR__ . '/../library/Zend/Loader/StandardAutoloader.php';
$loader = new Zend\Loader\StandardAutoloader(
array(
Zend\Loader\StandardAutoloader::LOAD_NS => array(
'Zend' => __DIR__ . '/../library/Zend'
),
));
$loader->register();
}
include_once __DIR__ . '/../vendor/autoload.php';

require_once __DIR__ . '/../library/Zend/Loader/StandardAutoloader.php';
$loader = new Zend\Loader\StandardAutoloader(
array(
Zend\Loader\StandardAutoloader::LOAD_NS => array(
'Zend' => __DIR__ . '/../library/Zend',
'ZendTest' => __DIR__ . '/ZendTest',
),
));
$loader->register();

0 comments on commit b8126fc

Please sign in to comment.