title: Zend Framework & PHPunit path issues?
body: <p>When I extend a ZF class, I get path errors. Here is my test:</p>
  
  <p>
  
  <pre><code>&lt;?php
  require_once ('Zend/Acl.php'); // gives error w/o
  require_once ('../application/models/Acl.php');
  
  class Model_AclTest extends ControllerTestCase
  {
  
      /**
          * @var Model_Acl
          */
      protected $acl;
  
      public function setUp()
      {
          parent::setUp();
          $this-&gt;acl = new Model_Acl(2, 'sims');
      }
  
      public function testHasUsername()
      {
          echo $this-&gt;acl-&gt;username;
          $this-&gt;assert($this-&gt;acl-&gt;username);
      }
  }
  </code></pre>
  
  <p>Here is the Model_Acl class:</p>
  
  <pre><code>class Model_Acl extends Zend_Acl
  {
      private $username;
      private $userid;
      private $userroles;
      private $allroles;
  
      public function __construct($userid, $username)
      {
          if (method_exists(parent, '__construct')) parent::__construct();
          $this-&gt;username = $username;
          $this-&gt;userid = $userid;
          $this-&gt;setRoles();
          $this-&gt;setResources();
          $this-&gt;setPrivilages();
          return $this;
      }
  ...
  }
  </code></pre>
  
  <p>I get this error, unless I require 'Zend/Acl.php'.</p>
  
  <pre><code>PHP Fatal error:  Class 'Zend_Acl' not found in /mnt/dev/mragent/application/models/Acl.php on line 6
  </code></pre>
  
  <p>So I figure maybe something is not quite up to snuff yet, and continue with this slight inconvenience. Then I get the following error from phpunit itself:</p>
  
  <pre><code>1) Model_AclTest::testHasUsername
  Use of undefined constant parent - assumed 'parent'
  
  /mnt/dev/mragent/application/models/Acl.php:14
  /mnt/dev/mragent/tests/application/models/AclTest.php:18
  </code></pre>
  
  <p>So something is really wrong I think. Or I'm doing something really wrong.</p>
  
  <p>How do I set up my path(s) correctly?</p>