title: PHPUnit: Failed asserting last controller used <"error">
body: <p>I am working on a ZF project wich use a postgre database, on my local server (ubuntu 10.04 LTS Lucid Lynx).<br>
  I'm trying to run a very simple test with phpunit:</p>
  
  <pre><code>    public function testIndexAction() {
          $this->dispatch('/');  
          $this->assertController('index');  
          $this->assertAction('index');  
          $this->assertModule('default');  
          $this->assertXpathContentContains('/html/body/div[1]/div[@id=\'content\']/p', 'Los puntos de mis amigos son mis amigos..');  
      }</code></pre>
  
  <p>but it fails on the first assertion with this message:<blockquote>Failed asserting last controller used &lt;"error"> was "index"</blockquote>
  I found this <a href="https://stackoverflow.com/questions/3109227/zend-test-assert-controller-failed">question</a> where the author had the same problem: he solved it by adding to his 2nd php.ini the php_pdo_pgsql.dll library. But he's on windows and using xampp.<br>
  Anyway I checked it: the <strong>/etc/php5/apache2/php.ini</strong> has those 3 lines:<pre><code>extension=msql.so
  extension=pgsql.so
  extension=pdo_pgsql.so</code></pre> and I added them in the other php.ini file I found: <strong>/etc/php5/cli/php.ini</strong> and now when I run the test it says:<pre>PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/msql.so' - /usr/lib/php5/20090626+lfs/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_pgsql.so' - /usr/lib/php5/20090626+lfs/pdo_pgsql.so: undefined symbol: php_pdo_register_driver in Unknown on line 0
  PHP Warning:  Module 'pgsql' already loaded in Unknown on line 0
  </pre>and now I''m really out of ideas...<br>
  Can anyone point me in the right direction?<br>
  thanx</p>