Permalink
Browse files

remove zendtest

  • Loading branch information...
1 parent fc69a35 commit 7c077f5c48dbed22f056e05306fe77445807e7e7 @bakura10 committed Jun 28, 2013
Showing with 13 additions and 9 deletions.
  1. +13 −9 tests/_autoload.php
View
@@ -3,12 +3,16 @@
* Setup autoloading
*/
-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();
+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();
+}

0 comments on commit 7c077f5

Please sign in to comment.