Bläddra i källkod

Merge pull request #266 from akrabat/remove-phpunit-check

Allow later versions of PHPUnit to run the tests
Frank Brückner 12 år sedan
förälder
incheckning
244267fe75
47 ändrade filer med 221 tillägg och 107 borttagningar
  1. 25 0
      tests/TestConfiguration.php.dist
  2. 0 46
      tests/TestHelper.php
  3. 2 0
      tests/Zend/Application/Resource/SessionTest.php
  4. 1 0
      tests/Zend/Cache/TwoLevelsBackendTest.php
  5. 4 0
      tests/Zend/Db/Table/TestCommon.php
  6. 3 0
      tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php
  7. 1 0
      tests/Zend/Feed/Pubsubhubbub/SubscriberTest.php
  8. 12 0
      tests/Zend/File/ClassFileLocatorTest.php
  9. 2 3
      tests/Zend/Filter/Compress/TarTest.php
  10. 7 7
      tests/Zend/Gdata/EntryLinkTest.php
  11. 7 7
      tests/Zend/Gdata/FeedLinkTest.php
  12. 7 7
      tests/Zend/Gdata/RecurrenceExceptionTest.php
  13. 5 0
      tests/Zend/Ldap/Node/OfflineTest.php
  14. 1 1
      tests/Zend/Loader/AutoloaderTest.php
  15. 4 4
      tests/Zend/LocaleTest.php
  16. 3 0
      tests/Zend/Log/Writer/MailTest.php
  17. 1 0
      tests/Zend/Mail/MailTest.php
  18. 1 0
      tests/Zend/Paginator/Adapter/DbSelectTest.php
  19. 10 0
      tests/Zend/PaginatorTest.php
  20. 12 0
      tests/Zend/Rest/ClientTest.php
  21. 6 0
      tests/Zend/Service/ShortUrl/BitLyTest.php
  22. 6 0
      tests/Zend/Service/ShortUrl/IsGdTest.php
  23. 6 0
      tests/Zend/Service/ShortUrl/JdemCzTest.php
  24. 6 0
      tests/Zend/Service/ShortUrl/MetamarkNetTest.php
  25. 6 0
      tests/Zend/Service/ShortUrl/TinyUrlComTest.php
  26. 7 0
      tests/Zend/Service/Twitter/TwitterTest.php
  27. 5 1
      tests/Zend/Soap/AllTests.php
  28. 3 2
      tests/Zend/Soap/ServerTest.php
  29. 2 0
      tests/Zend/Test/PHPUnit/Db/DataSet/DbRowsetTest.php
  30. 2 0
      tests/Zend/Test/PHPUnit/Db/DataSet/QueryDataSetTest.php
  31. 1 0
      tests/Zend/Test/PHPUnit/Db/DataSet/QueryTableTest.php
  32. 11 2
      tests/Zend/Test/PHPUnit/Db/Integration/AbstractTestCase.php
  33. 3 0
      tests/Zend/Test/PHPUnit/Db/Operation/DeleteAllTest.php
  34. 3 0
      tests/Zend/Test/PHPUnit/Db/Operation/InsertTest.php
  35. 3 0
      tests/Zend/Test/PHPUnit/Db/Operation/TruncateTest.php
  36. 1 0
      tests/Zend/Test/PHPUnit/Db/SimpleTesterTest.php
  37. 1 0
      tests/Zend/Test/PHPUnit/Db/TestCaseTest.php
  38. 1 0
      tests/Zend/Text/FigletTest.php
  39. 7 0
      tests/Zend/VersionTest.php
  40. 0 1
      tests/Zend/View/Helper/HeadScriptTest.php
  41. 0 1
      tests/Zend/View/Helper/HeadStyleTest.php
  42. 1 1
      tests/Zend/View/Helper/Navigation/SitemapTest.php
  43. 4 0
      tests/Zend/XmlRpc/ClientTest.php
  44. 5 2
      tests/Zend/XmlRpc/ServerTest.php
  45. 5 0
      tests/Zend/XmlRpc/ValueTest.php
  46. 14 22
      tests/install_dependencies.sh
  47. 4 0
      tests/runalltests.php

+ 25 - 0
tests/TestConfiguration.php.dist

@@ -582,6 +582,12 @@ defined('TESTS_ZEND_QUEUE_PLATFORMJQ_HOST') || define('TESTS_ZEND_QUEUE_PLATFORM
 defined('TESTS_ZEND_QUEUE_PLATFORMJQ_PASS') || define('TESTS_ZEND_QUEUE_PLATFORMJQ_PASS', false);
 
 /**
+ * Zend_Rest tests
+ */
+defined('TESTS_ZEND_REST_ONLINE_ENABLED') || define('TESTS_ZEND_REST_ONLINE_ENABLED', false);
+
+
+/**
  * Zend_Serializer adapter tests
  *
  * TESTS_ZEND_SERIALIZER_ADAPTER_WDDX_ENABLED:
@@ -679,6 +685,16 @@ defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY') || define('TESTS_ZEN
 defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY', 'private mailhide key');
 
 /**
+ * Zend_Service_ShortUrl tests
+ */
+defined('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED', false);
+
+
+/**
  * Zend_Service_Simpy tests
  */
 defined('TESTS_ZEND_SERVICE_SIMPY_ENABLED') || define('TESTS_ZEND_SERVICE_SIMPY_ENABLED', false);
@@ -837,6 +853,15 @@ defined('TESTS_ZEND_SOAP_AUTODISCOVER_ONLINE_SERVER_BASEURI') || define('TESTS_Z
 defined('TESTS_ZEND_URI_CRASH_TEST_ENABLED') || define('TESTS_ZEND_URI_CRASH_TEST_ENABLED', false);
 
 /**
+ * Zend_Version tests
+ *
+ * Set ONLINE_ENABLED if you wish to run validators that require network
+ * connectivity.
+ */
+defined('TESTS_ZEND_VERSION_ONLINE_ENABLED') || define('TESTS_ZEND_VERSION_ONLINE_ENABLED', false);
+
+
+/**
  * Zend_Validate tests
  *
  * Set ONLINE_ENABLED if you wish to run validators that require network

+ 0 - 46
tests/TestHelper.php

@@ -27,52 +27,6 @@ require_once 'PHPUnit/Runner/Version.php';
 
 $phpunitVersion = PHPUnit_Runner_Version::id();
 if ($phpunitVersion == '@package_version@' || version_compare($phpunitVersion, '3.5.5', '>=')) {
-    if (version_compare($phpunitVersion, '3.6.0', '>=')) {
-        echo <<<EOT
-This version of PHPUnit is not supported in Zend Framework 1.x unit tests.
-
-To install PHPUnit 3.4:
-
-    sudo pear config-set auto_discover 1
-    sudo pear install --installroot /usr/local/phpunit34 pear.phpunit.de/PHPUnit-3.4.15
-
-    This will install PHPUnit-3.4.15 to /usr/local/phpunit34. 
-    
-
-    Now edit /usr/local/phpunit34/usr/bin/phpunit. Before the first 
-    require_once statement in that file, enter the following code:
-
-        set_include_path(implode(PATH_SEPARATOR, array(
-            __DIR__ . '/../share/php',
-            '/usr/share/php',
-            get_include_path()
-        )));
-
-    Note the actual directory (share/php in the code above) depends on your
-    particular installation. The correct path can be found by typing:
-
-        pear config-show|grep php_dir
-
-    (on Centos it is share/php, on Ubuntu/Debian it is share/pear and on
-     OS X it is lib/php/pear)
-
-
-    Lastly, we need a symlink:
-
-        sudo ln -s /some/path/phpunit34/usr/bin/phpunit /usr/bin/phpunit34
-
-    Now you can run the unit tests with:
-
-        phpunit34 --stderr -d memory_limit=-1 Zend/{Name}/AllTests.php 
-
-    (Based on information from Christer Edvartsen's article published at
-     http://tech.vg.no/2011/11/29/running-multiple-versions-of-phpunit/)
-
-
-EOT;
-
-        exit(1);
-    }
     require_once 'PHPUnit/Autoload.php'; // >= PHPUnit 3.5.5
 } else {
     require_once 'PHPUnit/Framework.php'; // < PHPUnit 3.5.5

+ 2 - 0
tests/Zend/Application/Resource/SessionTest.php

@@ -91,6 +91,8 @@ class Zend_Application_Resource_SessionTest extends PHPUnit_Framework_TestCase
 
     public function testInitSetsSaveHandler()
     {
+        Zend_Session::$_unitTestEnabled = true;
+
         $saveHandler = $this->getMock('Zend_Session_SaveHandler_Interface');
 
         $this->resource->setSaveHandler($saveHandler);

+ 1 - 0
tests/Zend/Cache/TwoLevelsBackendTest.php

@@ -25,6 +25,7 @@
  */
 require_once 'Zend/Cache.php';
 require_once 'Zend/Cache/Backend/TwoLevels.php';
+require_once 'Zend/Cache/Backend/Apc.php';
 
 /**
  * Common tests for backends

+ 4 - 0
tests/Zend/Db/Table/TestCommon.php

@@ -36,6 +36,10 @@ require_once 'Zend/Registry.php';
  */
 require_once 'Zend/Db/Table.php';
 
+/**
+ * @see Zend_Cache_Backend_BlackHole
+ */
+require_once 'Zend/Cache/Backend/BlackHole.php';
 
 
 

+ 3 - 0
tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php

@@ -23,6 +23,9 @@ require_once 'Zend/Feed/Pubsubhubbub/Subscriber/Callback.php';
 require_once 'Zend/Feed/Pubsubhubbub/Model/Subscription.php';
 require_once 'Zend/Db/Table/Rowset/Abstract.php';
 require_once 'Zend/Db/Table/Row.php';
+require_once 'Zend/Db/Adapter/Abstract.php';
+require_once 'Zend/Db/Table/Abstract.php';
+require_once 'Zend/Db/Table/Rowset/Abstract.php';
 
 /**
  * @category   Zend

+ 1 - 0
tests/Zend/Feed/Pubsubhubbub/SubscriberTest.php

@@ -21,6 +21,7 @@
 
 require_once 'Zend/Feed/Pubsubhubbub/Subscriber.php';
 require_once 'Zend/Feed/Pubsubhubbub/Model/Subscription.php';
+require_once 'Zend/Db/Table/Abstract.php';
 
 /**
  * @category   Zend

+ 12 - 0
tests/Zend/File/ClassFileLocatorTest.php

@@ -55,6 +55,9 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
     {
         $locator = new Zend_File_ClassFileLocator(dirname(__FILE__));
         foreach ($locator as $file) {
+            if (version_compare(PHP_VERSION, '5.3', 'lt') && $file->getFileName() == 'MultipleClassesInMultipleNamespaces.php') {
+                continue;
+            }
             $this->assertRegexp('/\.php$/', $file->getFilename());
         }
     }
@@ -64,6 +67,9 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
         $locator = new Zend_File_ClassFileLocator(dirname(__FILE__));
         $found = false;
         foreach ($locator as $file) {
+            if (version_compare(PHP_VERSION, '5.3', 'lt') && $file->getFileName() == 'MultipleClassesInMultipleNamespaces.php') {
+                continue;
+            }
             if (preg_match('/locator-should-skip-this\.php$/', $file->getFilename())) {
                 $found = true;
             }
@@ -76,6 +82,9 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
         $locator = new Zend_File_ClassFileLocator(dirname(__FILE__));
         $found = false;
         foreach ($locator as $file) {
+            if (version_compare(PHP_VERSION, '5.3', 'lt') && $file->getFileName() == 'MultipleClassesInMultipleNamespaces.php') {
+                continue;
+            }
             if (preg_match('/LocatorShouldFindThis\.php$/', $file->getFilename())) {
                 $found = true;
             }
@@ -107,6 +116,9 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
         $locator = new Zend_File_ClassFileLocator(dirname(__FILE__));
         $found = false;
         foreach ($locator as $file) {
+            if (version_compare(PHP_VERSION, '5.3', 'lt') && $file->getFileName() == 'MultipleClassesInMultipleNamespaces.php') {
+                continue;
+            }
             $classes = $file->getClasses();
             foreach ($classes as $class) {
                 $found = true;

+ 2 - 3
tests/Zend/Filter/Compress/TarTest.php

@@ -144,7 +144,7 @@ class Zend_Filter_Compress_TarTest extends PHPUnit_Framework_TestCase
                             . DIRECTORY_SEPARATOR . 'compressed.tar', $content);
 
         $content = $filter->decompress($content);
-        $this->assertEquals(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR, $content);
+        $this->assertTrue($content);
         $content = file_get_contents(dirname(__FILE__) . '/../_files/zipextracted.txt');
         $this->assertEquals('compress me', $content);
     }
@@ -230,8 +230,7 @@ class Zend_Filter_Compress_TarTest extends PHPUnit_Framework_TestCase
                             . DIRECTORY_SEPARATOR . 'compressed.tar', $content);
 
         $content = $filter->decompress($content);
-        $this->assertEquals(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..'
-                            . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR, $content);
+        $this->assertTrue($content);
         $content = file_get_contents(dirname(__FILE__) . '/../_files/zipextracted.txt');
         $this->assertEquals('compress me', $content);
     }

+ 7 - 7
tests/Zend/Gdata/EntryLinkTest.php

@@ -66,11 +66,11 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
     public function testNormalEntryLinkShouldHaveNoExtensionElements() {
         $this->entryLink->href = "http://gmail.com/jo/contacts/Bob";
         $this->entryLink->rel = "self";
-        $this->entryLink->readOnly = "false";
+        $this->entryLink->readOnly = false;
 
         $this->assertEquals("http://gmail.com/jo/contacts/Bob", $this->entryLink->href);
         $this->assertEquals("self", $this->entryLink->rel);
-        $this->assertEquals("false", $this->entryLink->readOnly);
+        $this->assertEquals(false, $this->entryLink->readOnly);
 
         $this->assertEquals(0, count($this->entryLink->extensionElements));
         $newEntryLink = new Zend_Gdata_Extension_EntryLink();
@@ -81,7 +81,7 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals(1, count($newEntryLink->extensionElements));
         $this->assertEquals("http://gmail.com/jo/contacts/Bob", $newEntryLink->href);
         $this->assertEquals("self", $newEntryLink->rel);
-        $this->assertEquals("false", $newEntryLink->readOnly);
+        $this->assertEquals(false, $newEntryLink->readOnly);
 
         /* try constructing using magic factory */
         $gdata = new Zend_Gdata();
@@ -90,7 +90,7 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals(1, count($newEntryLink2->extensionElements));
         $this->assertEquals("http://gmail.com/jo/contacts/Bob", $newEntryLink2->href);
         $this->assertEquals("self", $newEntryLink2->rel);
-        $this->assertEquals("false", $newEntryLink2->readOnly);
+        $this->assertEquals(false, $newEntryLink2->readOnly);
     }
 
     public function testEmptyEntryLinkToAndFromStringShouldMatch() {
@@ -104,7 +104,7 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
     public function testEntryLinkWithValueToAndFromStringShouldMatch() {
         $this->entryLink->href = "http://gmail.com/jo/contacts/Bob";
         $this->entryLink->rel = "self";
-        $this->entryLink->readOnly = "false";
+        $this->entryLink->readOnly = false;
         $entryLinkXml = $this->entryLink->saveXML();
         $newEntryLink = new Zend_Gdata_Extension_EntryLink();
         $newEntryLink->transferFromXML($entryLinkXml);
@@ -112,7 +112,7 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($entryLinkXml == $newEntryLinkXml);
         $this->assertEquals("http://gmail.com/jo/contacts/Bob", $this->entryLink->href);
         $this->assertEquals("self", $this->entryLink->rel);
-        $this->assertEquals("false", $this->entryLink->readOnly);
+        $this->assertEquals(false, $this->entryLink->readOnly);
     }
 
     public function testExtensionAttributes() {
@@ -133,7 +133,7 @@ class Zend_Gdata_EntryLinkTest extends PHPUnit_Framework_TestCase
         $this->entryLink->transferFromXML($this->entryLinkText);
         $this->assertEquals("http://gmail.com/jo/contacts/Jo", $this->entryLink->href);
         $this->assertEquals("via", $this->entryLink->rel);
-        $this->assertEquals("true", $this->entryLink->readOnly);
+        $this->assertEquals(true, $this->entryLink->readOnly);
         $this->assertTrue($this->entryLink->entry instanceof Zend_Gdata_App_Entry);
         $this->assertEquals("Jo March", $this->entryLink->entry->title->text);
     }

+ 7 - 7
tests/Zend/Gdata/FeedLinkTest.php

@@ -67,12 +67,12 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->feedLink->href = "http://www.google.com/calendar/feeds/default/private/full";
         $this->feedLink->rel = "via";
         $this->feedLink->countHint = "5";
-        $this->feedLink->readOnly = "false";
+        $this->feedLink->readOnly = false;
 
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full", $this->feedLink->href);
         $this->assertEquals("via", $this->feedLink->rel);
         $this->assertEquals("5", $this->feedLink->countHint);
-        $this->assertEquals("false", $this->feedLink->readOnly);
+        $this->assertEquals(false, $this->feedLink->readOnly);
 
         $this->assertEquals(0, count($this->feedLink->extensionElements));
         $newFeedLink = new Zend_Gdata_Extension_FeedLink();
@@ -84,7 +84,7 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full", $newFeedLink->href);
         $this->assertEquals("via", $newFeedLink->rel);
         $this->assertEquals("5", $newFeedLink->countHint);
-        $this->assertEquals("false", $newFeedLink->readOnly);
+        $this->assertEquals(false, $newFeedLink->readOnly);
 
         /* try constructing using magic factory */
         $gdata = new Zend_Gdata();
@@ -94,7 +94,7 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full", $newFeedLink2->href);
         $this->assertEquals("via", $newFeedLink2->rel);
         $this->assertEquals("5", $newFeedLink2->countHint);
-        $this->assertEquals("false", $newFeedLink2->readOnly);
+        $this->assertEquals(false, $newFeedLink2->readOnly);
     }
 
     public function testEmptyFeedLinkToAndFromStringShouldMatch() {
@@ -109,7 +109,7 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->feedLink->href = "http://www.google.com/calendar/feeds/default/private/full";
         $this->feedLink->rel = "via";
         $this->feedLink->countHint = "5";
-        $this->feedLink->readOnly = "false";
+        $this->feedLink->readOnly = false;
         $feedLinkXml = $this->feedLink->saveXML();
         $newFeedLink = new Zend_Gdata_Extension_FeedLink();
         $newFeedLink->transferFromXML($feedLinkXml);
@@ -118,7 +118,7 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full", $this->feedLink->href);
         $this->assertEquals("via", $this->feedLink->rel);
         $this->assertEquals("5", $this->feedLink->countHint);
-        $this->assertEquals("false", $this->feedLink->readOnly);
+        $this->assertEquals(false, $this->feedLink->readOnly);
     }
 
     public function testExtensionAttributes() {
@@ -140,7 +140,7 @@ class Zend_Gdata_FeedLinkTest extends PHPUnit_Framework_TestCase
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full/3tsi3ag1q40bnsik88k25sgpss/comments", $this->feedLink->href);
         $this->assertEquals("http://schemas.google.com/g/2005#feed", $this->feedLink->rel);
         $this->assertEquals("0", $this->feedLink->countHint);
-        $this->assertEquals("true", $this->feedLink->readOnly);
+        $this->assertEquals(true, $this->feedLink->readOnly);
         $this->assertTrue($this->feedLink->feed instanceof Zend_Gdata_App_Feed);
         $this->assertEquals("Comments for: Sample Event", $this->feedLink->feed->title->text);
     }

+ 7 - 7
tests/Zend/Gdata/RecurrenceExceptionTest.php

@@ -64,9 +64,9 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
     }
 
     public function testNormalRecurrenceExceptionShouldHaveNoExtensionElements() {
-        $this->recurrenceException->specialized = "false";
+        $this->recurrenceException->specialized = false;
 
-        $this->assertEquals("false", $this->recurrenceException->specialized);
+        $this->assertEquals(false, $this->recurrenceException->specialized);
 
         $this->assertEquals(0, count($this->recurrenceException->extensionElements));
         $newRecurrenceException = new Zend_Gdata_Extension_RecurrenceException();
@@ -75,14 +75,14 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
         $newRecurrenceException->extensionElements = array(
                 new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar'));
         $this->assertEquals(1, count($newRecurrenceException->extensionElements));
-        $this->assertEquals("false", $newRecurrenceException->specialized);
+        $this->assertEquals(false, $newRecurrenceException->specialized);
 
         /* try constructing using magic factory */
         $gdata = new Zend_Gdata();
         $newRecurrenceException2 = $gdata->newRecurrenceException();
         $newRecurrenceException2->transferFromXML($newRecurrenceException->saveXML());
         $this->assertEquals(1, count($newRecurrenceException2->extensionElements));
-        $this->assertEquals("false", $newRecurrenceException2->specialized);
+        $this->assertEquals(false, $newRecurrenceException2->specialized);
     }
 
     public function testEmptyRecurrenceExceptionToAndFromStringShouldMatch() {
@@ -94,13 +94,13 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
     }
 
     public function testRecurrenceExceptionWithValueToAndFromStringShouldMatch() {
-        $this->recurrenceException->specialized = "false";
+        $this->recurrenceException->specialized = false;
         $recurrenceExceptionXml = $this->recurrenceException->saveXML();
         $newRecurrenceException = new Zend_Gdata_Extension_RecurrenceException();
         $newRecurrenceException->transferFromXML($recurrenceExceptionXml);
         $newRecurrenceExceptionXml = $newRecurrenceException->saveXML();
         $this->assertTrue($recurrenceExceptionXml == $newRecurrenceExceptionXml);
-        $this->assertEquals("false", $this->recurrenceException->specialized);
+        $this->assertEquals(false, $this->recurrenceException->specialized);
     }
 
     public function testExtensionAttributes() {
@@ -119,7 +119,7 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
 
     public function testConvertFullRecurrenceExceptionToAndFromString() {
         $this->recurrenceException->transferFromXML($this->recurrenceExceptionText);
-        $this->assertEquals("true", $this->recurrenceException->specialized);
+        $this->assertEquals(true, $this->recurrenceException->specialized);
         $this->assertTrue($this->recurrenceException->entryLink instanceof Zend_Gdata_Extension_EntryLink);
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full/hj4geu9lpkh3ebk6rvm4k8mhik", $this->recurrenceException->entryLink->href);
         $this->assertTrue($this->recurrenceException->originalEvent instanceof Zend_Gdata_Extension_OriginalEvent);

+ 5 - 0
tests/Zend/Ldap/Node/OfflineTest.php

@@ -273,6 +273,9 @@ class Zend_Ldap_Node_OfflineTest extends Zend_Ldap_TestCase
 
     public function testGetSetAndDeleteMethods()
     {
+        $timezone = date_default_timezone_get();
+        date_default_timezone_set('GMT');
+
         $node=$this->_createTestNode();
 
         $node->setAttribute('key', 'value1');
@@ -311,6 +314,8 @@ class Zend_Ldap_Node_OfflineTest extends Zend_Ldap_TestCase
         $this->assertEquals(0, count($node->getAttribute('userPassword')));
         $this->assertTrue($node->existsAttribute('userPassword', true));
         $this->assertFalse($node->existsAttribute('userPassword', false));
+
+        date_default_timezone_set($timezone);
     }
 
     public function testOverloading()

+ 1 - 1
tests/Zend/Loader/AutoloaderTest.php

@@ -373,7 +373,7 @@ class Zend_Loader_AutoloaderTest extends PHPUnit_Framework_TestCase
     {
         $this->autoloader->setDefaultAutoloader(array($this, 'autoload'));
         $class = $this->autoloader->autoload('Zend_ThisClass_WilNever_Exist');
-        $this->assertEquals('Zend_ThisClass_WilNever_Exist', $class);
+        $this->assertTrue($class);
         $this->assertFalse(class_exists($class, false));
     }
 

+ 4 - 4
tests/Zend/LocaleTest.php

@@ -121,7 +121,7 @@ class Zend_LocaleTest extends PHPUnit_Framework_TestCase
         // compatibility tests
         set_error_handler(array($this, 'errorHandlerIgnore'));
         Zend_LocaleTestHelper::$compatibilityMode = true;
-        $this->assertEquals('de', Zend_LocaleTestHelper::isLocale('de'));
+        $this->assertEquals('de', Zend_LocaleTestHelper::isLocale('de_ABC'));
         restore_error_handler();
     }
 
@@ -657,9 +657,9 @@ class Zend_LocaleTest extends PHPUnit_Framework_TestCase
 
         set_error_handler(array($this, 'errorHandlerIgnore'));
         Zend_LocaleTestHelper::$compatibilityMode = true;
-        $this->assertEquals('ar', Zend_LocaleTestHelper::isLocale($locale));
-        $this->assertEquals('de', Zend_LocaleTestHelper::isLocale('de'));
-        $this->assertEquals('de_AT', Zend_LocaleTestHelper::isLocale('de_AT'));
+        $this->assertTrue(Zend_LocaleTestHelper::isLocale($locale)); // compatibilty makes no odds when testing a Zend_Locale instance
+        $this->assertTrue(Zend_LocaleTestHelper::isLocale('de')); // compatibilty makes no odds when testing a known valid locale
+        $this->assertTrue(Zend_LocaleTestHelper::isLocale('de_AT'));// compatibilty makes no odds when testing a known valid locale
         $this->assertEquals('de', Zend_LocaleTestHelper::isLocale('de_xx'));
         $this->assertFalse(Zend_LocaleTestHelper::isLocale('yy'));
         $this->assertFalse(Zend_LocaleTestHelper::isLocale(1234));

+ 3 - 0
tests/Zend/Log/Writer/MailTest.php

@@ -46,6 +46,9 @@ require_once 'Zend/View/Exception.php';
 /** For some reason these classed have to be manually loaded, because PHPUnit fails to autoload them */
 require_once 'PHPUnit/Framework/MockObject/Stub/Exception.php';
 
+/** Zend_Mail_Transport_Abstract */
+require_once 'Zend/Mail/Transport/Abstract.php';
+
 
 /**
  * @category   Zend

+ 1 - 0
tests/Zend/Mail/MailTest.php

@@ -120,6 +120,7 @@ class Zend_Mail_Transport_Sendmail_Mock extends Zend_Mail_Transport_Sendmail
  */
 class Zend_Mail_MailTest extends PHPUnit_Framework_TestCase
 {
+    protected $numAssertions;
 
     public function tearDown() {
         Zend_Mail::clearDefaultFrom();

+ 1 - 0
tests/Zend/Paginator/Adapter/DbSelectTest.php

@@ -30,6 +30,7 @@ require_once 'Zend/Paginator/Adapter/DbSelect.php';
  */
 require_once 'Zend/Db/Adapter/Pdo/Sqlite.php';
 require_once 'Zend/Debug.php';
+require_once 'Zend/Db/Adapter/Abstract.php';
 
 /**
  * @see PHPUnit_Framework_TestCase

+ 10 - 0
tests/Zend/PaginatorTest.php

@@ -90,6 +90,16 @@ require_once 'Zend/Filter/Callback.php';
 require_once 'Zend/Paginator/Adapter/DbSelect.php';
 
 /**
+ * @see Zend_Db_Adapter_Abstract
+ */
+require_once 'Zend/Db/Adapter/Abstract.php';
+
+/**
+ * @see Zend_Cache_Core
+ */
+require_once 'Zend/Cache/Core.php';
+
+/**
  * @category   Zend
  * @package    Zend_Paginator
  * @subpackage UnitTests

+ 12 - 0
tests/Zend/Rest/ClientTest.php

@@ -62,6 +62,12 @@ class Zend_Rest_ClientTest extends PHPUnit_Framework_TestCase
      */
     public function testCanPostFileInPresetHttpClient()
     {
+        if (!defined('TESTS_ZEND_REST_ONLINE_ENABLED')
+            || !constant('TESTS_ZEND_REST_ONLINE_ENABLED')
+        ) {
+            $this->markTestSkipped('Define TESTS_ZEND_REST_ONLINE_ENABLED to test Zend_Rest_ClientTest online.');
+        }
+
         $client = new Zend_Rest_Client('http://framework.zend.com');
         $httpClient = new Zend_Http_Client();
         $text = 'this is some plain text';
@@ -75,6 +81,12 @@ class Zend_Rest_ClientTest extends PHPUnit_Framework_TestCase
 
     public function testUri()
     {
+        if (!defined('TESTS_ZEND_REST_ONLINE_ENABLED')
+            || !constant('TESTS_ZEND_REST_ONLINE_ENABLED')
+        ) {
+            $this->markTestSkipped('Define TESTS_ZEND_REST_ONLINE_ENABLED to test Zend_Rest_ClientTest online.');
+        }
+
         $client = new Zend_Rest_Client('http://framework.zend.com/rest/');
         $uri = $client->getUri();
         $this->assertTrue($uri instanceof Zend_Uri_Http);

+ 6 - 0
tests/Zend/Service/ShortUrl/BitLyTest.php

@@ -36,6 +36,12 @@ class Zend_Service_ShortUrl_BitLyTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_BitLyTest only works when TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
     }
 

+ 6 - 0
tests/Zend/Service/ShortUrl/IsGdTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_IsGdTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_IsGdTest only works when TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_IsGd();

+ 6 - 0
tests/Zend/Service/ShortUrl/JdemCzTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_JdemCzTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_JdemCzTest only works when TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED is set.');
+        }
+
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_JdemCz();

+ 6 - 0
tests/Zend/Service/ShortUrl/MetamarkNetTest.php

@@ -43,6 +43,12 @@ class Zend_Service_ShortUrl_MetamarkNetTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_MetamarkNetTest only works when TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED is set.');
+        }
+
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_MetamarkNet();

+ 6 - 0
tests/Zend/Service/ShortUrl/TinyUrlComTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_TinyUrlComTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_TinyUrlComTest only works when TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_TinyUrlCom();

+ 7 - 0
tests/Zend/Service/Twitter/TwitterTest.php

@@ -34,6 +34,13 @@ require_once 'Zend/Http/Client.php';
 /** Zend_Http_Client_Adapter_Test */
 require_once 'Zend/Http/Client/Adapter/Test.php';
 
+require_once 'Zend/Oauth/Client.php';
+require_once 'Zend/Http/Response.php';
+require_once 'Zend/Oauth/Token/Access.php';
+require_once 'Zend/Oauth/Token/Access.php';
+require_once 'Zend/Oauth/Client.php';
+require_once 'Zend/Oauth/Consumer.php';
+
 /**
  * @category   Zend
  * @package    Zend_Service_Twitter

+ 5 - 1
tests/Zend/Soap/AllTests.php

@@ -57,7 +57,11 @@ class Zend_Soap_AllTests
         $suite->addTestSuite('Zend_Soap_Wsdl_ArrayOfTypeComplexStrategyTest');
         $suite->addTestSuite('Zend_Soap_Wsdl_ArrayOfTypeSequenceStrategyTest');
         $suite->addTestSuite('Zend_Soap_AutoDiscoverTest');
-        $suite->addTestSuite('Zend_Soap_AutoDiscover_OnlineTest');
+        
+        if (!defined('TESTS_ZEND_SOAP_AUTODISCOVER_ONLINE_SERVER_BASEURI')
+            || constant('TESTS_ZEND_SOAP_AUTODISCOVER_ONLINE_SERVER_BASEURI') == false) {
+            $suite->addTestSuite('Zend_Soap_AutoDiscover_OnlineTest');
+        }
 
         return $suite;
     }

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

@@ -982,9 +982,9 @@ class Zend_Soap_ServerTest extends PHPUnit_Framework_TestCase
     }
 
     /**
-     * @runInSeparateProcess
-     * @preserveGlobalState disabled
+     * Method commented out as causes segmentation fault on PHP 5.2.17 with PHPUnit 3.2.13 on Travis.
      */
+    /*
     public function testShouldThrowExceptionIfHandledRequestContainsDoctype()
     {
         $this->markTestSkipped('Cannot test for RuntimeException from Soap Server');
@@ -1011,6 +1011,7 @@ class Zend_Soap_ServerTest extends PHPUnit_Framework_TestCase
         $response = $server->handle($request);
         $this->assertContains('Invalid XML', $response->getMessage());
     }
+    */
 }
 
 

+ 2 - 0
tests/Zend/Test/PHPUnit/Db/DataSet/DbRowsetTest.php

@@ -23,6 +23,8 @@
 require_once "Zend/Test/PHPUnit/Db/DataSet/DbRowset.php";
 require_once "Zend/Db/Table/Rowset.php";
 require_once "PHPUnit/Extensions/Database/DataSet/DefaultTableMetaData.php";
+require_once 'Zend/Test/PHPUnit/Db/Exception.php';
+require_once 'Zend/Db/Table/Abstract.php';
 
 /**
  * @category   Zend

+ 2 - 0
tests/Zend/Test/PHPUnit/Db/DataSet/QueryDataSetTest.php

@@ -34,6 +34,8 @@ require_once "Zend/Test/PHPUnit/Db/DataSet/DataSetTestCase.php";
  */
 require_once "Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php";
 
+require_once 'Zend/Db/Select.php';
+
 /**
  * @category   Zend
  * @package    Zend_Test

+ 1 - 0
tests/Zend/Test/PHPUnit/Db/DataSet/QueryTableTest.php

@@ -24,6 +24,7 @@
  * @see Zend_Test_PHPUnit_Db_DataSet_DataSetTestCase
  */
 require_once "Zend/Test/PHPUnit/Db/DataSet/DataSetTestCase.php";
+require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
 
 require_once "Zend/Db/Statement/Interface.php";
 

+ 11 - 2
tests/Zend/Test/PHPUnit/Db/Integration/AbstractTestCase.php

@@ -76,7 +76,12 @@ abstract class Zend_Test_PHPUnit_Db_Integration_AbstractTestCase extends PHPUnit
         $xmlDataSet = new PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(
             dirname(__FILE__)."/_files/sqliteIntegrationFixture.xml"
         );
-        $this->assertTrue($xmlDataSet->assertEquals($dataSet));
+
+        if (method_exists($xmlDataSet, 'assertEquals')) {
+            $this->assertTrue($xmlDataSet->assertEquals($dataSet));
+        } else {
+            $this->assertTrue($xmlDataSet->matches($dataSet));
+        }
     }
 
     /**
@@ -103,7 +108,11 @@ abstract class Zend_Test_PHPUnit_Db_Integration_AbstractTestCase extends PHPUnit
         $this->assertEquals(3, count($rows));
 
         $rowsetTable = new Zend_Test_PHPUnit_Db_DataSet_DbRowset($rows);
-        $rowsetTable->assertEquals($fooDataTable);
+        if (method_exists($rowsetTable, 'assertEquals')) {
+            $rowsetTable->assertEquals($fooDataTable);
+        } else {
+            $rowsetTable->matches($fooDataTable);
+        }
     }
 
     /**

+ 3 - 0
tests/Zend/Test/PHPUnit/Db/Operation/DeleteAllTest.php

@@ -26,6 +26,9 @@ require_once "Zend/Test/PHPUnit/Db/Operation/DeleteAll.php";
 
 require_once "PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php";
 
+require_once 'PHPUnit/Extensions/Database/DataSet/IDataSet.php';
+require_once 'PHPUnit/Extensions/Database/DB/IDatabaseConnection.php';
+
 /**
  * @category   Zend
  * @package    Zend_Test

+ 3 - 0
tests/Zend/Test/PHPUnit/Db/Operation/InsertTest.php

@@ -26,6 +26,9 @@ require_once "Zend/Test/PHPUnit/Db/Operation/Insert.php";
 
 require_once "PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php";
 
+require_once 'PHPUnit/Extensions/Database/DataSet/IDataSet.php';
+require_once 'PHPUnit/Extensions/Database/DB/IDatabaseConnection.php';
+
 /**
  * @category   Zend
  * @package    Zend_Test

+ 3 - 0
tests/Zend/Test/PHPUnit/Db/Operation/TruncateTest.php

@@ -26,6 +26,9 @@ require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php";
 
 require_once "PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php";
 
+require_once 'PHPUnit/Extensions/Database/DataSet/IDataSet.php';
+require_once 'PHPUnit/Extensions/Database/DB/IDatabaseConnection.php';
+
 /**
  * @category   Zend
  * @package    Zend_Test

+ 1 - 0
tests/Zend/Test/PHPUnit/Db/SimpleTesterTest.php

@@ -24,6 +24,7 @@ require_once "Zend/Test/PHPUnit/Db/SimpleTester.php";
 require_once "Zend/Test/PHPUnit/Db/Connection.php";
 require_once "Zend/Test/DbAdapter.php";
 require_once "PHPUnit/Extensions/Database/DataSet/IDataSet.php";
+require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
 require_once "Zend/Test/PHPUnit/Db/Exception.php";
 
 /**

+ 1 - 0
tests/Zend/Test/PHPUnit/Db/TestCaseTest.php

@@ -22,6 +22,7 @@
 
 require_once "PHPUnit/Extensions/Database/DataSet/CompositeDataSet.php";
 require_once "Zend/Test/PHPUnit/DatabaseTestCase.php";
+require_once "Zend/Test/PHPUnit/Db/Connection.php";
 require_once "Zend/Db/Adapter/Abstract.php";
 require_once "Zend/Db/Adapter/Pdo/Sqlite.php";
 require_once "Zend/Db/Table.php";

+ 1 - 0
tests/Zend/Text/FigletTest.php

@@ -29,6 +29,7 @@ if (!defined("PHPUnit_MAIN_METHOD")) {
  * Zend_Text_Figlet
  */
 require_once 'Zend/Text/Figlet.php';
+require_once 'Zend/Text/Figlet/Exception.php';
 
 /**
  * Zend_Config

+ 7 - 0
tests/Zend/VersionTest.php

@@ -89,6 +89,13 @@ class Zend_VersionTest extends PHPUnit_Framework_TestCase
      */
     public function testFetchLatestVersion()
     {
+        if (!defined('TESTS_ZEND_VERSION_ONLINE_ENABLED')
+            || !constant('TESTS_ZEND_VERSION_ONLINE_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing fetchLatersVersion only works when TESTS_ZEND_VERSION_ONLINE_ENABLED is set.');
+            return;
+        }
+
         $actual = Zend_Version::getLatest();
         if ('not available' === $actual) {
             $this->markTestIncomplete('http://framework.zend.com/ may be down');

+ 0 - 1
tests/Zend/View/Helper/HeadScriptTest.php

@@ -402,7 +402,6 @@ document.write(bar.strlen());');
             $this->helper->headScript()->captureEnd();
             $this->assertContains('Cannot nest', $e->getMessage());
         }
-        $this->helper->headScript()->captureEnd();
     }
 
     /**

+ 0 - 1
tests/Zend/View/Helper/HeadStyleTest.php

@@ -369,7 +369,6 @@ h1 {
                 $this->helper->headStyle()->captureEnd();
                 $this->assertContains('Cannot nest', $e->getMessage());
             }
-        $this->helper->headStyle()->captureEnd();
     }
 
     public function testMediaAttributeAsArray()

+ 1 - 1
tests/Zend/View/Helper/Navigation/SitemapTest.php

@@ -240,7 +240,7 @@ class Zend_View_Helper_Navigation_SitemapTest
         $this->_helper->setUseSitemapValidators(false);
 
         $expected = $this->_getExpected('sitemap/invalid.xml');
-        $this->assertEquals($expected, $this->_helper->render($nav));
+        $this->assertXmlStringEqualsXmlString($expected, $this->_helper->render($nav));
     }
 
     public function testSetServerUrlRequiresValidUri()

+ 4 - 0
tests/Zend/XmlRpc/ClientTest.php

@@ -28,6 +28,10 @@ require_once 'Zend/Http/Client/Adapter/Test.php';
 
 require_once 'Zend/XmlRpc/Value/DateTime.php';
 
+require_once 'Zend/XmlRpc/Client/ServerIntrospection.php';
+
+require_once 'Zend/Http/Client.php';
+
 /**
  * Test case for Zend_XmlRpc_Value
  *

+ 5 - 2
tests/Zend/XmlRpc/ServerTest.php

@@ -24,6 +24,9 @@ require_once 'Zend/XmlRpc/Server.php';
 require_once 'Zend/XmlRpc/Request.php';
 require_once 'Zend/XmlRpc/Response.php';
 
+require_once 'Zend/Server/Method/Definition.php';
+require_once 'Zend/Server/Definition.php';
+
 /**
  * Test case for Zend_XmlRpc_Server
  *
@@ -166,7 +169,7 @@ class Zend_XmlRpc_ServerTest extends PHPUnit_Framework_TestCase
         $request = new Zend_XmlRpc_Request();
         $request->setMethod('test.test4');
         $response = $this->_server->handle($request);
-        $this->assertNotType('Zend_XmlRpc_Fault', $response);
+        $this->assertFalse($response instanceof Zend_XmlRpc_Fault);
         $this->assertSame(
             array('test1' => 'argv-argument',
                 'test2' => null,
@@ -184,7 +187,7 @@ class Zend_XmlRpc_ServerTest extends PHPUnit_Framework_TestCase
         $request->setMethod('test.test4');
         $request->setParams(array('foo'));
         $response = $this->_server->handle($request);
-        $this->assertNotType('Zend_XmlRpc_Fault', $response);
+        $this->assertFalse($response instanceof Zend_XmlRpc_Fault);
         $this->assertSame(array('test1' => 'a1', 'test2' => 'a2', 'arg' => array('foo')), $response->getReturnValue());
     }
 

+ 5 - 0
tests/Zend/XmlRpc/ValueTest.php

@@ -611,6 +611,11 @@ class Zend_XmlRpc_ValueTest extends PHPUnit_Framework_TestCase
 
     public function testMarshalDateTimeFromInvalidString()
     {
+        $phpunitVersion = PHPUnit_Runner_Version::id();
+        if (version_compare($phpunitVersion, '3.7.0', '<=')) {
+            $this->markTestSkipped('Cannot expect generic exceptions prior to PHPUnit 3.7.');
+        }
+
         $this->setExpectedException('Exception', "foobarbaz");
         Zend_XmlRpc_Value::getXmlRpcValue('foobarbaz', Zend_XmlRpc_Value::XMLRPC_TYPE_DATETIME);
     }

+ 14 - 22
tests/install_dependencies.sh

@@ -1,28 +1,20 @@
 #!/bin/sh
 
+# To install DbUnit, we have to install everything
+
+pear channel-discover pear.phpunit.de
+pear channel-discover pear.symfony-project.com
 pear update-channels
-pear upgrade-all
-pear config-set auto_discover 1
 
 # remove any existing phpunit packages
-pear uninstall phpunit/PHPUnit
-pear uninstall phpunit/DbUnit
-pear uninstall phpunit/PHP_CodeCoverage
-pear uninstall phpunit/File_Iterator
-pear uninstall phpunit/Text_Template
-pear uninstall phpunit/PHP_Timer
-pear uninstall phpunit/PHPUnit_MockObject
-pear uninstall phpunit/PHPUnit_Selenium
-pear uninstall pear.symfony-project.com/YAML
+pear uninstall -n pear.phpunit.de/PHPUnit
+pear uninstall -n pear.phpunit.de/PHP_CodeCoverage
+pear uninstall -n pear.phpunit.de/PHPUnit_MockObject
+pear uninstall -n pear.phpunit.de/File_Iterator
+pear uninstall -n pear.phpunit.de/Text_Template
+pear uninstall -n pear.phpunit.de/PHP_Timer
+pear uninstall -n pear.symfony-project.com/YAML
 
-# install phpunit 3.4
-pear update-channels
-pear install pear.symfony-project.com/YAML-1.0.2
-pear install phpunit/PHPUnit_Selenium-1.0.1
-pear install phpunit/PHPUnit_MockObject-1.0.3
-pear install phpunit/PHP_Timer-1.0.0
-pear install phpunit/File_Iterator-1.2.3
-pear install phpunit/PHP_CodeCoverage-1.0.2
-pear install phpunit/Text_Template-1.0.0
-pear install phpunit/DbUnit-1.0.0
-pear install pear.phpunit.de/PHPUnit-3.4.15
+# Install
+pear install -o pear.phpunit.de/PHPUnit
+pear install pear.phpunit.de/DbUnit

+ 4 - 0
tests/runalltests.php

@@ -55,10 +55,14 @@ while(list(, $file)=each($files)) {
     echo "Executing {$file}" . PHP_EOL;
     system($PHPUNIT . ' --stderr -d memory_limit=-1 -d error_reporting=E_ALL\&E_STRICT -d display_errors=1 ' . escapeshellarg($file), $c_result);
     echo PHP_EOL;
+    echo "Finished executing {$file}" . PHP_EOL;
     
     if ($c_result) {
+        echo PHP_EOL . "Result of $file is $c_result" . PHP_EOL . PHP_EOL;
         $result = $c_result;
     }
 }
 
+
+echo PHP_EOL . "All done. Result: $result" . PHP_EOL;
 exit($result);