Looks like your MachinistController is extending zfcUser's UserController but the autoloading is not kicking in because you haven't specified that particular module's path in your standard autoloader.
In your posted code look for "StandardAutoloader::LOAD_NS" and pass it an array (you are currently passing it null if I'm not mistaken). The array key should be a string with the namespace name, and the array value should be a string with the path to where the autoloader should look for class files. Julian. On Wed, Dec 11, 2013 at 4:04 PM, dennis-fedco <[email protected]>wrote: > I want to write a PHPUnit test for my Controller. > > I have a class MachinistControllerTest.php > <https://gist.github.com/dennis-fedco/7917132> where my concern is on > line > 6. If I remove that line, it causes my test to not work. > > I get this error: > Debug Error: /.../Controller/MachinistController.php line 16 - Class > 'ZfcUser\Controller\UserController' not found > > Line 16 is "class MachinistController extends > \ZfcUser\Controller\UserController" > > So I have the require_once() load ZfcUser's class and then my test works. > It think instead of using require_once() there is a better way. I want to > know what that way is. > > Files that deal with autoloading and configuration options seem to be here > <https://gist.github.com/dennis-fedco/7881658> , but I do not know what > to > change and where. Things I ahve tried did not get me anywhere. > > > > -- > View this message in context: > http://zend-framework-community.634137.n4.nabble.com/Removing-require-once-from-PHPUnit-Tests-tp4661326.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- > List: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > >
