title: How to test my forms in Zend Framework 1.8+?
body: <p>So I've set up testing in my ZF 1.9.5 application thanks to <a href="http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/" rel="nofollow noreferrer">this tutorial</a>, I am able to test my controllers, now I want to create a test for a form. However, I'm having the problem that PHPUnit can't find my form. </p>
  
  <pre><code>Fatal error: Class 'Default_Form_AccountProfile' not found
  </code></pre>
  
  <p>I'm extending <code>PHPUnit_Framework_TestCase</code> instead of <code>Zend_Test_PHPUnit_ControllerTestCase</code> since it is not a controller. Is that the right thing to do? Here is my test: </p>
  
  <pre><code>&lt;?php
  
  class AccountProfileTest extends PHPUnit_Framework_TestCase
  {
      public function testPopulate()
      {
          $form = new Default_Form_AccountProfile();
          $user = array(
              'firstName' =&gt; 'Joe',
              'lastName' =&gt; 'Schmoe'
          );
          $form-&gt;populate($user);
          $this-&gt;assertEquals($form-&gt;getElement('firstName')-&gt;getValue(), 'Joe');
          $this-&gt;assertEquals($form-&gt;getElement('lastName')-&gt;getValue(), 'Schmoe');
      }
  }
  </code></pre>
  
  <p>What am I doing wrong? What would be the correct way to test a form in Zend Framework?</p>