Browse Source

[TESTS] Scrubbed test suite to ensure it can run with or without output buffering, and so that no tests fail when run as a full suite

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16933 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 years ago
parent
commit
35e31aa14c
31 changed files with 287 additions and 185 deletions
  1. 2 2
      library/Zend/Console/Getopt.php
  2. 5 2
      library/Zend/Controller/Request/Http.php
  3. 3 1
      library/Zend/Session/SaveHandler/DbTable.php
  4. 3 3
      library/Zend/Validate/Digits.php
  5. 1 1
      library/Zend/View/Helper/HeadMeta.php
  6. 9 5
      library/Zend/Wildfire/Channel/HttpHeaders.php
  7. 31 0
      tests/AllTests.php
  8. 41 8
      tests/Zend/AllTests.php
  9. 1 0
      tests/Zend/Console/GetoptTest.php
  10. 6 0
      tests/Zend/Controller/Request/HttpTest.php
  11. 19 13
      tests/Zend/Filter/DecryptTest.php
  12. 21 14
      tests/Zend/Memory/AccessControllerTest.php
  13. 21 14
      tests/Zend/Memory/MemoryManagerTest.php
  14. 21 14
      tests/Zend/Memory/MemoryTest.php
  15. 2 1
      tests/Zend/OpenId/ProviderTest.php
  16. 14 14
      tests/Zend/OpenIdTest.php
  17. BIN
      tests/Zend/Paginator/_files/test.sqlite
  18. 35 37
      tests/Zend/Session/SaveHandler/DbTableTest.php
  19. 13 30
      tests/Zend/Soap/AutoDiscoverTest.php
  20. 1 2
      tests/Zend/Soap/ServerTest.php
  21. 2 3
      tests/Zend/Soap/WsdlTest.php
  22. 14 7
      tests/Zend/View/Helper/ActionTest.php
  23. 8 2
      tests/Zend/View/Helper/HeadMetaTest.php
  24. 1 1
      tests/Zend/View/Helper/PaginationControlTest.php
  25. 1 1
      tests/Zend/View/Helper/_files/modules/default/controllers/ActionBarController.php
  26. 1 1
      tests/Zend/View/Helper/_files/modules/default/controllers/ActionFooController.php
  27. 0 0
      tests/Zend/View/Helper/_files/modules/default/views/scripts/action-bar/baz.phtml
  28. 0 0
      tests/Zend/View/Helper/_files/modules/default/views/scripts/action-foo/bar.phtml
  29. 0 0
      tests/Zend/View/Helper/_files/modules/default/views/scripts/action-foo/baz.phtml
  30. 1 1
      tests/Zend/View/Helper/_files/modules/default/views/scripts/partialActionCall.phtml
  31. 10 8
      tests/Zend/Wildfire/WildfireTest.php

+ 2 - 2
library/Zend/Console/Getopt.php

@@ -169,7 +169,7 @@ class Zend_Console_Getopt
         self::CONFIG_RULEMODE   => self::MODE_ZEND,
         self::CONFIG_DASHDASH   => true,
         self::CONFIG_IGNORECASE => false,
-        self::CONFIG_PARSEALL => true
+        self::CONFIG_PARSEALL   => true,
     );
 
     /**
@@ -243,7 +243,7 @@ class Zend_Console_Getopt
     {
         if (!isset($_SERVER['argv'])) {
             require_once 'Zend/Console/Getopt/Exception.php';
-            if(ini_get('register_argc_argv') == false) {
+            if (ini_get('register_argc_argv') == false) {
                 throw new Zend_Console_Getopt_Exception(
                     "argv is not available, because ini option 'register_argc_argv' is set Off"
                 );

+ 5 - 2
library/Zend/Controller/Request/Http.php

@@ -499,7 +499,8 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
                 return $this;
             }
 
-            if (!strpos($requestUri, basename($baseUrl))) {
+            $basename = basename($baseUrl);
+            if (empty($basename) || !strpos($requestUri, $basename)) {
                 // no match whatsoever; set it blank
                 $this->_baseUrl = '';
                 return $this;
@@ -543,7 +544,9 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
     public function setBasePath($basePath = null)
     {
         if ($basePath === null) {
-            $filename = basename($_SERVER['SCRIPT_FILENAME']);
+            $filename = (isset($_SERVER['SCRIPT_FILENAME']))
+                      ? basename($_SERVER['SCRIPT_FILENAME'])
+                      : '';
 
             $baseUrl = $this->getBaseUrl();
             if (empty($baseUrl)) {

+ 3 - 1
library/Zend/Session/SaveHandler/DbTable.php

@@ -49,7 +49,9 @@ require_once 'Zend/Config.php';
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Session_SaveHandler_DbTable extends Zend_Db_Table_Abstract implements Zend_Session_SaveHandler_Interface
+class Zend_Session_SaveHandler_DbTable 
+    extends Zend_Db_Table_Abstract 
+    implements Zend_Session_SaveHandler_Interface
 {
     const PRIMARY_ASSIGNMENT                   = 'primaryAssignment';
     const PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH = 'sessionSavePath';

+ 3 - 3
library/Zend/Validate/Digits.php

@@ -35,9 +35,9 @@ require_once 'Zend/Validate/Abstract.php';
  */
 class Zend_Validate_Digits extends Zend_Validate_Abstract
 {
-    const INVALID      = 'digitsInvalid';
     const NOT_DIGITS   = 'notDigits';
     const STRING_EMPTY = 'stringEmpty';
+    const INVALID      = 'digitsInvalid';
 
     /**
      * Digits filter used for validation
@@ -52,9 +52,9 @@ class Zend_Validate_Digits extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::INVALID      => "Invalid type given, value should be string, integer or float",
         self::NOT_DIGITS   => "'%value%' contains not only digit characters",
-        self::STRING_EMPTY => "'%value%' is an empty string"
+        self::STRING_EMPTY => "'%value%' is an empty string",
+        self::INVALID      => "Invalid type given, value should be string, integer or float",
     );
 
     /**

+ 1 - 1
library/Zend/View/Helper/HeadMeta.php

@@ -333,7 +333,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
         $this->getContainer()->ksort();
         try {
             foreach ($this as $item) {
-            $items[] = $this->itemToString($item);
+                $items[] = $this->itemToString($item);
             }
         } catch (Zend_View_Exception $e) {
             trigger_error($e->getMessage(), E_USER_WARNING);

+ 9 - 5
library/Zend/Wildfire/Channel/HttpHeaders.php

@@ -265,14 +265,18 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract
     {
         if (!$forceCheckRequest
             && !$this->_request
-            && !$this->_response) {
-        
+            && !$this->_response
+        ) {
             return true;
         }
 
-        return ($this->getResponse()->canSendHeaders() &&
-                preg_match_all('/\s?FirePHP\/([\.|\d]*)\s?/si',
-                               $this->getRequest()->getHeader('User-Agent'),$m));
+        return ($this->getResponse()->canSendHeaders() 
+                && preg_match_all(
+                    '/\s?FirePHP\/([\.|\d]*)\s?/si',
+                    $this->getRequest()->getHeader('User-Agent'),
+                    $m
+                )
+        );
     }
 
 

+ 31 - 0
tests/AllTests.php

@@ -48,9 +48,40 @@ class AllTests
             setlocale(LC_ALL, TESTS_ZEND_LOCALE_FORMAT_SETLOCALE);
         }
 
+        // Run buffered tests as a separate suite first
+        ob_start();
+        PHPUnit_TextUI_TestRunner::run(self::suiteBuffered(), $parameters);
+        if (ob_get_level()) {
+            ob_end_flush();
+        }
+
         PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
     }
 
+    /**
+     * Buffered test suites
+     *
+     * These tests require no output be sent prior to running as they rely
+     * on internal PHP functions.
+     * 
+     * @return PHPUnit_Framework_TestSuite
+     */
+    public static function suiteBuffered()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Buffered');
+
+        $suite->addTest(Zend_AllTests::suiteBuffered());
+
+        return $suite;
+    }
+
+    /**
+     * Regular suite
+     *
+     * All tests except those that require output buffering.
+     * 
+     * @return PHPUnit_Framework_TestSuite
+     */
     public static function suite()
     {
         $suite = new PHPUnit_Framework_TestSuite('Zend Framework');

+ 41 - 8
tests/Zend/AllTests.php

@@ -111,13 +111,54 @@ class Zend_AllTests
 {
     public static function main()
     {
+        // Run buffered tests as a separate suite first
+        ob_start();
+        PHPUnit_TextUI_TestRunner::run(self::suiteBuffered());
+        if (ob_get_level()) {
+            ob_end_flush();
+        }
+
         PHPUnit_TextUI_TestRunner::run(self::suite());
     }
 
+    /**
+     * Buffered test suites
+     *
+     * These tests require no output be sent prior to running as they rely
+     * on internal PHP functions.
+     * 
+     * @return PHPUnit_Framework_TestSuite
+     */
+    public static function suiteBuffered()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend - Buffered Test Suites');
+
+        // These tests require no output be sent prior to running as they rely 
+        // on internal PHP functions
+        $suite->addTestSuite('Zend_OpenIdTest');
+        $suite->addTest(Zend_OpenId_AllTests::suite());
+        $suite->addTest(Zend_Session_AllTests::suite());
+        $suite->addTest(Zend_Soap_AllTests::suite());
+
+        return $suite;
+    }
+
+    /**
+     * Regular suite
+     *
+     * All tests except those that require output buffering.
+     * 
+     * @return PHPUnit_Framework_TestSuite
+     */
     public static function suite()
     {
         $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend');
 
+        // Running this early to ensure that the test suite hasn't used too 
+        // much memory by the time it gets to this test.
+        $suite->addTest(Zend_Memory_AllTests::suite());
+
+        // Start remaining tests...
         $suite->addTestSuite('Zend_AclTest');
         $suite->addTest(Zend_Amf_AllTests::suite());
         $suite->addTest(Zend_Application_AllTests::suite());
@@ -154,11 +195,8 @@ class Zend_AllTests
         $suite->addTest(Zend_Log_AllTests::suite());
         $suite->addTestSuite('Zend_MailTest');
         $suite->addTest(Zend_Measure_AllTests::suite());
-        $suite->addTest(Zend_Memory_AllTests::suite());
         $suite->addTestSuite('Zend_MimeTest');
         $suite->addTest(Zend_Mime_AllTests::suite());
-        $suite->addTestSuite('Zend_OpenIdTest');
-        $suite->addTest(Zend_OpenId_AllTests::suite());
         $suite->addTest(Zend_Paginator_AllTests::suite());
         $suite->addTest(Zend_Pdf_AllTests::suite());
         $suite->addTestSuite('Zend_RegistryTest');
@@ -167,11 +205,6 @@ class Zend_AllTests
         $suite->addTest(Zend_Search_Lucene_AllTests::suite());
         $suite->addTest(Zend_Server_AllTests::suite());
         $suite->addTest(Zend_Service_AllTests::suite());
-// Commenting out temporarily; Zend_Session tests fail unless output buffering is enabled, 
-// but ob masks other issues, leads to large memory usage, and gives no 
-// feedback when segfaults happen.
-//        $suite->addTest(Zend_Session_AllTests::suite());
-        $suite->addTest(Zend_Soap_AllTests::suite());
         $suite->addTest(Zend_Tag_AllTests::suite());
         $suite->addTest(Zend_Test_AllTests::suite());
         $suite->addTest(Zend_Text_AllTests::suite());

+ 1 - 0
tests/Zend/Console/GetoptTest.php

@@ -47,6 +47,7 @@ class Zend_Console_GetoptTest extends PHPUnit_Framework_TestCase
         if(ini_get('register_argc_argv') == false) {
             $this->markTestSkipped("Cannot Test Zend_Console_Getopt without 'register_argc_argv' ini option true.");
         }
+        $_SERVER['argv'] = array('getopttest');
     }
 
     public function testGetoptShortOptionsGnuMode()

+ 6 - 0
tests/Zend/Controller/Request/HttpTest.php

@@ -37,6 +37,10 @@ class Zend_Controller_Request_HttpTest extends PHPUnit_Framework_TestCase
         $this->_origServer = $_SERVER;
         $_GET  = array();
         $_POST = array();
+        $_SERVER = array(
+            'SCRIPT_FILENAME' => __FILE__,
+            'PHP_SELF'        => __FILE__,
+        );
         $this->_request = new Zend_Controller_Request_Http('http://framework.zend.com/news/3?var1=val1&var2=val2#anchor');
     }
 
@@ -94,6 +98,7 @@ class Zend_Controller_Request_HttpTest extends PHPUnit_Framework_TestCase
                 break;
             }
         }
+        $_SERVER['REQUEST_TIME'] = date('Y-m-d H:i:s');
 
         $this->assertEquals('bar', $this->_request->foo);
         $this->assertEquals('val1', $this->_request->var1);
@@ -134,6 +139,7 @@ class Zend_Controller_Request_HttpTest extends PHPUnit_Framework_TestCase
                 break;
             }
         }
+        $_SERVER['REQUEST_TIME'] = date('Y-m-d H:i:s');
 
         $this->assertTrue(isset($this->_request->foo));
         $this->assertTrue(isset($this->_request->var1));

+ 19 - 13
tests/Zend/Filter/DecryptTest.php

@@ -146,12 +146,15 @@ d/fxzPfuO/bLpADozTAnYT9Hu3wPrQVLeAfCp0ojqH7DYg==
         $filter = new Zend_Filter_Decrypt(array('adapter' => 'Mcrypt', 'key' => 'testkey'));
         $filter->setVector('testvect');
         $this->assertEquals(
-            array('key' => 'testkey',
-                  'algorithm' => MCRYPT_BLOWFISH,
-                  'algorithm_directory' => '',
-                  'mode' => MCRYPT_MODE_CBC,
-                  'mode_directory' => '',
-                  'vector' => 'testvect'),
+            array(
+                'key'                 => 'testkey',
+                'algorithm'           => MCRYPT_BLOWFISH,
+                'algorithm_directory' => '',
+                'mode'                => MCRYPT_MODE_CBC,
+                'mode_directory'      => '',
+                'vector'              => 'testvect',
+                'salt'                => '',
+            ),
             $filter->getEncryption()
         );
     }
@@ -173,12 +176,15 @@ d/fxzPfuO/bLpADozTAnYT9Hu3wPrQVLeAfCp0ojqH7DYg==
             array('mode' => MCRYPT_MODE_ECB,
                   'algorithm' => MCRYPT_3DES));
         $this->assertEquals(
-            array('key' => 'testkey',
-                  'algorithm' => MCRYPT_3DES,
-                  'algorithm_directory' => '',
-                  'mode' => MCRYPT_MODE_ECB,
-                  'mode_directory' => '',
-                  'vector' => 'testvect'),
+            array(
+                'mode'                => MCRYPT_MODE_ECB,
+                'algorithm'           => MCRYPT_3DES,
+                'key'                 => 'testkey',
+                'algorithm_directory' => '',
+                'mode_directory'      => '',
+                'vector'              => 'testvect',
+                'salt'                => '',
+            ),
             $filter->getEncryption()
         );
     }
@@ -356,4 +362,4 @@ class TestAdapter
         $this->assertEquals('teststring', trim($input));
     }
 }
-*/
+*/

+ 21 - 14
tests/Zend/Memory/AccessControllerTest.php

@@ -57,24 +57,31 @@ class Zend_Memory_Container_AccessControllerTest extends PHPUnit_Framework_TestC
     public function setUp()
     {
         $tmpDir = sys_get_temp_dir() . '/zend_memory';
-        if (file_exists($tmpDir)) {
-            if (!rmdir($tmpDir)) {
-                $dir = new DirectoryIterator($tmpDir);
-                foreach ($dir as $file) {
-                    if (!$file->isDir()) {
-                        unlink($file->getPathname());
-                    }
-                }
-                if (!rmdir($tmpDir)) {
-                    throw new Exception('Unable to remove temporary directory ' . $tmpDir
-                                      . '; perhaps it has a nested structure?');
-                }
-            }
-        }
+        $this->_removeCacheDir($tmpDir);
         mkdir($tmpDir);
         $this->cacheDir = $tmpDir;
     }
 
+    protected function _removeCacheDir($dir) 
+    {
+        if (!file_exists($dir)) {
+            return true;
+        }
+
+        if (!is_dir($dir) || is_link($dir)) {
+            return unlink($dir);
+        }
+
+        foreach (scandir($dir) as $item) {
+            if ($item == '.' || $item == '..') {
+                continue;
+            }
+            $this->_removeCacheDir($dir . '/' . $item);
+        }
+
+        return rmdir($dir);
+    }
+
     /**
      * Retrieve memory manager
      *

+ 21 - 14
tests/Zend/Memory/MemoryManagerTest.php

@@ -50,24 +50,31 @@ class Zend_Memory_MemoryManagerTest extends PHPUnit_Framework_TestCase
     public function setUp()
     {
         $tmpDir = sys_get_temp_dir() . '/zend_memory';
-        if (file_exists($tmpDir)) {
-            if (!rmdir($tmpDir)) {
-                $dir = new DirectoryIterator($tmpDir);
-                foreach ($dir as $file) {
-                    if (!$file->isDir()) {
-                        unlink($file->getPathname());
-                    }
-                }
-                if (!rmdir($tmpDir)) {
-                    throw new Exception('Unable to remove temporary directory ' . $tmpDir
-                                      . '; perhaps it has a nested structure?');
-                }
-            }
-        }
+        $this->_removeCacheDir($tmpDir);
         mkdir($tmpDir);
         $this->cacheDir = $tmpDir;
     }
 
+    protected function _removeCacheDir($dir) 
+    {
+        if (!file_exists($dir)) {
+            return true;
+        }
+
+        if (!is_dir($dir) || is_link($dir)) {
+            return unlink($dir);
+        }
+
+        foreach (scandir($dir) as $item) {
+            if ($item == '.' || $item == '..') {
+                continue;
+            }
+            $this->_removeCacheDir($dir . '/' . $item);
+        }
+
+        return rmdir($dir);
+    }
+
     /**
      * tests the Memory Manager creation
      *

+ 21 - 14
tests/Zend/Memory/MemoryTest.php

@@ -50,24 +50,31 @@ class Zend_Memory_MemoryTest extends PHPUnit_Framework_TestCase
     public function setUp()
     {
         $tmpDir = sys_get_temp_dir() . '/zend_memory';
-        if (file_exists($tmpDir)) {
-            if (!rmdir($tmpDir)) {
-                $dir = new DirectoryIterator($tmpDir);
-                foreach ($dir as $file) {
-                    if (!$file->isDir()) {
-                        unlink($file->getPathname());
-                    }
-                }
-                if (!rmdir($tmpDir)) {
-                    throw new Exception('Unable to remove temporary directory ' . $tmpDir
-                                      . '; perhaps it has a nested structure?');
-                }
-            }
-        }
+        $this->_removeCacheDir($tmpDir);
         mkdir($tmpDir);
         $this->cacheDir = $tmpDir;
     }
 
+    protected function _removeCacheDir($dir) 
+    {
+        if (!file_exists($dir)) {
+            return true;
+        }
+
+        if (!is_dir($dir) || is_link($dir)) {
+            return unlink($dir);
+        }
+
+        foreach (scandir($dir) as $item) {
+            if ($item == '.' || $item == '..') {
+                continue;
+            }
+            $this->_removeCacheDir($dir . '/' . $item);
+        }
+
+        return rmdir($dir);
+    }
+
     /**
      * tests the Memory Manager creation
      *

+ 2 - 1
tests/Zend/OpenId/ProviderTest.php

@@ -50,8 +50,9 @@ class Zend_OpenId_ProviderTest extends PHPUnit_Framework_TestCase
 
     private $_user;
 
-    public function __construct()
+    public function __construct($name = NULL, array $data = array(), $dataName = '')
     {
+        parent::__construct($name, $data, $dataName);
         $this->_user = new Zend_OpenId_Provider_User_Session();
     }
 

+ 14 - 14
tests/Zend/OpenIdTest.php

@@ -49,26 +49,26 @@ require_once 'Zend/OpenId/ResponseHelper.php';
  * @subpackage UnitTests
  */
 class Zend_OpenIdTest extends PHPUnit_Framework_TestCase
-{
-    private $_serverVariables;
-
-    public function setUp()
-    {
-        $this->_serverVariables = $_SERVER;
-    }
-
-    public function tearDown()
-    {
-        $_SERVER = $this->_serverVariables;
-    }
-
+{
+    private $_serverVariables;
+
+    public function setUp()
+    {
+        $this->_serverVariables = $_SERVER;
+    }
+
+    public function tearDown()
+    {
+        $_SERVER = $this->_serverVariables;
+    }
+
 
     /**
      * testing testSelfUrl
      *
      */
     public function testSelfUrl()
-    {
+    {
         unset($_SERVER['SCRIPT_URI']);
         unset($_SERVER['HTTPS']);
         unset($_SERVER['HTTP_HOST']);

BIN
tests/Zend/Paginator/_files/test.sqlite


+ 35 - 37
tests/Zend/Session/SaveHandler/DbTableTest.php

@@ -65,14 +65,14 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
     /**
      * @var Zend_Db_Adapter_Abstract
      */
-    protected $_db;
-
-    /**
-     * Array to collect used Zend_Session_SaveHandler_DbTable objects, so they are not
-     * destroyed before all tests are done and session is not closed
-     *
-     * @var array
-     */
+    protected $_db;
+
+    /**
+     * Array to collect used Zend_Session_SaveHandler_DbTable objects, so they are not
+     * destroyed before all tests are done and session is not closed
+     *
+     * @var array
+     */
     protected $_usedSaveHandlers = array();
 
     /**
@@ -97,7 +97,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
     public function testConfigPrimaryAssignmentFullConfig()
     {
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($this->_saveHandlerTableConfig);
         /**
          * @todo Test something other than that an exception is not thrown
@@ -107,7 +107,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
     public function testConstructorThrowsExceptionGivenConfigAsNull()
     {
         try {
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable(null);
             $this->fail('Expected Zend_Session_SaveHandler_Exception not thrown');
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -117,11 +117,9 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
     public function testTableNameSchema()
     {
-        //this is thrown AFTER what we want to test...
-        $this->setExpectedException('Zend_Db_Statement_Exception');
         $config = $this->_saveHandlerTableConfig;
         $config['name'] = 'schema.session';
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
     }
 
@@ -132,7 +130,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         try {
             $savePath = ini_get('session.save_path');
             ini_set('session.save_path', dirname(__FILE__));
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -150,7 +148,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config['primary'] = array('id');
         $config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]
             = Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT_SESSION_SAVE_PATH;
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is thrown
@@ -163,7 +161,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config['primary'] = array('id');
         $config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]
             = Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT_SESSION_ID;
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is not thrown
@@ -175,7 +173,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $this->setExpectedException('Zend_Session_SaveHandler_Exception');
         $config = $this->_saveHandlerTableConfig;
         unset($config[Zend_Session_SaveHandler_DbTable::MODIFIED_COLUMN]);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is thrown
@@ -187,7 +185,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $this->setExpectedException('Zend_Session_SaveHandler_Exception');
         $config = $this->_saveHandlerTableConfig;
         unset($config[Zend_Session_SaveHandler_DbTable::LIFETIME_COLUMN]);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is thrown
@@ -199,7 +197,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $this->setExpectedException('Zend_Session_SaveHandler_Exception');
         $config = $this->_saveHandlerTableConfig;
         unset($config[Zend_Session_SaveHandler_DbTable::DATA_COLUMN]);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is thrown
@@ -212,7 +210,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         try {
             $config = $this->_saveHandlerTableConfig;
             array_pop($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -228,7 +226,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config = $this->_saveHandlerTableConfig;
         unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
         $config['primary'] = $config['primary'][0];
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         /**
          * @todo Test something other than that an exception is not thrown
@@ -243,7 +241,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
             $config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT] = array(
                 Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT_SESSION_NAME,
             );
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -260,7 +258,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
             $config = $this->_saveHandlerTableConfig;
             unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
             unset($config[Zend_Session_SaveHandler_DbTable::MODIFIED_COLUMN]);
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -277,7 +275,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
             $config = $this->_saveHandlerTableConfig;
             unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
             unset($config[Zend_Session_SaveHandler_DbTable::LIFETIME_COLUMN]);
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -294,7 +292,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
             $config = $this->_saveHandlerTableConfig;
             unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
             unset($config[Zend_Session_SaveHandler_DbTable::DATA_COLUMN]);
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
             $this->fail();
         } catch (Zend_Session_SaveHandler_Exception $e) {
@@ -308,7 +306,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
     {
         $config = $this->_saveHandlerTableConfig;
         unset($config['lifetime']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         $this->assertSame($saveHandler->getLifetime(), (int) ini_get('session.gc_maxlifetime'),
             'lifetime must default to session.gc_maxlifetime'
@@ -316,7 +314,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
         $config = $this->_saveHandlerTableConfig;
         $lifetime = $config['lifetime'] = 1242;
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         $this->assertSame($lifetime, $saveHandler->getLifetime());
     }
@@ -326,7 +324,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         try {
             $config = $this->_saveHandlerTableConfig;
             $config['overrideLifetime'] = true;
-            $this->_usedSaveHandlers[] =
+            $this->_usedSaveHandlers[] =
                 $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         } catch (Zend_Session_SaveHandler_Exception $e) {
             /**
@@ -347,7 +345,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
         $this->_setupDb($config['primary']);
 
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         Zend_Session::setSaveHandler($saveHandler);
         Zend_Session::start();
@@ -381,7 +379,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
         $config['primary'] = array($config['primary'][0]);
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
 
         $id = '242';
@@ -395,7 +393,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
     {
         $config = $this->_saveHandlerTableConfig;
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         $saveHandler->open('savepath', 'sessionname');
 
@@ -412,7 +410,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
         $config['primary'] = array($config['primary'][0]);
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
 
         $id = '242';
@@ -434,7 +432,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config['lifetime'] = 1;
 
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
 
         $id = '242';
@@ -458,7 +456,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config['lifetime'] = 1;
 
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
 
         $id = 242;
@@ -499,7 +497,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
         $config['lifetime'] = 1;
 
         $this->_setupDb($config['primary']);
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
         $this->assertSame(1, $saveHandler->getLifetime());
 
@@ -510,7 +508,7 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
     public function testZendConfig()
     {
-        $this->_usedSaveHandlers[] =
+        $this->_usedSaveHandlers[] =
             $saveHandler = new Zend_Session_SaveHandler_DbTable(new Zend_Config($this->_saveHandlerTableConfig));
         /**
          * @todo Test something other than that an exception is not thrown
@@ -568,4 +566,4 @@ class Zend_Session_SaveHandler_DbTableTestSkip extends PHPUnit_Framework_TestCas
     {
         $this->markTestSkipped('The pdo_sqlite extension must be available and enabled for this test');
     }
-}
+}

+ 13 - 30
tests/Zend/Soap/AutoDiscoverTest.php

@@ -59,7 +59,6 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         ob_start();
         $server->handle();
         $dom->loadXML(ob_get_clean());
-        ob_end_clean();
 
         $wsdl = '<?xml version="1.0"?>'
               . '<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" '
@@ -151,7 +150,6 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         ob_start();
         $server->handle();
         $dom->loadXML(ob_get_clean());
-        ob_end_clean();
 
         $wsdl = '<?xml version="1.0"?>'
               . '<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" '
@@ -310,7 +308,6 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         ob_start();
         $server->handle();
         $dom->loadXML(ob_get_clean());
-        ob_end_clean();
 
         $dom->save(dirname(__FILE__).'/_files/setclass.wsdl');
         $this->assertContains('<message name="testFunc1Out"><part name="return"', $this->sanitizeWsdlXmlOutputForOsCompability($dom->saveXML()));
@@ -331,10 +328,9 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         $dom = new DOMDocument();
         ob_start();
         $server->handle();
-        $dom->loadXML(ob_get_contents());
+        $dom->loadXML(ob_get_clean());
         $dom->save(dirname(__FILE__).'/_files/addfunction.wsdl');
 
-        ob_end_clean();
         $parts = explode('.', basename($_SERVER['SCRIPT_NAME']));
         $name = $parts[0];
 
@@ -377,10 +373,9 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         $dom = new DOMDocument();
         ob_start();
         $server->handle();
-        $dom->loadXML(ob_get_contents());
+        $dom->loadXML(ob_get_clean());
         $dom->save(dirname(__FILE__).'/_files/addfunction.wsdl');
 
-        ob_end_clean();
         $parts = explode('.', basename($_SERVER['SCRIPT_NAME']));
         $name = $parts[0];
 
@@ -429,10 +424,9 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         $dom = new DOMDocument();
         ob_start();
         $server->handle();
-        $dom->loadXML(ob_get_contents());
+        $dom->loadXML(ob_get_clean());
         $dom->save(dirname(__FILE__).'/_files/addfunction.wsdl');
 
-        ob_end_clean();
         $parts = explode('.', basename($_SERVER['SCRIPT_NAME']));
         $name = $parts[0];
 
@@ -461,11 +455,9 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
         $dom = new DOMDocument();
         ob_start();
         $server->handle();
-        $dom->loadXML(ob_get_contents());
+        $dom->loadXML(ob_get_clean());
         $dom->save(dirname(__FILE__).'/_files/addfunction2.wsdl');
 
-        ob_end_clean();
-
         $parts = explode('.', basename($_SERVER['SCRIPT_NAME']));
         $name = $parts[0];
 
@@ -567,8 +559,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertContains($httpsScriptUri, $wsdlOutput);
     }
@@ -585,8 +576,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertNotContains($scriptUri, $wsdlOutput);
         $this->assertContains("http://example.com/service.php", $wsdlOutput);
@@ -605,8 +595,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertNotContains($scriptUri, $wsdlOutput);
         $this->assertContains("http://example.com/service.php", $wsdlOutput);
@@ -636,8 +625,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertNotContains($scriptUri, $wsdlOutput);
         $this->assertContains("http://example.com/service.php", $wsdlOutput);
@@ -646,8 +634,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertNotContains($scriptUri, $wsdlOutput);
         $this->assertNotContains("http://example.com/service.php", $wsdlOutput);
@@ -668,8 +655,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertEquals(1, substr_count($wsdlOutput, '<message name="testFuncIn">'));
         $this->assertEquals(1, substr_count($wsdlOutput, '<message name="testFuncOut">'));
@@ -757,8 +743,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertEquals(1,
             substr_count($wsdlOutput, 'wsdl:arrayType="tns:Zend_Soap_AutoDiscoverTestClass1[]"'),
@@ -788,8 +773,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->handle();
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertEquals(
             $this->sanitizeWsdlXmlOutputForOsCompability($wsdlOutput),
@@ -798,8 +782,7 @@ class Zend_Soap_AutoDiscoverTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $server->dump(false);
-        $wsdlOutput = ob_get_contents();
-        ob_end_clean();
+        $wsdlOutput = ob_get_clean();
 
         $this->assertEquals(
             $this->sanitizeWsdlXmlOutputForOsCompability($wsdlOutput),

+ 1 - 2
tests/Zend/Soap/ServerTest.php

@@ -905,8 +905,7 @@ class Zend_Soap_Server_TestLocalSoapClient extends SoapClient {
     function __doRequest($request, $location, $action, $version) {
         ob_start();
         $this->server->handle($request);
-        $response = ob_get_contents();
-        ob_end_clean();
+        $response = ob_get_clean();
 
         return $response;
     }

+ 2 - 3
tests/Zend/Soap/WsdlTest.php

@@ -464,8 +464,7 @@ class Zend_Soap_WsdlTest extends PHPUnit_Framework_TestCase
 
         ob_start();
         $wsdl->dump();
-        $wsdlDump = ob_get_contents();
-        ob_end_clean();
+        $wsdlDump = ob_get_clean();
 
         $this->assertEquals($this->sanitizeWsdlXmlOutputForOsCompability($wsdlDump),
                             '<?xml version="1.0"?>'  .
@@ -676,4 +675,4 @@ class Zend_Soap_Wsdl_Test {
      * @var string
      */
     public $var2;
-}
+}

+ 14 - 7
tests/Zend/View/Helper/ActionTest.php

@@ -45,10 +45,16 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
+        $this->_origServer = $_SERVER;
+        $_SERVER = array(
+            'SCRIPT_FILENAME' => __FILE__,
+            'PHP_SELF'        => __FILE__,
+        );
+
         $front = Zend_Controller_Front::getInstance();
         $front->resetInstance();
 
-        $this->request  = new Zend_Controller_Request_Http('http://framework.zend.com/foo');
+        $this->request  = new Zend_Controller_Request_Http('http://framework.zend.com/action-foo');
         $this->response = new Zend_Controller_Response_Http();
         $this->response->headersSentThrowsException = false;
         $front->setRequest($this->request)
@@ -69,6 +75,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
     public function tearDown()
     {
         unset($this->request, $this->response, $this->helper);
+        $_SERVER = $this->_origServer;
     }
 
     /**
@@ -102,7 +109,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testResetObjectsClearsRequestVars()
     {
-        $this->helper->request->setParam('foo', 'bar');
+        $this->helper->request->setParam('foo', 'action-bar');
         $this->helper->resetObjects();
         $this->assertNull($this->helper->request->getParam('foo'));
     }
@@ -137,7 +144,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testActionReturnsContentFromDefaultModule()
     {
-        $value = $this->helper->action('bar', 'foo');
+        $value = $this->helper->action('bar', 'action-foo');
         $this->assertContains('In default module, FooController::barAction()', $value);
     }
 
@@ -155,7 +162,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testActionReturnsContentReflectingPassedParams()
     {
-        $value = $this->helper->action('baz', 'foo', null, array('bat' => 'This is my message'));
+        $value = $this->helper->action('baz', 'action-foo', null, array('bat' => 'This is my message'));
         $this->assertNotContains('BOGUS', $value, var_export($this->helper->request->getUserParams(), 1));
         $this->assertContains('This is my message', $value);
     }
@@ -165,7 +172,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testActionReturnsEmptyStringWhenForwardDetected()
     {
-        $value = $this->helper->action('forward', 'foo');
+        $value = $this->helper->action('forward', 'action-foo');
         $this->assertEquals('', $value);
     }
 
@@ -174,7 +181,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testActionReturnsEmptyStringWhenRedirectDetected()
     {
-        $value = $this->helper->action('redirect', 'foo');
+        $value = $this->helper->action('redirect', 'action-foo');
         $this->assertEquals('', $value);
     }
 
@@ -277,7 +284,7 @@ class Zend_View_Helper_ActionTest extends PHPUnit_Framework_TestCase
         // make sure noRender is false
         $this->assertFalse($viewRenderer->getNoRender());
         
-        $value = $this->helper->action('bar', 'foo');
+        $value = $this->helper->action('bar', 'action-foo');
         
         $viewRendererPostAction = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
         

+ 8 - 2
tests/Zend/View/Helper/HeadMetaTest.php

@@ -56,6 +56,7 @@ class Zend_View_Helper_HeadMetaTest extends PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
+        $this->error = false;
         foreach (array(Zend_View_Helper_Placeholder_Registry::REGISTRY_KEY, 'Zend_View_Helper_Doctype') as $key) {
             if (Zend_Registry::isRegistered($key)) {
                 $registry = Zend_Registry::getInstance();
@@ -80,6 +81,11 @@ class Zend_View_Helper_HeadMetaTest extends PHPUnit_Framework_TestCase
         unset($this->helper);
     }
 
+    public function handleErrors($errno, $errstr)
+    {
+        $this->error = $errstr;
+    }
+
     public function testNamespaceRegisteredInPlaceholderRegistryAfterInstantiation()
     {
         $registry = Zend_View_Helper_Placeholder_Registry::getRegistry();
@@ -283,10 +289,10 @@ class Zend_View_Helper_HeadMetaTest extends PHPUnit_Framework_TestCase
     public function testToStringWhenInvalidKeyProvidedShouldConvertThrownException()
     {
         $this->helper->headMeta('some-content', 'tag value', 'not allowed key');
+        set_error_handler(array($this, 'handleErrors'));
         $string = @$this->helper->toString();
         $this->assertEquals('', $string);
-        $errors = error_get_last();
-        $this->assertNotEquals(0, count($errors));
+        $this->assertTrue(is_string($this->error));
     }
 
     public function testHeadMetaHelperCreatesItemEntry()

+ 1 - 1
tests/Zend/View/Helper/PaginationControlTest.php

@@ -43,8 +43,8 @@ class Zend_View_Helper_PaginationControlTest extends PHPUnit_Framework_TestCase
     {
         $view = new Zend_View();
         $view->addBasePath(dirname(__FILE__) . '/_files');
-        $view->addHelperPath('Zend/View/Helper/', 'Zend_View_Helper');
         
+        Zend_View_Helper_PaginationControl::setDefaultViewPartial(null);
         $this->_viewHelper = new Zend_View_Helper_PaginationControl();
         $this->_viewHelper->setView($view);
         $this->_paginator = Zend_Paginator::factory(range(1, 101));

+ 1 - 1
tests/Zend/View/Helper/_files/modules/default/controllers/BarController.php → tests/Zend/View/Helper/_files/modules/default/controllers/ActionBarController.php

@@ -2,7 +2,7 @@
 /** Zend_Controller_Action */
 require_once 'Zend/Controller/Action.php';
 
-class BarController extends Zend_Controller_Action
+class ActionBarController extends Zend_Controller_Action
 {
     public function bazAction()
     {

+ 1 - 1
tests/Zend/View/Helper/_files/modules/default/controllers/FooController.php → tests/Zend/View/Helper/_files/modules/default/controllers/ActionFooController.php

@@ -2,7 +2,7 @@
 /** Zend_Controller_Action */
 require_once 'Zend/Controller/Action.php';
 
-class FooController extends Zend_Controller_Action
+class ActionFooController extends Zend_Controller_Action
 {
     public function barAction()
     {

+ 0 - 0
tests/Zend/View/Helper/_files/modules/default/views/scripts/bar/baz.phtml → tests/Zend/View/Helper/_files/modules/default/views/scripts/action-bar/baz.phtml


+ 0 - 0
tests/Zend/View/Helper/_files/modules/default/views/scripts/foo/bar.phtml → tests/Zend/View/Helper/_files/modules/default/views/scripts/action-foo/bar.phtml


+ 0 - 0
tests/Zend/View/Helper/_files/modules/default/views/scripts/foo/baz.phtml → tests/Zend/View/Helper/_files/modules/default/views/scripts/action-foo/baz.phtml


+ 1 - 1
tests/Zend/View/Helper/_files/modules/default/views/scripts/partialActionCall.phtml

@@ -1,2 +1,2 @@
 <?php 
-$this->action('baz', 'bar', 'default', array('hello' => 'goodby'));
+$this->action('baz', 'action-bar', 'default', array('hello' => 'goodby'));

+ 10 - 8
tests/Zend/Wildfire/WildfireTest.php

@@ -38,11 +38,11 @@ require_once 'Zend/Wildfire/Plugin/FirePhp/Message.php';
 /** Zend_Wildfire_Plugin_FirePhp_TableMessage */
 require_once 'Zend/Wildfire/Plugin/FirePhp/TableMessage.php';
 
-/** Zend_Controller_Request_Http */
-require_once 'Zend/Controller/Request/Http.php';
+/** Zend_Controller_Request_HttpTestCase */
+require_once 'Zend/Controller/Request/HttpTestCase.php';
 
 /** Zend_Controller_Response_Http */
-require_once 'Zend/Controller/Response/Http.php';
+require_once 'Zend/Controller/Response/HttpTestCase.php';
 
 /** Zend_Controller_Front **/
 require_once 'Zend/Controller/Front.php';
@@ -82,6 +82,8 @@ class Zend_Wildfire_WildfireTest extends PHPUnit_Framework_TestCase
     public function setUp()
     {
         date_default_timezone_set('America/Los_Angeles');
+        Zend_Wildfire_Channel_HttpHeaders::destroyInstance();
+        Zend_Wildfire_Plugin_FirePhp::destroyInstance();
     }
 
     public function tearDown()
@@ -93,8 +95,8 @@ class Zend_Wildfire_WildfireTest extends PHPUnit_Framework_TestCase
 
     protected function _setupWithFrontController()
     {
-        $this->_request = new Zend_Wildfire_WildfireTest_Request();
-        $this->_response = new Zend_Wildfire_WildfireTest_Response();
+        $this->_request    = new Zend_Wildfire_WildfireTest_Request();
+        $this->_response   = new Zend_Wildfire_WildfireTest_Response();
         $this->_controller = Zend_Controller_Front::getInstance();
         $this->_controller->resetInstance();
         $this->_controller->setControllerDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files')
@@ -962,7 +964,7 @@ class Zend_Wildfire_WildfireTest_HttpHeadersChannel extends Zend_Wildfire_Channe
 {
 }
 
-class Zend_Wildfire_WildfireTest_Request extends Zend_Controller_Request_Http
+class Zend_Wildfire_WildfireTest_Request extends Zend_Controller_Request_HttpTestCase
 {
 
     protected $_enabled = false;
@@ -971,7 +973,7 @@ class Zend_Wildfire_WildfireTest_Request extends Zend_Controller_Request_Http
         $this->_enabled = $enabled;
     }
 
-    public function getHeader($header)
+    public function getHeader($header, $default = null)
     {
         if ($header == 'User-Agent') {
             if ($this->_enabled) {
@@ -984,7 +986,7 @@ class Zend_Wildfire_WildfireTest_Request extends Zend_Controller_Request_Http
 }
 
 
-class Zend_Wildfire_WildfireTest_Response extends Zend_Controller_Response_Http
+class Zend_Wildfire_WildfireTest_Response extends Zend_Controller_Response_HttpTestCase
 {
 
     public function getHeadersForTesting()