I am trying to reuse test classes from another module into my current module. My directory structure looks like:
Home/ Module.php config/ module.config.php src/ Home/ <code files> test/ phpunit.xml bootstrap.php HomeTest/ <test code files> Loader/ Module.php config/ module.config.php src/ Loader/ <code files> test/ phpunit.xml bootstrap.php LoaderTest/ <test code files> I am running phpunit test classes in Loader/test/ folder and need to reuse classes from Home/test/Hometest/Model.
I tried using this in my bootstrap file:
AutoloaderFactory::factory( array( 'Zend\Loader\StandardAutoloader' => array( 'autoregister_zf' => true, 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__, 'HomeTest' => __DIR__ . '/Home/test/HomeTest', ), ), ) ); I am getting this error with the above loading mechanism:
Fatal error: Class 'HomeTest\Model\UserTableTest' not found