<?phpnamespaceGuestTest;error_reporting(E_ALL);chdir(_DIR_);define('ZF2_PATH','/home/egidio/NetBeansProjects/school_gear/vendor/ZF2');classBootstrap{protectedstatic$serviceManager;publicstaticfunctioninit(){$zf2ModulePaths=array(dirname(dirname(_DIR_)));if(($path=static::findParentPath('vendor'))){$zf2ModulePaths[]=$path;}if(($path=static::findParentPath('module'))!==$zf2ModulePaths[0]){$zf2ModulePaths[]=$path;}}static::initAutoloader();// use ModuleManager to load this module and it's dependencies$config=array('module_listener_options'=>array('module_paths'=>$zf2ModulePaths,),'modules'=>array('Application','Guest'));$serviceManager=new\Zend\ServiceManager\ServiceManager(new\Zend\Mvc\Service\ServiceManagerConfig());$serviceManager->setService('ApplicationConfig',$config);$serviceManager->get('ModuleManager')->loadModules();static::$serviceManager=$serviceManager;}publicstaticfunctiongetServiceManager(){returnstatic::$serviceManager;}protectedstaticfunctioninitAutoloader(){$vendorPath=static::findParentPath('vendor');$zf2Path=getenv('ZF2_PATH');if(!$zf2Path){if(defined('ZF2_PATH')){$zf2Path=ZF2_PATH;}else{if(is_dir($vendorPath.'/ZF2/library')){$zf2Path=$vendorPath.'/ZF2/library';}}}if(!$zf2Path){thrownew\RuntimeException('Unable to load ZF2.');}include$zf2Path.'/Zend/Loader/AutoloaderFactory.php';\Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader'=>array('autoregister_zf'=>true,'namespaces'=>array(_NAMESPACE_=>_DIR_.'/'._NAMESPACE_,),),));}protectedstaticfunctionfindParentPath($path){$dir=_DIR_;$previousDir='.';while(!is_dir($dir.'/'.$path)){$dir=dirname($dir);if($previousDir===$dir)returnfalse;$previousDir=$dir;}return$dir.'/'.$path;}}Bootstrap::init();
Hello.
I'm trying to test a ZF2 application, but I get this error.
This is the phpunit.xml file.
This is the Bootstrap.php file.
This is the LoginControllerTest.php file.