title: PHPUnit displays Maximum function nesting level of '100' reached, aborting
body: <p>i'm new to unit test and i'm trying to make work a first test !</p>
  
  <p>I get this long error twice:</p>
  
  <pre><code>    Fatal Error :Maximum function nesting level of '100' reached, aborting in
   C:\wamp\www\portailmg\dev\library\Zend\Test\PHPUnit\ControllerTestCase.php on line 27
      9
  </code></pre>
  
  <p>My bootstrap.php:</p>
  
  <pre><code>   &lt;?php
  
  error_reporting( E_ALL | E_STRICT );
  ini_set('display_startup_errors', 1);
  ini_set('display_errors', 1);
  date_default_timezone_set('Europe/London');
  
  
  
  define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../applications/portail'));
  define('APPLICATION_ENV', 'development');
  define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/../library'));
  define('TESTS_PATH', realpath(dirname(__FILE__)));
  
  
  $_SERVER['SERVER_NAME'] = 'http://localhost';
  
  $includePaths = array(LIBRARY_PATH, get_include_path());
  set_include_path(implode(PATH_SEPARATOR, $includePaths));
  
  require_once 'Zend/Loader/Autoloader.php';
  $loader = Zend_Loader_Autoloader::getInstance();
  
  
  
  Zend_Session::$_unitTestEnabled = true;
  Zend_Session::start();
  </code></pre>
  
  <p>my phpunit.xml:</p>
  
  <pre><code>&lt;phpunit bootstrap="./bootstrap.php" colors="false"&gt;
      &lt;testsuite name="MyApp"&gt;
          &lt;directory&gt;./application/&lt;/directory&gt;
          &lt;directory&gt;./library/&lt;/directory&gt;
      &lt;/testsuite&gt;
      &lt;filter&gt;
          &lt;whitelist&gt;
              &lt;directory suffix=".php"&gt;../application&lt;/directory&gt;
              &lt;directory suffix=".php"&gt;../library/Custom&lt;/directory&gt;
              &lt;exclude&gt;
                  &lt;directory suffix=".phtml"&gt;../application/views&lt;/directory&gt;
                  &lt;file&gt;../application/Bootstrap.php&lt;/file&gt;
              &lt;/exclude&gt;
          &lt;/whitelist&gt;
      &lt;/filter&gt;
      &lt;logging&gt;
          &lt;log type="coverage-html" target="./log/coverage" charset="UTF-8"
               yui="true" highlight="false" lowUpperBound="35" highLowerBound="70"/&gt;
      &lt;/logging&gt;
  &lt;/phpunit&gt;
  </code></pre>
  
  <p>ControllerTestCase.php</p>
  
  <pre><code>&lt;?php
  class ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase
  {
      public $application;
  
      public function setUp()
      {
          $this-&gt;application = new Zend_Application(
              APPLICATION_ENV,
              APPLICATION_PATH . '\configs\application.ini'
          );
  
          $this-&gt;bootstrap = array($this, 'bootstrap');
          parent::setUp();
  
      }
  
      public function tearDown()
      {
          Zend_Controller_Front::getInstance()-&gt;resetInstance();
          $this-&gt;resetRequest();
          $this-&gt;resetResponse();
  
          $this-&gt;request-&gt;setPost(array());
          $this-&gt;request-&gt;setQuery(array());
      }
  
  }
  ?&gt;
  </code></pre>
  
  <p>HomeControllerTest.php</p>
  
  <pre><code>&lt;?php
  
  require_once 'application/ControllerTestCase.php';
  require_once 'application/controllers/HomeControllerTest.php';
  
  class HomeControllerTest extends ControllerTestCase
  {
      public function testLoginAction()
      {
          $this-&gt;dispatch('/index/logincra'); //distribuer l'URL à tester en utilisant la méthode dispatch()
          $this-&gt;assertController('index'); //spécifie le controller à tester
          $this-&gt;assertAction('logincra'); //spécifie l'action à tester
  
  
  
  
          /*
              Assert against DOM selection; should contain exact number of nodes
  
              param: string $path CSS selector path
              param: string $count Number of nodes that should match
              param: string $message
              return: void
          */
  
          $this-&gt;assertQueryCount('div.login', 1);
      }
  
      public function testlogincraAction()
      {
          $this-&gt;getRequest()
          -&gt;setMethod('POST')
          -&gt;setPost(array("username" =&gt; "example@example.com",
                                         "password" =&gt; "password"));
          $this-&gt;dispatch('/index/logincra');
  
          $oLdap = new Mediagong_Ldap_Connect($_POST["username"], $_POST["password"]);
  
          $this-&gt;assertEquals($oLdap-&gt;isLoggin(), true);
          $this-&gt;assertRedirectTo('/index');
      }
  }
  </code></pre>
  
  <p>Arborescence:</p>
  
  <pre><code>dev
    applications
        portail  
           configs
           controllers
           layouts
           models
           services
           views
           Bootstrap.php
    htdocs
    ..
    ..
    tests
        application
          controllers
          controllerTestCase.php
        library
        log
        bootstrap.php
        phpunit.xml
  </code></pre>
  
  <p>Thanks in advance for your help</p>