Parcourir la source

Merge remote-tracking branch 'upstream/master' into patch-two-level-cache-updates

Menno Holtkamp il y a 11 ans
Parent
commit
6ab409a835
100 fichiers modifiés avec 1824 ajouts et 1060 suppressions
  1. 1 0
      .gitignore
  2. 10 0
      .travis.yml
  3. 41 0
      CONTRIBUTING.md
  4. 1 1
      README-GIT.md
  5. 14 4
      README.md
  6. 1 1
      documentation/manual/ja/module_specs/Zend_Date-Constants.xml
  7. 7 5
      library/Zend/Application/Bootstrap/BootstrapAbstract.php
  8. 0 1
      library/Zend/Application/Bootstrap/Bootstrapper.php
  9. 1 4
      library/Zend/Application/Resource/Translate.php
  10. 1 1
      library/Zend/Cache/Backend/Libmemcached.php
  11. 1 1
      library/Zend/Date.php
  12. 20 20
      library/Zend/Db/Table/Abstract.php
  13. 1 1
      library/Zend/Dojo/View/Helper/Dojo/Container.php
  14. 82 12
      library/Zend/Form.php
  15. 60 42
      library/Zend/Gdata/Docs.php
  16. 23 7
      library/Zend/Loader/PluginLoader.php
  17. 701 624
      library/Zend/Locale.php
  18. 4 0
      library/Zend/Locale/Data.php
  19. 72 32
      library/Zend/Locale/Format.php
  20. 5 1
      library/Zend/Mobile/Push/Message/Gcm.php
  21. 15 5
      library/Zend/Navigation/Container.php
  22. 11 10
      library/Zend/Pdf.php
  23. 9 3
      library/Zend/Service/Audioscrobbler.php
  24. 9 4
      library/Zend/Service/Technorati.php
  25. 0 3
      library/Zend/Test/PHPUnit/Constraint/DomQuery.php
  26. 0 3
      library/Zend/Test/PHPUnit/Constraint/DomQuery34.php
  27. 1 4
      library/Zend/Test/PHPUnit/Constraint/DomQuery37.php
  28. 0 3
      library/Zend/Test/PHPUnit/Constraint/Exception.php
  29. 0 3
      library/Zend/Test/PHPUnit/Constraint/Redirect.php
  30. 0 3
      library/Zend/Test/PHPUnit/Constraint/Redirect34.php
  31. 0 3
      library/Zend/Test/PHPUnit/Constraint/Redirect37.php
  32. 0 3
      library/Zend/Test/PHPUnit/Constraint/ResponseHeader.php
  33. 0 3
      library/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php
  34. 0 3
      library/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php
  35. 0 9
      library/Zend/Test/PHPUnit/ControllerTestCase.php
  36. 0 5
      library/Zend/Test/PHPUnit/DatabaseTestCase.php
  37. 0 5
      library/Zend/Test/PHPUnit/Db/Connection.php
  38. 0 5
      library/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php
  39. 0 5
      library/Zend/Test/PHPUnit/Db/DataSet/DbTable.php
  40. 0 4
      library/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php
  41. 0 10
      library/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php
  42. 0 10
      library/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php
  43. 0 5
      library/Zend/Test/PHPUnit/Db/Metadata/Generic.php
  44. 0 21
      library/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php
  45. 0 20
      library/Zend/Test/PHPUnit/Db/Operation/Insert.php
  46. 0 20
      library/Zend/Test/PHPUnit/Db/Operation/Truncate.php
  47. 0 20
      library/Zend/Test/PHPUnit/Db/SimpleTester.php
  48. 204 4
      library/Zend/Validate/Hostname.php
  49. 13 3
      library/Zend/Validate/StringLength.php
  50. 1 1
      library/Zend/Version.php
  51. 9 3
      library/Zend/XmlRpc/Client.php
  52. 1 1
      resources/languages/es/Zend_Validate.php
  53. 1 1
      resources/languages/hr/Zend_Validate.php
  54. 1 1
      resources/languages/it/Zend_Validate.php
  55. 1 1
      resources/languages/nl/Zend_Validate.php
  56. 1 1
      resources/languages/pt_BR/Zend_Validate.php
  57. 1 1
      resources/languages/ru/Zend_Validate.php
  58. 1 1
      resources/languages/sr/Zend_Validate.php
  59. 1 1
      resources/languages/uk/Zend_Validate.php
  60. 85 0
      tests/TestConfiguration.travis.php
  61. 8 6
      tests/TestHelper.php
  62. 10 7
      tests/Zend/Auth/Adapter/OpenId/OpenIdTest.php
  63. 0 1
      tests/Zend/Cache/FactoryException.php
  64. 18 0
      tests/Zend/DateTest.php
  65. 47 0
      tests/Zend/Db/Adapter/Pdo/SqliteTest.php
  66. 24 0
      tests/Zend/Db/Select/Pdo/SqliteTest.php
  67. 9 9
      tests/Zend/Db/Select/TestCommon.php
  68. 1 2
      tests/Zend/Db/Table/Rowset/TestCommon.php
  69. 24 0
      tests/Zend/Db/Table/Select/Pdo/SqliteTest.php
  70. 8 8
      tests/Zend/Db/Table/TestCommon.php
  71. 1 1
      tests/Zend/Db/TestSetup.php
  72. 2 2
      tests/Zend/Db/TestUtil/Common.php
  73. 33 0
      tests/Zend/Dojo/View/Helper/DojoTest.php
  74. 16 12
      tests/Zend/File/ClassFileLocatorTest.php
  75. 0 4
      tests/Zend/Form/Element/NoteTest.php
  76. 84 0
      tests/Zend/Form/FormTest.php
  77. 2 6
      tests/Zend/Loader/AutoloaderFactoryTest.php
  78. 9 0
      tests/Zend/Locale/DataTest.php
  79. 87 0
      tests/Zend/LocaleTest.php
  80. 0 3
      tests/Zend/Log/Writer/MailTest.php
  81. 5 2
      tests/Zend/Mail/MessageTest.php
  82. 0 2
      tests/Zend/Navigation/AllTests.php
  83. 24 0
      tests/Zend/Navigation/ContainerTest.php
  84. 1 11
      tests/Zend/RegistryTest.php
  85. 0 1
      tests/Zend/Service/SqlAzure/Management/ManagementClientTest.php
  86. 0 1
      tests/Zend/Service/WindowsAzure/BlobSessionHandlerTest.php
  87. 0 1
      tests/Zend/Service/WindowsAzure/BlobStorageSharedAccessTest.php
  88. 0 1
      tests/Zend/Service/WindowsAzure/BlobStorageTest.php
  89. 0 1
      tests/Zend/Service/WindowsAzure/BlobStreamTest.php
  90. 0 1
      tests/Zend/Service/WindowsAzure/Credentials/SharedAccessSignatureTest.php
  91. 0 1
      tests/Zend/Service/WindowsAzure/Credentials/SharedKeyLiteTest.php
  92. 0 1
      tests/Zend/Service/WindowsAzure/Credentials/SharedKeyTest.php
  93. 0 1
      tests/Zend/Service/WindowsAzure/Diagnostics/ManagerTest.php
  94. 0 1
      tests/Zend/Service/WindowsAzure/DynamicTableEntityTest.php
  95. 0 1
      tests/Zend/Service/WindowsAzure/Management/ManagementClientTest.php
  96. 0 1
      tests/Zend/Service/WindowsAzure/QueueStorageTest.php
  97. 0 1
      tests/Zend/Service/WindowsAzure/RetryPolicyTest.php
  98. 0 1
      tests/Zend/Service/WindowsAzure/StorageTest.php
  99. 0 1
      tests/Zend/Service/WindowsAzure/TableEntityQueryTest.php
  100. 0 1
      tests/Zend/Service/WindowsAzure/TableEntityTest.php

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ tests/Zend/OpenId/Provider/Storage/_files/*
 tests/Zend/OpenId/_files/*
 tests/Zend/Translate/Adapter/_files/zend_cache---internal-metadatas---testid
 tests/Zend/Translate/Adapter/_files/zend_cache---testid
+tests/TestConfiguration.php
 vendor/*
 composer.lock
 bin/dbunit

+ 10 - 0
.travis.yml

@@ -14,6 +14,16 @@ install:
  - sh ./tests/install_dependencies.sh
  - phpenv rehash
 
+services:
+  - memcached
+
+before_script:
+  - mysql -e 'create database zftest;'
+  - psql -c 'create database zftest;' -U postgres
+  - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - cp ./tests/TestConfiguration.travis.php ./tests/TestConfiguration.php
+
 script:
  - cd tests/
  - php runalltests.php

+ 41 - 0
CONTRIBUTING.md

@@ -0,0 +1,41 @@
+# CONTRIBUTING
+
+> **To submit code, patches, and proposals to Zend Framework, contributors must
+agree to the New BSD License and also submit a signed
+[Contributor License Agreement (CLA)](https://github.com/zendframework/zf1/wiki/Contributor-License-Agreement-%28CLA%29).**
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  Coding Standards:
+    http://framework.zend.com/manual/1.12/en/coding-standard.html
+ -  ZF Git Guide:
+    [README-GIT.md](README-GIT.md)
+ -  Contributor's Guide:
+    http://framework.zend.com/participate/contributor-guide-v1
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability in Zend Framework,
+please report it to us at [zf-security@zend.com](mailto:zf-security@zend.com).
+We will work with you to verify the vulnerability and patch it.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect Zend Framework users and provides
+them with a chance to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).

+ 1 - 1
README-GIT.md

@@ -19,7 +19,7 @@ review.
 
    ```sh
    % git clone git@github.com:<username>/zf1.git
-   % cd zf2
+   % cd zf1
    ```
 
 4. Add a remote to the canonical ZF repository, so you can keep your fork

+ 14 - 4
README.md

@@ -7,8 +7,18 @@ Master: [![Build Status](https://api.travis-ci.org/zendframework/zf1.png?branch=
 RELEASE INFORMATION
 ===================
 
-Zend Framework 1.12.4 Release.
-Released on March 06, 2014.
+Zend Framework 1.12.7dev Release.
+Released on MMMMM DD, YYYY.
+
+IMPORTANT FIXES FOR 1.12.6
+--------------------------
+
+- [#307](https://github.com/zendframework/zf1/pull/307) fixes a backwards
+  compatibility break in the `Zend_Locale` component. 1.12.4 updated the
+  [CLDR](http://cldr.unicode.org) version used by Zend Framework 1, which
+  resulted in the removal of several locales we previously supported. The patch
+  in #307 adds locale aliases for these to the new locales supported in recent
+  versions of the CLDR, ensuring backwards compatibility for ZF1 users.
 
 SECURITY FIXES FOR 1.12.4
 -------------------------
@@ -245,9 +255,9 @@ We’d like to particularly thank Adam Lundrigan, Frank Brückner and
 Martin Hujer for their efforts in making this happen. Thanks also to the
 many people who ran the ZF1 unit tests and reported their results!
 
-For a complete list, visit:
+For a complete list of closed issues beginning with 1.12.3, visit:
 
- * http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=12877
+ * https://github.com/zendframework/zf1/issues?labels=&milestone=&page=1&state=closed
  * http://framework.zend.com/changelog/
 
 MIGRATION NOTES

+ 1 - 1
documentation/manual/ja/module_specs/Zend_Date-Constants.xml

@@ -479,7 +479,7 @@
                 </thead>
                 <tbody>
                     <row>
-                        <entry><constant>Zend_Date::ISO_860</constant>1</entry>
+                        <entry><constant>Zend_Date::ISO_8601</constant></entry>
                         <entry><acronym>ISO</acronym> 8601 形式の日付 (文字列)</entry>
                         <entry>2009-02-13T14:53:27+01:00</entry>
                         <entry><emphasis>2009-02-13T14:53:27+01:00</emphasis>

+ 7 - 5
library/Zend/Application/Bootstrap/BootstrapAbstract.php

@@ -104,7 +104,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
      * initializer methods.
      *
      * @param  Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
-     * @return void
      * @throws Zend_Application_Bootstrap_Exception When invalid application is provided
      */
     public function __construct($application)
@@ -327,8 +326,9 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
     /**
      * Get a registered plugin resource
      *
-     * @param  string $resourceName
+     * @param string $resource
      * @return Zend_Application_Resource_Resource
+     * @throws Zend_Application_Bootstrap_Exception
      */
     public function getPluginResource($resource)
     {
@@ -441,6 +441,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
      *
      * @param  Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
      * @return Zend_Application_Bootstrap_BootstrapAbstract
+     * @throws Zend_Application_Bootstrap_Exception
      */
     public function setApplication($application)
     {
@@ -491,6 +492,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
      *
      * @param  object $container
      * @return Zend_Application_Bootstrap_BootstrapAbstract
+     * @throws Zend_Application_Bootstrap_Exception
      */
     public function setContainer($container)
     {
@@ -554,7 +556,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
     }
 
     /**
-     * Implement PHP's magic to retrieve a ressource
+     * Implement PHP's magic to retrieve a resource
      * in the bootstrap
      *
      * @param string $prop
@@ -567,7 +569,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
 
     /**
      * Implement PHP's magic to ask for the
-     * existence of a ressource in the bootstrap
+     * existence of a resource in the bootstrap
      *
      * @param string $prop
      * @return bool
@@ -602,7 +604,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
      *
      * @param  string $method
      * @param  array  $args
-     * @return void
+     * @return Zend_Application_Bootstrap_BootstrapAbstract
      * @throws Zend_Application_Bootstrap_Exception On invalid method name
      */
     public function __call($method, $args)

+ 0 - 1
library/Zend/Application/Bootstrap/Bootstrapper.php

@@ -35,7 +35,6 @@ interface Zend_Application_Bootstrap_Bootstrapper
      * Constructor
      *
      * @param  Zend_Application $application
-     * @return void
      */
     public function __construct($application);
 

+ 1 - 4
library/Zend/Application/Resource/Translate.php

@@ -88,10 +88,7 @@ class Zend_Application_Resource_Translate extends Zend_Application_Resource_Reso
 
             if (isset($options['log'])) {
                 if (is_array($options['log'])) {
-                    $log = Zend_Log::factory($options['log']);
-                }
-                if ($log instanceof Zend_Log) {
-                    $options['log'] = $log;
+                    $options['log'] = Zend_Log::factory($options['log']);
                 }
             }
 

+ 1 - 1
library/Zend/Cache/Backend/Libmemcached.php

@@ -132,7 +132,7 @@ class Zend_Cache_Backend_Libmemcached extends Zend_Cache_Backend implements Zend
                     $this->_log("Unknown memcached client option '{$name}' ({$optConst})");
                 }
             }
-            if ($optId) {
+            if (null !== $optId) {
                 if (!$this->_memcache->setOption($optId, $value)) {
                     $this->_log("Setting memcached client option '{$optId}' failed");
                 }

+ 1 - 1
library/Zend/Date.php

@@ -1208,7 +1208,7 @@ class Zend_Date extends Zend_Date_DateObject
             return $zone;
         }
 
-        preg_match('/([[:alpha:]\/]{3,30})(?!.*([[:alpha:]\/]{3,30}))/', $zone, $match);
+        preg_match('/([[:alpha:]\/_]{3,30})(?!.*([[:alpha:]\/]{3,30}))/', $zone, $match);
         try {
             if (!empty($match) and (!is_int($match[count($match) - 1]))) {
                 $oldzone = $this->getTimezone();

+ 20 - 20
library/Zend/Db/Table/Abstract.php

@@ -1041,16 +1041,6 @@ abstract class Zend_Db_Table_Abstract
         $primary = (array) $this->_primary;
         $pkIdentity = $primary[(int)$this->_identity];
 
-        /**
-         * If this table uses a database sequence object and the data does not
-         * specify a value, then get the next ID from the sequence and add it
-         * to the row.  We assume that only the first column in a compound
-         * primary key takes a value from a sequence.
-         */
-        if (is_string($this->_sequence) && !isset($data[$pkIdentity])) {
-            $data[$pkIdentity] = $this->_db->nextSequenceId($this->_sequence);
-            $pkSuppliedBySequence = true;
-        }
 
         /**
          * If the primary key can be generated automatically, and no value was
@@ -1060,7 +1050,7 @@ abstract class Zend_Db_Table_Abstract
          * position of the data.  The following values are considered empty:
          *   null, false, true, '', array()
          */
-        if (!isset($pkSuppliedBySequence) && array_key_exists($pkIdentity, $data)) {
+        if (array_key_exists($pkIdentity, $data)) {
             if ($data[$pkIdentity] === null                                        // null
                 || $data[$pkIdentity] === ''                                       // empty string
                 || is_bool($data[$pkIdentity])                                     // boolean
@@ -1070,6 +1060,16 @@ abstract class Zend_Db_Table_Abstract
         }
 
         /**
+         * If this table uses a database sequence object and the data does not
+         * specify a value, then get the next ID from the sequence and add it
+         * to the row.  We assume that only the first column in a compound
+         * primary key takes a value from a sequence.
+         */
+        if (is_string($this->_sequence) && !isset($data[$pkIdentity])) {
+            $data[$pkIdentity] = $this->_db->nextSequenceId($this->_sequence);
+        }
+
+        /**
          * INSERT the new row.
          */
         $tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
@@ -1212,20 +1212,20 @@ abstract class Zend_Db_Table_Abstract
     {
         // setup metadata
         $this->_setupMetadata();
-        
+
         // get this class name
         $thisClass = get_class($this);
         if ($thisClass === 'Zend_Db_Table') {
             $thisClass = $this->_definitionConfigName;
         }
-        
+
         $rowsAffected = 0;
-        
+
         foreach ($this->_getReferenceMapNormalized() as $map) {
             if ($map[self::REF_TABLE_CLASS] == $parentTableClassname && isset($map[self::ON_DELETE])) {
-                
+
                 $where = array();
-                
+
                 // CASCADE or CASCADE_RECURSE
                 if (in_array($map[self::ON_DELETE], array(self::CASCADE, self::CASCADE_RECURSE))) {
                     for ($i = 0; $i < count($map[self::COLUMNS]); ++$i) {
@@ -1237,10 +1237,10 @@ abstract class Zend_Db_Table_Abstract
                             $primaryKey[$refCol], $type);
                     }
                 }
-                
+
                 // CASCADE_RECURSE
                 if ($map[self::ON_DELETE] == self::CASCADE_RECURSE) {
-                    
+
                     /**
                      * Execute cascading deletes against dependent tables
                      */
@@ -1259,7 +1259,7 @@ abstract class Zend_Db_Table_Abstract
                 if (in_array($map[self::ON_DELETE], array(self::CASCADE, self::CASCADE_RECURSE))) {
                     $rowsAffected += $this->delete($where);
                 }
-                
+
             }
         }
         return $rowsAffected;
@@ -1610,5 +1610,5 @@ abstract class Zend_Db_Table_Abstract
 
         return new $tableName($options);
     }
-    
+
 }

+ 1 - 1
library/Zend/Dojo/View/Helper/Dojo/Container.php

@@ -1026,7 +1026,7 @@ EOJ;
             return '';
         }
 
-        array_reverse($stylesheets);
+        $stylesheets = array_reverse($stylesheets);
         $style = '<style type="text/css">' . PHP_EOL
                . (($this->_isXhtml) ? '<!--' : '<!--') . PHP_EOL;
         foreach ($stylesheets as $stylesheet) {

+ 82 - 12
library/Zend/Form.php

@@ -226,7 +226,6 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Registers form view helper as decorator
      *
      * @param mixed $options
-     * @return void
      */
     public function __construct($options = null)
     {
@@ -263,6 +262,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
 
         $displayGroups = array();
         foreach ($this->_displayGroups as $group)  {
+            /** @var Zend_Form_DisplayGroup $clone */
             $clone    = clone $group;
             $elements = array();
             foreach ($clone->getElements() as $name => $e) {
@@ -281,9 +281,11 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      */
     public function reset()
     {
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $element) {
             $element->setValue(null);
         }
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $subForm) {
             $subForm->reset();
         }
@@ -439,6 +441,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      *
      * @param  string $type
      * @return Zend_Loader_PluginLoader_Interface
+     * @throws Zend_Form_Exception
      */
     public function getPluginLoader($type = null)
     {
@@ -563,10 +566,12 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             'type'   => $type,
         );
 
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $element) {
             $element->addPrefixPath($prefix, $path, $type);
         }
 
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $subForm) {
             $subForm->addElementPrefixPath($prefix, $path, $type);
         }
@@ -584,6 +589,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     {
         $this->_elementPrefixPaths = $this->_elementPrefixPaths + $spec;
 
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $element) {
             $element->addPrefixPaths($spec);
         }
@@ -605,6 +611,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             'path'   => $path,
         );
 
+        /** @var Zend_Form_DisplayGroup $group */
         foreach ($this->getDisplayGroups() as $group) {
             $group->addPrefixPath($prefix, $path);
         }
@@ -855,6 +862,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      *
      * @param  string $name
      * @return Zend_Form
+     * @throws Zend_Form_Exception
      */
     public function setName($name)
     {
@@ -1074,9 +1082,10 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * settings as specified in the form object (including plugin loader
      * prefix paths, default decorators, etc.).
      *
-     * @param  string $type
-     * @param  string $name
+     * @param  string            $type
+     * @param  string            $name
      * @param  array|Zend_Config $options
+     * @throws Zend_Form_Exception
      * @return Zend_Form_Element
      */
     public function createElement($type, $name, $options = null)
@@ -1234,6 +1243,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 unset($this->_order[$name]);
                 $this->_orderUpdated = true;
             } else {
+                /** @var Zend_Form_DisplayGroup $group */
                 foreach ($this->_displayGroups as $group) {
                     if (null !== $group->getElement($name)) {
                         $group->removeElement($name);
@@ -1268,17 +1278,23 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      *
      * Sets values for all elements specified in the array of $defaults.
      *
-     * @param  array $defaults
+     * @param  array|Traversable $defaults
+     * @throws Zend_Form_Exception When invalid type is passed
      * @return Zend_Form
      */
-    public function setDefaults(array $defaults)
+    public function setDefaults($defaults)
     {
+        if (!is_array($defaults) && !$defaults instanceof Traversable) {
+            throw new Zend_Form_Exception('Argument passed to setDefaults() must be of type array or Traversable.');
+        }
+
         $eBelongTo = null;
 
         if ($this->isArray()) {
             $eBelongTo = $this->getElementsBelongTo();
             $defaults = $this->_dissolveArrayValue($defaults, $eBelongTo);
         }
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $name => $element) {
             $check = $defaults;
             if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) {
@@ -1289,6 +1305,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 $defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name);
             }
         }
+        /** @var Zend_Form_SubForm $form */
         foreach ($this->getSubForms() as $name => $form) {
             if (!$form->isArray() && array_key_exists($name, $defaults)) {
                 $form->setDefaults($defaults[$name]);
@@ -1313,6 +1330,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             $element->setValue($value);
         } else {
             if (is_scalar($value)) {
+                /** @var Zend_Form_SubForm $subForm */
                 foreach ($this->getSubForms() as $subForm) {
                     $subForm->setDefault($name, $value);
                 }
@@ -1339,6 +1357,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             return $subForm->getValues(true);
         }
 
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $subForm) {
             if ($name == $subForm->getElementsBelongTo()) {
                 return $subForm->getValues(true);
@@ -1361,7 +1380,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
         if ($this->isArray()) {
             $eBelongTo = $this->getElementsBelongTo();
         }
-
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $key => $element) {
             if (!$element->getIgnore()) {
                 $merge = array();
@@ -1374,6 +1393,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 $values = $this->_array_replace_recursive($values, $merge);
             }
         }
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $key => $subForm) {
             $merge = array();
             if (!$subForm->isArray()) {
@@ -1415,6 +1435,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             $data = $this->_dissolveArrayValue($data, $eBelongTo);
         }
         $context = $data;
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $key => $element) {
             if (!$element->getIgnore()) {
                 $check = $data;
@@ -1434,6 +1455,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 }
             }
         }
+        /** @var Zend_Form_SubForm $form */
         foreach ($this->getSubForms() as $key => $form) {
             $merge = array();
             if (isset($data[$key]) && !$form->isArray()) {
@@ -1481,6 +1503,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     public function getUnfilteredValues()
     {
         $values = array();
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $key => $element) {
             $values[$key] = $element->getUnfilteredValue();
         }
@@ -1496,6 +1519,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      */
     public function setElementFilters(array $filters)
     {
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $element) {
             $element->setFilters($filters);
         }
@@ -1545,6 +1569,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
         }
 
         if (null === $name) {
+            /** @var Zend_Form_Element $element */
             foreach ($this->getElements() as $element) {
                 $element->setBelongsTo($array);
             }
@@ -1606,6 +1631,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     public function addSubForm(Zend_Form $form, $name, $order = null)
     {
         $name = (string) $name;
+        /** @var Zend_Loader_PluginLoader $loader */
         foreach ($this->_loaders as $type => $loader) {
             $loaderPaths = $loader->getPaths();
             foreach ($loaderPaths as $prefix => $paths) {
@@ -1868,7 +1894,8 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Add a display group object (used with cloning)
      *
      * @param  Zend_Form_DisplayGroup $group
-     * @param  string|null $name
+     * @param  string|null            $name
+     * @throws Zend_Form_Exception
      * @return Zend_Form
      */
     protected function _addDisplayGroupObject(Zend_Form_DisplayGroup $group, $name = null)
@@ -2001,6 +2028,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     {
         $name = (string) $name;
         if (array_key_exists($name, $this->_displayGroups)) {
+            /** @var Zend_Form_Element $element */
             foreach ($this->_displayGroups[$name] as $key => $element) {
                 if (array_key_exists($key, $this->_elements)) {
                     $this->_order[$key]  = $element->getOrder();
@@ -2030,6 +2058,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             if (array_key_exists($key, $this->_order)) {
                 unset($this->_order[$key]);
             }
+            /** @var Zend_Form_Element $element */
             foreach ($group as $name => $element) {
                 if (isset($this->_elements[$name])) {
                     $this->_order[$name] = $element->getOrder();
@@ -2194,6 +2223,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 array_splice($ordered, $order, 0, array($this->$name));
             } else if ($this->$name instanceof Zend_Form_DisplayGroup) {
                 $subordered = array();
+                /** @var Zend_Form_Element $element */
                 foreach ($this->$name->getElements() as $element) {
                     $suborder = $element->getOrder();
                     $suborder = (null !== $suborder) ? $suborder : count($subordered);
@@ -2211,8 +2241,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * This is a helper function until php 5.3 is widespreaded
      *
      * @param array $into
-     * @access protected
-     * @return void
+     * @return array
      */
     protected function _array_replace_recursive(array $into)
     {
@@ -2237,7 +2266,8 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Validate the form
      *
      * @param  array $data
-     * @return boolean
+     * @throws Zend_Form_Exception
+     * @return bool
      */
     public function isValid($data)
     {
@@ -2254,6 +2284,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             $data = $this->_dissolveArrayValue($data, $eBelongTo);
         }
         $context = $data;
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $key => $element) {
             if (null !== $translator && $this->hasTranslator()
                     && !$element->hasTranslator()) {
@@ -2270,6 +2301,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 $data = $this->_dissolveArrayUnsetKey($data, $belongsTo, $key);
             }
         }
+        /** @var Zend_Form_SubForm $form */
         foreach ($this->getSubForms() as $key => $form) {
             if (null !== $translator && $this->hasTranslator()
                     && !$form->hasTranslator()) {
@@ -2313,6 +2345,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
         $valid      = true;
         $context    = $data;
 
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $key => $element) {
             $check = $data;
             if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) {
@@ -2326,6 +2359,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
                 $data = $this->_dissolveArrayUnsetKey($data, $belongsTo, $key);
             }
         }
+        /** @var Zend_Form_SubForm $form */
         foreach ($this->getSubForms() as $key => $form) {
             if (null !== $translator && !$form->hasTranslator()) {
                 $form->setTranslator($translator);
@@ -2494,13 +2528,34 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      */
     public function hasErrors()
     {
-        return $this->_errorsExist;
+        $errors = $this->_errorsExist;
+
+        if (!$errors) {
+            /** @var Zend_Form_Element $element */
+            foreach ($this->getElements() as $element) {
+                if ($element->hasErrors()) {
+                    $errors = true;
+                    break;
+                }
+            }
+
+            /** @var Zend_Form_SubForm $subForm */
+            foreach ($this->getSubForms() as $subForm) {
+                if ($subForm->hasErrors()) {
+                    $errors = true;
+                    break;
+                }
+            }
+        }
+
+        return $errors;
     }
 
     /**
      * Get error codes for all elements failing validation
      *
      * @param  string $name
+     * @param  bool   $suppressArrayNotation
      * @return array
      */
     public function getErrors($name = null, $suppressArrayNotation = false)
@@ -2514,9 +2569,11 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             }
         }
 
+        /** @var Zend_Form_Element $element */
         foreach ($this->_elements as $key => $element) {
             $errors[$key] = $element->getErrors();
         }
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $key => $subForm) {
             $merge = array();
             if (!$subForm->isArray()) {
@@ -2552,6 +2609,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             } else if (isset($this->_subForms[$name])) {
                 return $this->getSubForm($name)->getMessages(null, true);
             }
+            /** @var Zend_Form_SubForm $subForm */
             foreach ($this->getSubForms() as $key => $subForm) {
                 if ($subForm->isArray()) {
                     $belongTo = $subForm->getElementsBelongTo();
@@ -2569,6 +2627,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
 
         $messages = array();
 
+        /** @var Zend_Form_Element $element */
         foreach ($this->getElements() as $name => $element) {
             $eMessages = $element->getMessages();
             if (!empty($eMessages)) {
@@ -2576,6 +2635,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             }
         }
 
+        /** @var Zend_Form_SubForm $subForm */
         foreach ($this->getSubForms() as $key => $subForm) {
             $merge = $subForm->getMessages(null, true);
             if (!empty($merge)) {
@@ -2665,7 +2725,8 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Add a decorator for rendering the element
      *
      * @param  string|Zend_Form_Decorator_Interface $decorator
-     * @param  array|Zend_Config $options Options with which to initialize decorator
+     * @param  array|Zend_Config                    $options Options with which to initialize decorator
+     * @throws Zend_Form_Exception
      * @return Zend_Form
      */
     public function addDecorator($decorator, $options = null)
@@ -2708,6 +2769,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Add many decorators at once
      *
      * @param  array $decorators
+     * @throws Zend_Form_Exception
      * @return Zend_Form
      */
     public function addDecorators(array $decorators)
@@ -2876,6 +2938,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             $elementObjs = $this->getElements();
         }
 
+        /** @var Zend_Form_Element $element */
         foreach ($elementObjs as $element) {
             $element->setDecorators($decorators);
         }
@@ -2893,6 +2956,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      */
     public function setDisplayGroupDecorators(array $decorators)
     {
+        /** @var Zend_Form_DisplayGroup $group */
         foreach ($this->getDisplayGroups() as $group) {
             $group->setDecorators($decorators);
         }
@@ -2908,6 +2972,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      */
     public function setSubFormDecorators(array $decorators)
     {
+        /** @var Zend_Form_SubForm $form */
         foreach ($this->getSubForms() as $form) {
             $form->setDecorators($decorators);
         }
@@ -2928,6 +2993,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
         }
 
         $content = '';
+        /** @var Zend_Form_Decorator_Abstract $decorator */
         foreach ($this->getDecorators() as $decorator) {
             $decorator->setElement($this);
             $content = $decorator->render($content);
@@ -2963,6 +3029,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Set translator object
      *
      * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
+     * @throws Zend_Form_Exception
      * @return Zend_Form
      */
     public function setTranslator($translator = null)
@@ -2985,6 +3052,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
      * Set global default translator object
      *
      * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
+     * @throws Zend_Form_Exception
      * @return void
      */
     public static function setDefaultTranslator($translator = null)
@@ -3206,6 +3274,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     /**
      * Current element/subform/display group
      *
+     * @throws Zend_Form_Exception
      * @return Zend_Form_Element|Zend_Form_DisplayGroup|Zend_Form
      */
     public function current()
@@ -3339,6 +3408,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
     /**
      * Sort items according to their order
      *
+     * @throws Zend_Form_Exception
      * @return void
      */
     protected function _sort()

+ 60 - 42
library/Zend/Gdata/Docs.php

@@ -58,31 +58,38 @@ require_once 'Zend/Gdata/App/Extension/Title.php';
  */
 class Zend_Gdata_Docs extends Zend_Gdata
 {
-
     const DOCUMENTS_LIST_FEED_URI = 'https://docs.google.com/feeds/documents/private/full';
     const DOCUMENTS_FOLDER_FEED_URI = 'https://docs.google.com/feeds/folders/private/full';
     const DOCUMENTS_CATEGORY_SCHEMA = 'http://schemas.google.com/g/2005#kind';
     const DOCUMENTS_CATEGORY_TERM = 'http://schemas.google.com/docs/2007#folder';
     const AUTH_SERVICE_NAME = 'writely';
 
+    /**
+     * @var string
+     */
     protected $_defaultPostUri = self::DOCUMENTS_LIST_FEED_URI;
 
-    private static $SUPPORTED_FILETYPES = array(
-      'TXT'=>'text/plain',
-      'CSV'=>'text/csv',
-      'TSV'=>'text/tab-separated-values',
-      'TAB'=>'text/tab-separated-values',
-      'HTML'=>'text/html',
-      'HTM'=>'text/html',
-      'DOC'=>'application/msword',
-      'ODS'=>'application/vnd.oasis.opendocument.spreadsheet',
-      'ODT'=>'application/vnd.oasis.opendocument.text',
-      'RTF'=>'application/rtf',
-      'SXW'=>'application/vnd.sun.xml.writer',
-      'XLS'=>'application/vnd.ms-excel',
-      'XLSX'=>'application/vnd.ms-excel',
-      'PPT'=>'application/vnd.ms-powerpoint',
-      'PPS'=>'application/vnd.ms-powerpoint');
+    /**
+     * @var array
+     */
+    protected static $SUPPORTED_FILETYPES = array(
+        'TXT'  => 'text/plain',
+        'CSV'  => 'text/csv',
+        'TSV'  => 'text/tab-separated-values',
+        'TAB'  => 'text/tab-separated-values',
+        'HTML' => 'text/html',
+        'HTM'  => 'text/html',
+        'DOC'  => 'application/msword',
+        'DOCX' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+        'ODS'  => 'application/vnd.oasis.opendocument.spreadsheet',
+        'ODT'  => 'application/vnd.oasis.opendocument.text',
+        'RTF'  => 'application/rtf',
+        'SXW'  => 'application/vnd.sun.xml.writer',
+        'XLS'  => 'application/vnd.ms-excel',
+        'XLSX' => 'application/vnd.ms-excel',
+        'PPT'  => 'application/vnd.ms-powerpoint',
+        'PPS'  => 'application/vnd.ms-powerpoint'
+    );
 
     /**
      * Create Gdata_Docs object
@@ -108,8 +115,9 @@ class Zend_Gdata_Docs extends Zend_Gdata
      * @return string The mime type to be sent to the server to tell it how the
      *          multipart mime data should be interpreted.
      */
-    public static function lookupMimeType($fileExtension) {
-      return self::$SUPPORTED_FILETYPES[strtoupper($fileExtension)];
+    public static function lookupMimeType($fileExtension)
+    {
+        return self::$SUPPORTED_FILETYPES[strtoupper($fileExtension)];
     }
 
     /**
@@ -135,13 +143,15 @@ class Zend_Gdata_Docs extends Zend_Gdata
      *
      * @param mixed $location The location for the entry, as a URL or Query
      * @return Zend_Gdata_Docs_DocumentListEntry
+     * @throws Zend_Gdata_App_InvalidArgumentException
      */
     public function getDocumentListEntry($location = null)
     {
         if ($location === null) {
             require_once 'Zend/Gdata/App/InvalidArgumentException.php';
             throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Location must not be null');
+                    'Location must not be null'
+            );
         } else if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
@@ -161,40 +171,45 @@ class Zend_Gdata_Docs extends Zend_Gdata
      *     Document List URLs. Examples: document, spreadsheet, presentation
      * @return Zend_Gdata_Docs_DocumentListEntry
      */
-    public function getDoc($docId, $docType) {
+    public function getDoc($docId, $docType)
+    {
         $location = 'https://docs.google.com/feeds/documents/private/full/' .
             $docType . '%3A' . $docId;
+
         return $this->getDocumentListEntry($location);
     }
 
     /**
      * Retreive entry object for the desired word processing document.
      *
-     * @param string $id The URL id for the document. Example:
-     *     dcmg89gw_62hfjj8m
+     * @param string $id The URL id for the document. Example: dcmg89gw_62hfjj8m
+     * @return Zend_Gdata_Docs_DocumentListEntry
      */
-    public function getDocument($id) {
-      return $this->getDoc($id, 'document');
+    public function getDocument($id)
+    {
+        return $this->getDoc($id, 'document');
     }
 
     /**
      * Retreive entry object for the desired spreadsheet.
      *
-     * @param string $id The URL id for the document. Example:
-     *     pKq0CzjiF3YmGd0AIlHKqeg
+     * @param string $id The URL id for the document. Example: pKq0CzjiF3YmGd0AIlHKqeg
+     * @return Zend_Gdata_Docs_DocumentListEntry
      */
-    public function getSpreadsheet($id) {
-      return $this->getDoc($id, 'spreadsheet');
+    public function getSpreadsheet($id)
+    {
+        return $this->getDoc($id, 'spreadsheet');
     }
 
     /**
      * Retreive entry object for the desired presentation.
      *
-     * @param string $id The URL id for the document. Example:
-     *     dcmg89gw_21gtrjcn
+     * @param string $id The URL id for the document. Example: dcmg89gw_21gtrjcn
+     * @return Zend_Gdata_Docs_DocumentListEntry
      */
-    public function getPresentation($id) {
-      return $this->getDoc($id, 'presentation');
+    public function getPresentation($id)
+    {
+        return $this->getDoc($id, 'presentation');
     }
 
     /**
@@ -219,8 +234,9 @@ class Zend_Gdata_Docs extends Zend_Gdata
      * @return Zend_Gdata_Docs_DocumentListEntry The entry for the newly
      *         created Google Document.
      */
-    public function uploadFile($fileLocation, $title=null, $mimeType=null,
-                               $uri=null)
+    public function uploadFile($fileLocation, $title = null, $mimeType = null,
+        $uri = null
+    )
     {
         // Set the URI to which the file will be uploaded.
         if ($uri === null) {
@@ -264,11 +280,14 @@ class Zend_Gdata_Docs extends Zend_Gdata
      * @todo ZF-8732: This should return a *subclass* of Zend_Gdata_Entry, but
      *       the appropriate type doesn't exist yet.
      */
-    public function createFolder($folderName, $folderResourceId=null) {
-        $category = new Zend_Gdata_App_Extension_Category(self::DOCUMENTS_CATEGORY_TERM,
-                                                          self::DOCUMENTS_CATEGORY_SCHEMA);
-        $title = new Zend_Gdata_App_Extension_Title($folderName);
-        $entry = new Zend_Gdata_Entry();
+    public function createFolder($folderName, $folderResourceId = null)
+    {
+        $category = new Zend_Gdata_App_Extension_Category(
+            self::DOCUMENTS_CATEGORY_TERM,
+            self::DOCUMENTS_CATEGORY_SCHEMA
+        );
+        $title    = new Zend_Gdata_App_Extension_Title($folderName);
+        $entry    = new Zend_Gdata_Entry();
 
         $entry->setCategory(array($category));
         $entry->setTitle($title);
@@ -295,9 +314,8 @@ class Zend_Gdata_Docs extends Zend_Gdata
      *     service after insertion.
      */
     public function insertDocument($data, $uri,
-        $className='Zend_Gdata_Docs_DocumentListEntry')
+        $className = 'Zend_Gdata_Docs_DocumentListEntry')
     {
         return $this->insertEntry($data, $uri, $className);
     }
-
 }

+ 23 - 7
library/Zend/Loader/PluginLoader.php

@@ -44,6 +44,12 @@ class Zend_Loader_PluginLoader implements Zend_Loader_PluginLoader_Interface
     protected static $_includeFileCache;
 
     /**
+     * Class map cache file handler
+     * @var resource
+     */
+    protected static $_includeFileCacheHandler;
+
+    /**
      * Instance loaded plugin paths
      *
      * @var array
@@ -438,6 +444,13 @@ class Zend_Loader_PluginLoader implements Zend_Loader_PluginLoader_Interface
      */
     public static function setIncludeFileCache($file)
     {
+        if (!empty(self::$_includeFileCacheHandler)) {
+            flock(self::$_includeFileCacheHandler, LOCK_UN);
+            fclose(self::$_includeFileCacheHandler);
+        }
+
+        self::$_includeFileCacheHandler = null;
+
         if (null === $file) {
             self::$_includeFileCache = null;
             return;
@@ -477,14 +490,17 @@ class Zend_Loader_PluginLoader implements Zend_Loader_PluginLoader_Interface
      */
     protected static function _appendIncFile($incFile)
     {
-        if (!file_exists(self::$_includeFileCache)) {
-            $file = '<?php';
-        } else {
-            $file = file_get_contents(self::$_includeFileCache);
+        if (!isset(self::$_includeFileCacheHandler)) {
+            self::$_includeFileCacheHandler = fopen(self::$_includeFileCache, 'ab');
+
+            if (!flock(self::$_includeFileCacheHandler, LOCK_EX | LOCK_NB, $wouldBlock) || $wouldBlock) {
+                self::$_includeFileCacheHandler = false;
+            }
         }
-        if (!strstr($file, $incFile)) {
-            $file .= "\ninclude_once '$incFile';";
-            file_put_contents(self::$_includeFileCache, $file);
+
+        if (false !== self::$_includeFileCacheHandler) {
+            $line = "<?php include_once '$incFile'?>\n";
+            fwrite(self::$_includeFileCacheHandler, $line, strlen($line));
         }
     }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 701 - 624
library/Zend/Locale.php


+ 4 - 0
library/Zend/Locale/Data.php

@@ -292,6 +292,10 @@ class Zend_Locale_Data
             throw new Zend_Locale_Exception("Locale (" . (string) $locale . ") is a unknown locale");
         }
 
+        if (Zend_Locale::isAlias($locale)) {
+            // Return a valid CLDR locale so that the XML file can be loaded.
+            return Zend_Locale::getAlias($locale);
+        }
         return (string) $locale;
     }
 

+ 72 - 32
library/Zend/Locale/Format.php

@@ -59,7 +59,7 @@ class Zend_Locale_Format
      * @param  array  $options  Array of options, keyed by option name: format_type = 'iso' | 'php', fix_date = true | false,
      *                          locale = Zend_Locale | locale string, precision = whole number between -1 and 30
      * @throws Zend_Locale_Exception
-     * @return Options array if no option was given
+     * @return array if no option was given
      */
     public static function setOptions(array $options = array())
     {
@@ -74,7 +74,7 @@ class Zend_Locale_Format
      * @param  array  $options  Array of options, keyed by option name: format_type = 'iso' | 'php', fix_date = true | false,
      *                          locale = Zend_Locale | locale string, precision = whole number between -1 and 30
      * @throws Zend_Locale_Exception
-     * @return Options array if no option was given
+     * @return array if no option was given
      */
     private static function _checkOptions(array $options = array())
     {
@@ -292,7 +292,7 @@ class Zend_Locale_Format
      * ##0.00 -> 12345.12345 -> 12345.12
      * ##,##0.00 -> 12345.12345 -> 12,345.12
      *
-     * @param   string  $input    Localized number string
+     * @param   string  $value    Localized number string
      * @param   array   $options  Options: number_format, locale, precision. See {@link setOptions()} for details.
      * @return  string  locale formatted number
      * @throws Zend_Locale_Exception
@@ -309,9 +309,9 @@ class Zend_Locale_Format
 
         // Get correct signs for this locale
         $symbols = Zend_Locale_Data::getList($options['locale'], 'symbols');
-        $oenc = iconv_get_encoding('internal_encoding');
-        iconv_set_encoding('internal_encoding', 'UTF-8');
-
+        $oenc = self::_getEncoding();
+        self::_setEncoding('UTF-8');
+        
         // Get format
         $format = $options['number_format'];
         if ($format === null) {
@@ -345,7 +345,7 @@ class Zend_Locale_Format
         }
 
         if (iconv_strpos($format, '0') === false) {
-            iconv_set_encoding('internal_encoding', $oenc);
+            self::_setEncoding($oenc);
             require_once 'Zend/Locale/Exception.php';
             throw new Zend_Locale_Exception('Wrong format... missing 0');
         }
@@ -471,10 +471,16 @@ class Zend_Locale_Format
             }
         }
 
-        iconv_set_encoding('internal_encoding', $oenc);
+        self::_setEncoding($oenc);
         return (string) $format;
     }
 
+    /**
+     * @param string $format
+     * @param string $value
+     * @param int $precision
+     * @return string
+     */
     private static function _seperateFormat($format, $value, $precision)
     {
         if (iconv_strpos($format, ';') !== false) {
@@ -531,7 +537,9 @@ class Zend_Locale_Format
      * Internal method to convert cldr number syntax into regex
      *
      * @param  string $type
+     * @param  array  $options Options: locale. See {@link setOptions()} for details.
      * @return string
+     * @throws Zend_Locale_Exception
      */
     private static function _getRegexForType($type, $options)
     {
@@ -631,7 +639,7 @@ class Zend_Locale_Format
     /**
      * Alias for getNumber
      *
-     * @param   string  $value    Number to localize
+     * @param   string  $input    Number to localize
      * @param   array   $options  Options: locale, precision. See {@link setOptions()} for details.
      * @return  float
      */
@@ -658,9 +666,9 @@ class Zend_Locale_Format
      * Returns if a float was found
      * Alias for isNumber()
      *
-     * @param   string  $input    Localized number string
-     * @param   array   $options  Options: locale. See {@link setOptions()} for details.
-     * @return  boolean           Returns true if a number was found
+     * @param   string $value  Localized number string
+     * @param   array $options Options: locale. See {@link setOptions()} for details.
+     * @return  boolean        Returns true if a number was found
      */
     public static function isFloat($value, array $options = array())
     {
@@ -706,9 +714,9 @@ class Zend_Locale_Format
     /**
      * Returns if a integer was found
      *
-     * @param   string  $input    Localized number string
-     * @param   array   $options  Options: locale. See {@link setOptions()} for details.
-     * @return  boolean           Returns true if a integer was found
+     * @param  string $value Localized number string
+     * @param  array $options Options: locale. See {@link setOptions()} for details.
+     * @return boolean Returns true if a integer was found
      */
     public static function isInteger($value, array $options = array())
     {
@@ -755,15 +763,16 @@ class Zend_Locale_Format
             }
         }
 
-        return join($values);
+        return implode($values);
     }
 
     /**
      * Parse date and split in named array fields
      *
-     * @param   string  $date     Date string to parse
-     * @param   array   $options  Options: format_type, fix_date, locale, date_format. See {@link setOptions()} for details.
-     * @return  array             Possible array members: day, month, year, hour, minute, second, fixed, format
+     * @param  string $date    Date string to parse
+     * @param  array  $options Options: format_type, fix_date, locale, date_format. See {@link setOptions()} for details.
+     * @return array Possible array members: day, month, year, hour, minute, second, fixed, format
+     * @throws Zend_Locale_Exception
      */
     private static function _parseDate($date, $options)
     {
@@ -780,8 +789,8 @@ class Zend_Locale_Format
         $result['date_format'] = $format; // save the format used to normalize $number (convenience)
         $result['locale'] = $options['locale']; // save the locale used to normalize $number (convenience)
 
-        $oenc = iconv_get_encoding('internal_encoding');
-        iconv_set_encoding('internal_encoding', 'UTF-8');
+        $oenc = self::_getEncoding();
+        self::_setEncoding('UTF-8');
         $day   = iconv_strpos($format, 'd');
         $month = iconv_strpos($format, 'M');
         $year  = iconv_strpos($format, 'y');
@@ -846,7 +855,7 @@ class Zend_Locale_Format
         }
 
         if (empty($parse)) {
-            iconv_set_encoding('internal_encoding', $oenc);
+            self::_setEncoding($oenc);
             require_once 'Zend/Locale/Exception.php';
             throw new Zend_Locale_Exception("Unknown date format, neither date nor time in '" . $format . "' found");
         }
@@ -866,7 +875,7 @@ class Zend_Locale_Format
         preg_match_all('/\d+/u', $number, $splitted);
 
         if (count($splitted[0]) == 0) {
-            iconv_set_encoding('internal_encoding', $oenc);
+            self::_setEncoding($oenc);
             require_once 'Zend/Locale/Exception.php';
             throw new Zend_Locale_Exception("No date part in '$date' found.");
         }
@@ -972,7 +981,7 @@ class Zend_Locale_Format
                 if (($position !== false) and ((iconv_strpos($date, $result['day']) === false) or
                                                (isset($result['year']) and (iconv_strpos($date, $result['year']) === false)))) {
                     if ($options['fix_date'] !== true) {
-                        iconv_set_encoding('internal_encoding', $oenc);
+                        self::_setEncoding($oenc);
                         require_once 'Zend/Locale/Exception.php';
                         throw new Zend_Locale_Exception("Unable to parse date '$date' using '" . $format
                             . "' (false month, $position, $month)");
@@ -988,7 +997,7 @@ class Zend_Locale_Format
             if (isset($result['day']) and isset($result['year'])) {
                 if ($result['day'] > 31) {
                     if ($options['fix_date'] !== true) {
-                        iconv_set_encoding('internal_encoding', $oenc);
+                        self::_setEncoding($oenc);
                         require_once 'Zend/Locale/Exception.php';
                         throw new Zend_Locale_Exception("Unable to parse date '$date' using '"
                                                       . $format . "' (d <> y)");
@@ -1004,7 +1013,7 @@ class Zend_Locale_Format
             if (isset($result['month']) and isset($result['year'])) {
                 if ($result['month'] > 31) {
                     if ($options['fix_date'] !== true) {
-                        iconv_set_encoding('internal_encoding', $oenc);
+                        self::_setEncoding($oenc);
                         require_once 'Zend/Locale/Exception.php';
                         throw new Zend_Locale_Exception("Unable to parse date '$date' using '"
                                                       . $format . "' (M <> y)");
@@ -1020,7 +1029,7 @@ class Zend_Locale_Format
             if (isset($result['month']) and isset($result['day'])) {
                 if ($result['month'] > 12) {
                     if ($options['fix_date'] !== true || $result['month'] > 31) {
-                        iconv_set_encoding('internal_encoding', $oenc);
+                        self::_setEncoding($oenc);
                         require_once 'Zend/Locale/Exception.php';
                         throw new Zend_Locale_Exception("Unable to parse date '$date' using '"
                                                       . $format . "' (M <> d)");
@@ -1047,7 +1056,7 @@ class Zend_Locale_Format
             }
         }
 
-        iconv_set_encoding('internal_encoding', $oenc);
+        self::_setEncoding($oenc);
         return $result;
     }
 
@@ -1181,8 +1190,9 @@ class Zend_Locale_Format
     /**
      * Returns the default time format for $locale.
      *
-     * @param  string|Zend_Locale  $locale  OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
+     * @param  string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
      * @return string  format
+     * @throws Zend_Locale_Exception
      */
     public static function getTimeFormat($locale = null)
     {
@@ -1196,7 +1206,7 @@ class Zend_Locale_Format
 
     /**
      * Returns an array with 'hour', 'minute', and 'second' elements extracted from $time
-     * according to the order described in $format.  For a format of 'H:m:s', and
+     * according to the order described in $format.  For a format of 'H:i:s', and
      * an input of 11:20:55, getTime() would return:
      * array ('hour' => 11, 'minute' => 20, 'second' => 55)
      * The optional $locale parameter may be used to help extract times from strings
@@ -1219,8 +1229,9 @@ class Zend_Locale_Format
     /**
      * Returns the default datetime format for $locale.
      *
-     * @param  string|Zend_Locale  $locale  OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
+     * @param  string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
      * @return string  format
+     * @throws Zend_Locale_Exception
      */
     public static function getDateTimeFormat($locale = null)
     {
@@ -1234,7 +1245,7 @@ class Zend_Locale_Format
 
     /**
      * Returns an array with 'year', 'month', 'day', 'hour', 'minute', and 'second' elements
-     * extracted from $datetime according to the order described in $format.  For a format of 'd.M.y H:m:s',
+     * extracted from $datetime according to the order described in $format.  For a format of 'd.M.y H:i:s',
      * and an input of 10.05.1985 11:20:55, getDateTime() would return:
      * array ('year' => 1985, 'month' => 5, 'day' => 10, 'hour' => 11, 'minute' => 20, 'second' => 55)
      * The optional $locale parameter may be used to help extract times from strings
@@ -1264,4 +1275,33 @@ class Zend_Locale_Format
     {
         return (@preg_match('/\pL/u', 'a')) ? true : false;
     }
+
+    /**
+     * Internal method to retrieve the current encoding via the ini setting
+     * default_charset for PHP >= 5.6 or iconv_get_encoding otherwise.
+     *
+     * @return string
+     */
+    protected static function _getEncoding()
+    {
+        $oenc = PHP_VERSION_ID < 50600
+            ? iconv_get_encoding('internal_encoding')
+            : ini_get('default_charset');
+
+    }
+
+    /**
+     * Internal method to set the encoding via the ini setting
+     * default_charset for PHP >= 5.6 or iconv_set_encoding otherwise.
+     *
+     * @return void
+     */
+    protected static function _setEncoding($enc)
+    {
+        if (PHP_VERSION_ID < 50600) {
+            iconv_set_encoding('internal_encoding', $enc);
+        } else {
+            ini_set('default_charset', $enc);
+        }
+    }
 }

+ 5 - 1
library/Zend/Mobile/Push/Message/Gcm.php

@@ -267,6 +267,10 @@ class Zend_Mobile_Push_Message_Gcm extends Zend_Mobile_Push_Message_Abstract
         if ($this->_ttl !== 2419200) {
             $json['time_to_live'] = $this->_ttl;
         }
-        return json_encode($json);
+        if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
+            return json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
+        } else {
+            return json_encode($json);
+        }
     }
 }

+ 15 - 5
library/Zend/Navigation/Container.php

@@ -200,12 +200,12 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
     /**
      * Removes the given page from the container
      *
-     * @param  Zend_Navigation_Page|int $page  page to remove, either a page
-     *                                         instance or a specific page order
-     * @return bool                            whether the removal was
-     *                                         successful
+     * @param  Zend_Navigation_Page|int $page      page to remove, either a page
+     *                                             instance or a specific page order
+     * @param  bool                     $recursive [optional] whether to remove recursively
+     * @return bool whether the removal was successful
      */
-    public function removePage($page)
+    public function removePage($page, $recursive = false)
     {
         if ($page instanceof Zend_Navigation_Page) {
             $hash = $page->hashCode();
@@ -225,6 +225,16 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
             return true;
         }
 
+        if ($recursive) {
+            /** @var Zend_Navigation_Page $childPage */
+            foreach ($this->_pages as $childPage) {
+                if ($childPage->hasPage($page, true)) {
+                    $childPage->removePage($page, true);
+                    return true;
+                }
+            }
+        }
+
         return false;
     }
 

+ 11 - 10
library/Zend/Pdf.php

@@ -95,8 +95,6 @@ class Zend_Pdf
      */
     const PDF_HEADER  = "%PDF-1.4\n%\xE2\xE3\xCF\xD3\n";
 
-
-
     /**
      * Pages collection
      *
@@ -299,12 +297,12 @@ class Zend_Pdf
      *
      * If $source is a string and $load is true, then it loads document
      * from a file.
-
      * $revision used to roll back document to specified version
      * (0 - current version, 1 - previous version, 2 - ...)
      *
      * @param string  $source - PDF file to load
      * @param integer $revision
+     * @param bool    $load
      * @throws Zend_Pdf_Exception
      * @return Zend_Pdf
      */
@@ -442,12 +440,12 @@ class Zend_Pdf
         $this->_loadPages($this->_trailer->Root->Pages);
     }
 
-
     /**
      * Load pages recursively
      *
      * @param Zend_Pdf_Element_Reference $pages
-     * @param array|null $attributes
+     * @param array|null                 $attributes
+     * @throws Zend_Pdf_Exception
      */
     protected function _loadPages(Zend_Pdf_Element_Reference $pages, $attributes = array())
     {
@@ -536,6 +534,7 @@ class Zend_Pdf
      * Load outlines recursively
      *
      * @param Zend_Pdf_Element_Reference $root Document catalog entry
+     * @throws Zend_Pdf_Exception
      */
     protected function _loadOutlines(Zend_Pdf_Element_Reference $root)
     {
@@ -916,8 +915,9 @@ class Zend_Pdf
     /**
      * Set specified named destination
      *
-     * @param string $name
-     * @param Zend_Pdf_Destination_Explicit|Zend_Pdf_Action_GoTo $target
+     * @param string                                             $name
+     * @param Zend_Pdf_Destination_Explicit|Zend_Pdf_Action_GoTo $destination
+     * @throws Zend_Pdf_Exception
      */
     public function setNamedDestination($name, $destination = null)
     {
@@ -975,8 +975,8 @@ class Zend_Pdf
      *
      * Returns Zend_Pdf_Page page object or null if destination is not found within PDF document.
      *
-     * @param Zend_Pdf_Destination $destination  Destination to resolve
-     * @param boolean $refreshPagesHash  Refresh page collection hashes before processing
+     * @param Zend_Pdf_Destination $destination Destination to resolve
+     * @param bool $refreshPageCollectionHashes Refresh page collection hashes before processing
      * @return Zend_Pdf_Page|null
      * @throws Zend_Pdf_Exception
      */
@@ -1034,7 +1034,7 @@ class Zend_Pdf
      * @todo Give appropriate name and make method public
      *
      * @param Zend_Pdf_Action $action
-     * @param boolean $refreshPagesHash  Refresh page collection hashes before processing
+     * @param bool $refreshPageCollectionHashes Refresh page collection hashes before processing
      * @return Zend_Pdf_Action|null
      */
     protected function _cleanUpAction(Zend_Pdf_Action $action, $refreshPageCollectionHashes = true)
@@ -1129,6 +1129,7 @@ class Zend_Pdf
      *
      * $fontName should be specified in UTF-8 encoding
      *
+     * @param string $fontName
      * @return Zend_Pdf_Resource_Font_Extracted|null
      * @throws Zend_Pdf_Exception
      */

+ 9 - 3
library/Zend/Service/Audioscrobbler.php

@@ -71,9 +71,15 @@ class Zend_Service_Audioscrobbler
     {
         $this->set('version', '1.0');
 
-        iconv_set_encoding('output_encoding', 'UTF-8');
-        iconv_set_encoding('input_encoding', 'UTF-8');
-        iconv_set_encoding('internal_encoding', 'UTF-8');
+        if (PHP_VERSION_ID < 50600) {
+            iconv_set_encoding('output_encoding', 'UTF-8');
+            iconv_set_encoding('input_encoding', 'UTF-8');
+            iconv_set_encoding('internal_encoding', 'UTF-8');
+        } else {
+            ini_set('output_encoding', 'UTF-8');
+            ini_set('input_encoding', 'UTF-8');
+            ini_set('default_charset', 'UTF-8');
+        }
     }
 
     /**

+ 9 - 4
library/Zend/Service/Technorati.php

@@ -86,10 +86,15 @@ class Zend_Service_Technorati
      */
     public function __construct($apiKey)
     {
-        iconv_set_encoding('output_encoding', 'UTF-8');
-        iconv_set_encoding('input_encoding', 'UTF-8');
-        iconv_set_encoding('internal_encoding', 'UTF-8');
-
+        if (PHP_VERSION_ID < 50600) {
+            iconv_set_encoding('output_encoding', 'UTF-8');
+            iconv_set_encoding('input_encoding', 'UTF-8');
+            iconv_set_encoding('internal_encoding', 'UTF-8');
+        } else {
+            ini_set('output_encoding', 'UTF-8');
+            ini_set('input_encoding', 'UTF-8');
+            ini_set('default_charset', 'UTF-8');
+        }
         $this->_apiKey = $apiKey;
     }
 

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/DomQuery.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Runner_Version */
-require_once 'PHPUnit/Runner/Version.php';
-
 if (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
     include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery37.php');
 } else {

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/DomQuery34.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /** @see Zend_Dom_Query */
 require_once 'Zend/Dom/Query.php';
 

+ 1 - 4
library/Zend/Test/PHPUnit/Constraint/DomQuery37.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /** @see Zend_Dom_Query */
 require_once 'Zend/Dom/Query.php';
 
@@ -193,7 +190,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint
             case self::ASSERT_CONTENT_COUNT:
             case self::ASSERT_CONTENT_COUNT_MIN:
             case self::ASSERT_CONTENT_COUNT_MAX:
-                if (!$match) {
+                if ($match === false) {
                     require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
                     throw new Zend_Test_PHPUnit_Constraint_Exception('No count provided against which to compare');
                 }

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/Exception.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_ExpectationFailedException */
-require_once 'PHPUnit/Framework/ExpectationFailedException.php';
-
 /**
  * Zend_Test_PHPUnit_Constraint_Exception
  *

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/Redirect.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Runner_Version */
-require_once 'PHPUnit/Runner/Version.php';
-
 if (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
     include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect37.php');
 } else {

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/Redirect34.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /**
  * Redirection constraints
  *

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/Redirect37.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /**
  * Redirection constraints
  *

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/ResponseHeader.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Runner_Version */
-require_once 'PHPUnit/Runner/Version.php';
-
 if (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
     include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader37.php');
 } else {

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /**
  * Response header PHPUnit Constraint
  *

+ 0 - 3
library/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php

@@ -20,9 +20,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Framework_Constraint */
-require_once 'PHPUnit/Framework/Constraint.php';
-
 /**
  * Response header PHPUnit Constraint
  *

+ 0 - 9
library/Zend/Test/PHPUnit/ControllerTestCase.php

@@ -19,15 +19,6 @@
  * @version    $Id$
  */
 
-/** @see PHPUnit_Runner_Version */
-require_once 'PHPUnit/Runner/Version.php';
-
-/**
- * Depending on version, include the proper PHPUnit support
- * @see PHPUnit_Autoload
- */
-require_once (version_compare(PHPUnit_Runner_Version::id(), '3.5.0', '>=')) ? 'PHPUnit/Autoload.php' : 'PHPUnit/Framework.php';
-
 /** @see Zend_Controller_Front */
 require_once 'Zend/Controller/Front.php';
 

+ 0 - 5
library/Zend/Test/PHPUnit/DatabaseTestCase.php

@@ -21,11 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_TestCase
- */
-require_once "PHPUnit/Extensions/Database/TestCase.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_Operation_Truncate
  */
 require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php";

+ 0 - 5
library/Zend/Test/PHPUnit/Db/Connection.php

@@ -21,11 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_DataSet_QueryTable
  */
 require_once "Zend/Test/PHPUnit/Db/DataSet/QueryTable.php";

+ 0 - 5
library/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php

@@ -26,11 +26,6 @@
 require_once "Zend/Db/Table/Rowset/Abstract.php";
 
 /**
- * @see PHPUnit_Extensions_Database_DataSet_AbstractTable
- */
-require_once "PHPUnit/Extensions/Database/DataSet/AbstractTable.php";
-
-/**
  * Use a Zend_Db Rowset as a datatable for assertions with other PHPUnit Database extension tables.
  *
  * @uses       PHPUnit_Extensions_Database_DataSet_AbstractTable

+ 0 - 5
library/Zend/Test/PHPUnit/Db/DataSet/DbTable.php

@@ -21,11 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_DataSet_QueryTable
- */
-require_once "PHPUnit/Extensions/Database/DataSet/QueryTable.php";
-
-/**
  * @see Zend_Db_Table_Abstract
  */
 require_once "Zend/Db/Table/Abstract.php";

+ 0 - 4
library/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php

@@ -20,10 +20,6 @@
  * @version    $Id$
  */
 
-require_once "PHPUnit/Extensions/Database/DataSet/QueryDataSet.php";
-
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
 /**
  * @see Zend_Test_PHPUnit_Db_DataSet_DbTable
  */

+ 0 - 10
library/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php

@@ -21,16 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_DataSet_QueryDataSet
- */
-require_once "PHPUnit/Extensions/Database/DataSet/QueryDataSet.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_DataSet_QueryTable
  */
 require_once "Zend/Test/PHPUnit/Db/DataSet/QueryTable.php";

+ 0 - 10
library/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php

@@ -21,16 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_DataSet_QueryTable
- */
-require_once "PHPUnit/Extensions/Database/DataSet/QueryTable.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
  * Represent a PHPUnit Database Extension table with Queries using a Zend_Db adapter for assertion against other tables.
  *
  * @uses       PHPUnit_Extensions_Database_DataSet_QueryTable

+ 0 - 5
library/Zend/Test/PHPUnit/Db/Metadata/Generic.php

@@ -26,11 +26,6 @@
 require_once "Zend/Db/Adapter/Abstract.php";
 
 /**
- * @see PHPUnit_Extensions_Database_DB_IMetaData
- */
-require_once "PHPUnit/Extensions/Database/DB/IMetaData.php";
-
-/**
  * Generic Metadata accessor for the Zend_Db adapters
  *
  * @uses       PHPUnit_Extensions_Database_DB_IMetaData

+ 0 - 21
library/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php

@@ -21,26 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_Operation_IDatabaseOperation
- */
-require_once "PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DataSet_IDataSet
- */
-require_once "PHPUnit/Extensions/Database/DataSet/IDataSet.php";
-
-/**
- * @see PHPUnit_Extensions_Database_Operation_Exception
- */
-require_once "PHPUnit/Extensions/Database/Operation/Exception.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_Connection
  */
 require_once "Zend/Test/PHPUnit/Db/Connection.php";
@@ -73,7 +53,6 @@ class Zend_Test_PHPUnit_Db_Operation_DeleteAll implements PHPUnit_Extensions_Dat
                 $tableName = $table->getTableMetaData()->getTableName();
                 $connection->getConnection()->delete($tableName);
             } catch (Exception $e) {
-                require_once "PHPUnit/Extensions/Database/Operation/Exception.php";
                 throw new PHPUnit_Extensions_Database_Operation_Exception('DELETEALL', 'DELETE FROM '.$tableName.'', array(), $table, $e->getMessage());
             }
         }

+ 0 - 20
library/Zend/Test/PHPUnit/Db/Operation/Insert.php

@@ -21,26 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_Operation_IDatabaseOperation
- */
-require_once "PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DataSet_IDataSet
- */
-require_once "PHPUnit/Extensions/Database/DataSet/IDataSet.php";
-
-/**
- * @see PHPUnit_Extensions_Database_Operation_Exception
- */
-require_once "PHPUnit/Extensions/Database/Operation/Exception.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_Connection
  */
 require_once "Zend/Test/PHPUnit/Db/Connection.php";

+ 0 - 20
library/Zend/Test/PHPUnit/Db/Operation/Truncate.php

@@ -21,26 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_Operation_IDatabaseOperation
- */
-require_once "PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DataSet_IDataSet
- */
-require_once "PHPUnit/Extensions/Database/DataSet/IDataSet.php";
-
-/**
- * @see PHPUnit_Extensions_Database_Operation_Exception
- */
-require_once "PHPUnit/Extensions/Database/Operation/Exception.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_Connection
  */
 require_once "Zend/Test/PHPUnit/Db/Connection.php";

+ 0 - 20
library/Zend/Test/PHPUnit/Db/SimpleTester.php

@@ -21,16 +21,6 @@
  */
 
 /**
- * @see PHPUnit_Extensions_Database_DefaultTester
- */
-require_once "PHPUnit/Extensions/Database/DefaultTester.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DB_IDatabaseConnection
- */
-require_once "PHPUnit/Extensions/Database/DB/IDatabaseConnection.php";
-
-/**
  * @see Zend_Test_PHPUnit_Db_Operation_Truncate
  */
 require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php";
@@ -41,16 +31,6 @@ require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php";
 require_once "Zend/Test/PHPUnit/Db/Operation/Insert.php";
 
 /**
- * @see PHPUnit_Extensions_Database_Operation_Factory
- */
-require_once "PHPUnit/Extensions/Database/Operation/Factory.php";
-
-/**
- * @see PHPUnit_Extensions_Database_DataSet_IDataSet
- */
-require_once "PHPUnit/Extensions/Database/DataSet/IDataSet.php";
-
-/**
  * Simple Tester for Database Tests when the Abstract Test Case cannot be used.
  *
  * @uses       PHPUnit_Extensions_Database_DefaultTester

+ 204 - 4
library/Zend/Validate/Hostname.php

@@ -110,7 +110,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
     /**
      * Array of valid top-level-domains
      *
-     * Version 2014012600, Last Updated Sun Jan 26 07:07:01 2014 UTC
+     * Version 2014050501, Last Updated Tue May  6 07:07:01 2014 UTC
      *
      * @see http://data.iana.org/TLD/tlds-alpha-by-domain.txt  List of all TLDs by domain
      * @see http://www.iana.org/domains/root/db/ Official list of supported TLDs
@@ -119,6 +119,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
     protected $_validTlds = array(
         'ac',
         'academy',
+        'actor',
         'ad',
         'ae',
         'aero',
@@ -126,33 +127,44 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'ag',
         'agency',
         'ai',
+        'airforce',
         'al',
         'am',
         'an',
         'ao',
         'aq',
         'ar',
+        'archi',
         'arpa',
         'as',
         'asia',
+        'associates',
         'at',
         'au',
         'aw',
         'ax',
+        'axa',
         'az',
         'ba',
+        'bar',
         'bargains',
+        'bayern',
         'bb',
         'bd',
         'be',
         'berlin',
+        'best',
         'bf',
         'bg',
         'bh',
         'bi',
+        'bid',
         'bike',
         'biz',
         'bj',
+        'black',
+        'blackfriday',
+        'blue',
         'bm',
         'bn',
         'bo',
@@ -171,8 +183,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'cab',
         'camera',
         'camp',
+        'capital',
+        'cards',
+        'care',
+        'career',
         'careers',
+        'cash',
         'cat',
+        'catering',
         'cc',
         'cd',
         'center',
@@ -181,9 +199,13 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'cg',
         'ch',
         'cheap',
+        'christmas',
         'ci',
+        'citic',
         'ck',
         'cl',
+        'cleaning',
+        'clinic',
         'clothing',
         'club',
         'cm',
@@ -191,15 +213,23 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'co',
         'codes',
         'coffee',
+        'college',
+        'cologne',
         'com',
         'community',
         'company',
         'computer',
+        'condos',
         'construction',
+        'consulting',
         'contractors',
+        'cooking',
         'cool',
         'coop',
+        'country',
         'cr',
+        'creditcard',
+        'cruises',
         'cu',
         'cv',
         'cw',
@@ -210,11 +240,15 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'dating',
         'de',
         'democrat',
+        'dental',
+        'desi',
         'diamonds',
         'directory',
+        'discount',
         'dj',
         'dk',
         'dm',
+        'dnp',
         'do',
         'domains',
         'dz',
@@ -224,6 +258,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'ee',
         'eg',
         'email',
+        'engineering',
         'enterprises',
         'equipment',
         'er',
@@ -231,16 +266,35 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'estate',
         'et',
         'eu',
+        'eus',
+        'events',
+        'exchange',
         'expert',
+        'exposed',
+        'fail',
         'farm',
+        'feedback',
         'fi',
+        'finance',
+        'financial',
+        'fish',
+        'fishing',
+        'fitness',
         'fj',
         'fk',
+        'flights',
         'florist',
         'fm',
         'fo',
+        'foo',
+        'foundation',
         'fr',
+        'frogans',
+        'fund',
+        'furniture',
+        'futbol',
         'ga',
+        'gal',
         'gallery',
         'gb',
         'gd',
@@ -252,13 +306,18 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'gift',
         'gl',
         'glass',
+        'globo',
         'gm',
+        'gmo',
         'gn',
+        'gop',
         'gov',
         'gp',
         'gq',
         'gr',
         'graphics',
+        'gratis',
+        'gripe',
         'gs',
         'gt',
         'gu',
@@ -266,11 +325,13 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'guru',
         'gw',
         'gy',
+        'haus',
         'hk',
         'hm',
         'hn',
         'holdings',
         'holiday',
+        'horse',
         'house',
         'hr',
         'ht',
@@ -281,16 +342,21 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'im',
         'immobilien',
         'in',
+        'industries',
         'info',
+        'ink',
         'institute',
+        'insure',
         'int',
         'international',
+        'investments',
         'io',
         'iq',
         'ir',
         'is',
         'it',
         'je',
+        'jetzt',
         'jm',
         'jo',
         'jobs',
@@ -305,8 +371,10 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'kiwi',
         'km',
         'kn',
+        'koeln',
         'kp',
         'kr',
+        'kred',
         'kw',
         'ky',
         'kz',
@@ -314,11 +382,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'land',
         'lb',
         'lc',
+        'lease',
         'li',
         'lighting',
+        'limited',
         'limo',
         'link',
         'lk',
+        'london',
         'lr',
         'ls',
         'lt',
@@ -327,14 +398,19 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'lv',
         'ly',
         'ma',
+        'maison',
         'management',
+        'mango',
         'marketing',
         'mc',
         'md',
         'me',
+        'media',
+        'meet',
         'menu',
         'mg',
         'mh',
+        'miami',
         'mil',
         'mk',
         'ml',
@@ -343,7 +419,9 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'mo',
         'mobi',
         'moda',
+        'moe',
         'monash',
+        'moscow',
         'mp',
         'mq',
         'mr',
@@ -357,10 +435,12 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'my',
         'mz',
         'na',
+        'nagoya',
         'name',
         'nc',
         'ne',
         'net',
+        'neustar',
         'nf',
         'ng',
         'ni',
@@ -370,11 +450,16 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'np',
         'nr',
         'nu',
+        'nyc',
         'nz',
+        'okinawa',
         'om',
         'onl',
         'org',
         'pa',
+        'paris',
+        'partners',
+        'parts',
         'pe',
         'pf',
         'pg',
@@ -383,6 +468,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'photography',
         'photos',
         'pics',
+        'pictures',
         'pink',
         'pk',
         'pl',
@@ -392,26 +478,43 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'post',
         'pr',
         'pro',
+        'productions',
+        'properties',
         'ps',
         'pt',
+        'pub',
         'pw',
         'py',
         'qa',
+        'qpon',
+        'quebec',
         're',
         'recipes',
         'red',
+        'reisen',
+        'ren',
+        'rentals',
         'repair',
+        'report',
+        'rest',
+        'reviews',
         'rich',
         'ro',
+        'rocks',
+        'rodeo',
         'rs',
         'ru',
         'ruhr',
         'rw',
+        'ryukyu',
         'sa',
+        'saarland',
         'sb',
         'sc',
+        'schule',
         'sd',
         'se',
+        'services',
         'sexy',
         'sg',
         'sh',
@@ -426,18 +529,24 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'sn',
         'so',
         'social',
+        'sohu',
         'solar',
         'solutions',
+        'soy',
         'sr',
         'st',
         'su',
+        'supplies',
+        'supply',
         'support',
+        'surgery',
         'sv',
         'sx',
         'sy',
         'systems',
         'sz',
         'tattoo',
+        'tax',
         'tc',
         'td',
         'technology',
@@ -454,9 +563,13 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'tn',
         'to',
         'today',
+        'tokyo',
         'tools',
+        'town',
+        'toys',
         'tp',
         'tr',
+        'trade',
         'training',
         'travel',
         'tt',
@@ -466,29 +579,106 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         'ua',
         'ug',
         'uk',
+        'university',
         'uno',
         'us',
         'uy',
         'uz',
         'va',
+        'vacations',
         'vc',
         've',
+        'vegas',
         'ventures',
         'vg',
         'vi',
         'viajes',
+        'villas',
+        'vision',
         'vn',
+        'vodka',
+        'vote',
+        'voting',
+        'voto',
         'voyage',
         'vu',
         'wang',
         'watch',
+        'webcam',
         'wed',
         'wf',
         'wien',
+        'wiki',
         'works',
         'ws',
+        'wtc',
+        'wtf',
+        'xn--3bst00m',
+        'xn--3ds443g',
+        'xn--3e0b707e',
+        'xn--45brj9c',
+        'xn--55qw42g',
+        'xn--55qx5d',
+        'xn--6frz82g',
+        'xn--6qq986b3xl',
+        'xn--80adxhks',
+        'xn--80ao21a',
+        'xn--80asehdb',
+        'xn--80aswg',
+        'xn--90a3ac',
+        'xn--c1avg',
+        'xn--cg4bki',
+        'xn--clchc0ea0b2g2a9gcd',
+        'xn--czru2d',
+        'xn--d1acj3b',
+        'xn--fiq228c5hs',
+        'xn--fiq64b',
+        'xn--fiqs8s',
+        'xn--fiqz9s',
+        'xn--fpcrj9c3d',
+        'xn--fzc2c9e2c',
+        'xn--gecrj9c',
+        'xn--h2brj9c',
+        'xn--i1b6b1a6a2e',
+        'xn--io0a7i',
+        'xn--j1amh',
+        'xn--j6w193g',
+        'xn--kprw13d',
+        'xn--kpry57d',
+        'xn--l1acc',
+        'xn--lgbbat1ad8j',
+        'xn--mgb9awbf',
+        'xn--mgba3a4f16a',
+        'xn--mgbaam7a8h',
+        'xn--mgbab2bd',
+        'xn--mgbayh7gpa',
+        'xn--mgbbh1a71e',
+        'xn--mgbc0a9azcg',
+        'xn--mgberp4a5d4ar',
+        'xn--mgbx4cd0ab',
+        'xn--ngbc5azd',
+        'xn--nqv7f',
+        'xn--nqv7fs00ema',
+        'xn--o3cw4h',
+        'xn--ogbpf8fl',
+        'xn--p1ai',
+        'xn--pgbs0dh',
+        'xn--q9jyb4c',
+        'xn--rhqv96g',
+        'xn--s9brj9c',
+        'xn--ses554g',
+        'xn--unup4y',
+        'xn--wgbh1c',
+        'xn--wgbl6a',
+        'xn--xkc2al3hye2a',
+        'xn--xkc2dl3a5ee0h',
+        'xn--yfro4i67o',
+        'xn--ygbi2ammx',
+        'xn--zfr164b',
         'xxx',
+        'xyz',
         'ye',
+        'yokohama',
         'yt',
         'za',
         'zm',
@@ -915,8 +1105,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         if ((count($domainParts) > 1) && (strlen($value) >= 4) && (strlen($value) <= 254)) {
             $status = false;
 
-            $origenc = iconv_get_encoding('internal_encoding');
-            iconv_set_encoding('internal_encoding', 'UTF-8');
+            $origenc = PHP_VERSION_ID < 50600
+                        ? iconv_get_encoding('internal_encoding')
+                        : ini_get('default_charset');
+            if (PHP_VERSION_ID < 50600) {
+                iconv_set_encoding('internal_encoding', 'UTF-8');
+            } else {
+                ini_set('default_charset', 'UTF-8');
+            }
             do {
                 // First check TLD
                 $matches = array();
@@ -1012,7 +1208,11 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
                 }
             } while (false);
 
-            iconv_set_encoding('internal_encoding', $origenc);
+            if (PHP_VERSION_ID < 50600) {
+                iconv_set_encoding('internal_encoding', $origenc);
+            } else {
+                ini_set('default_charset', $origenc);
+            }
             // If the input passes as an Internet domain name, and domain names are allowed, then the hostname
             // passes validation
             if ($status && ($this->_options['allow'] & self::ALLOW_DNS)) {

+ 13 - 3
library/Zend/Validate/StringLength.php

@@ -199,14 +199,24 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract
     public function setEncoding($encoding = null)
     {
         if ($encoding !== null) {
-            $orig   = iconv_get_encoding('internal_encoding');
-            $result = iconv_set_encoding('internal_encoding', $encoding);
+            $orig = PHP_VERSION_ID < 50600
+                        ? iconv_get_encoding('internal_encoding')
+                        : ini_get('default_charset');
+            if (PHP_VERSION_ID < 50600) {
+                $result = iconv_set_encoding('internal_encoding', $encoding);
+            } else {
+                $result = ini_set('default_charset', $encoding);
+            }
             if (!$result) {
                 require_once 'Zend/Validate/Exception.php';
                 throw new Zend_Validate_Exception('Given encoding not supported on this OS!');
             }
 
-            iconv_set_encoding('internal_encoding', $orig);
+            if (PHP_VERSION_ID < 50600) {
+                iconv_set_encoding('internal_encoding', $orig);
+            } else {
+                ini_set('default_charset', $orig);
+            }
         }
 
         $this->_encoding = $encoding;

+ 1 - 1
library/Zend/Version.php

@@ -32,7 +32,7 @@ final class Zend_Version
     /**
      * Zend Framework version identification - see compareVersion()
      */
-    const VERSION = '1.12.4';
+    const VERSION = '1.12.7dev';
 
     /**
      * The latest stable version Zend Framework available

+ 9 - 3
library/Zend/XmlRpc/Client.php

@@ -257,9 +257,15 @@ class Zend_XmlRpc_Client
     {
         $this->_lastRequest = $request;
 
-        iconv_set_encoding('input_encoding', 'UTF-8');
-        iconv_set_encoding('output_encoding', 'UTF-8');
-        iconv_set_encoding('internal_encoding', 'UTF-8');
+        if (PHP_VERSION_ID < 50600) {
+            iconv_set_encoding('input_encoding', 'UTF-8');
+            iconv_set_encoding('output_encoding', 'UTF-8');
+            iconv_set_encoding('internal_encoding', 'UTF-8');
+        } else {
+            ini_set('input_encoding', 'UTF-8');
+            ini_set('output_encoding', 'UTF-8');
+            ini_set('default_charset', 'UTF-8');
+        }
 
         $http = $this->getHttpClient();
         if($http->getUri() === null) {

+ 1 - 1
resources/languages/es/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "No fue encontrado ningun registro que coincida con %value%",
-    "A record matching %value% was found" => "Se encontro un registro coincidente con %value%",
+    "A record matching '%value%' was found" => "Se encontro un registro coincidente con %value%",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "El tipo especificado no es válido, el valor debe ser una cadena de texto, entero o float",

+ 1 - 1
resources/languages/hr/Zend_Validate.php

@@ -67,7 +67,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Nije pronađen zapis koji se podudara sa %value%",
-    "A record matching %value% was found" => "Zapis koji se podudara sa %value% je pronađen",
+    "A record matching '%value%' was found" => "Zapis koji se podudara sa %value% je pronađen",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Neispravan tip, vrijednost bi trebala biti niz slova, brojki ili realni broj",

+ 1 - 1
resources/languages/it/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Non è stato trovato una riga con valore %value%",
-    "A record matching %value% was found" => "E' già stata trovata una riga con valore %value%",
+    "A record matching '%value%' was found" => "E' già stata trovata una riga con valore %value%",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be float, string, or integer" => "Tipo di dato non valido: il dato dev'essere di tipo float, stringa o intero.",

+ 1 - 1
resources/languages/nl/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Er kon geen record gevonden wat overeenkomt met %value%",
-    "A record matching %value% was found" => "Een record wat overeenkomt met %value% is gevonden",
+    "A record matching '%value%' was found" => "Een record wat overeenkomt met %value% is gevonden",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Ongeldig type opgegeven, waarde moet een string, integer of float zijn",

+ 1 - 1
resources/languages/pt_BR/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Não foram encontrados registros para %value%",
-    "A record matching %value% was found" => "Um registro foi encontrado para %value%",
+    "A record matching '%value%' was found" => "Um registro foi encontrado para %value%",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "O tipo especificado é inválido, o valor deve ser string, inteiro ou float",

+ 1 - 1
resources/languages/ru/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Не найдено записей, совпадающих с '%value%'",
-    "A record matching %value% was found" => "Найдена запись, совпадающая со значением '%value%'",
+    "A record matching '%value%' was found" => "Найдена запись, совпадающая со значением '%value%'",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Недопустимый тип данных, значение должно быть числом с плавающей точкой, строкой, или целым числом",

+ 1 - 1
resources/languages/sr/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Zapis koji se poklapa sa %value% nije pronađen",
-    "A record matching %value% was found" => "Zapis koji se poklapa sa %value% je pronađen",
+    "A record matching '%value%' was found" => "Zapis koji se poklapa sa %value% je pronađen",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Nevalidan tip, vrednost treba da bude tekst ili broj",

+ 1 - 1
resources/languages/uk/Zend_Validate.php

@@ -68,7 +68,7 @@ return array(
 
     // Zend_Validate_Db_Abstract
     "No record matching %value% was found" => "Не знайдено записів, що відповідають '%value%'",
-    "A record matching %value% was found" => "Знайдено запис, що відповідає '%value%'",
+    "A record matching '%value%' was found" => "Знайдено запис, що відповідає '%value%'",
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Неприпустимий тип даних, значення повинно бути числом з плаваючою крапкою, рядком чи цілим числом",

+ 85 - 0
tests/TestConfiguration.travis.php

@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    UnitTests
+ * @copyright  Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * This file defines configuration for running the unit tests for the Zend
+ * Framework.  Some tests have dependencies to PHP extensions or databases
+ * which may not necessary installed on the target system.  For these cases,
+ * the ability to disable or configure testing is provided below.  Tests for
+ * components which should run universally are always run by the master
+ * suite and cannot be disabled.
+ *
+ * Do not edit this file. Instead, copy this file to TestConfiguration.php,
+ * and edit the new file. Never commit plaintext passwords to the source
+ * code repository.
+ */
+ 
+ /**
+ * Zend_Auth_Adapter_DbTable tests
+ */
+defined('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED') || define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED', true);
+
+/**
+ * Zend_Cache
+ *
+ * TESTS_ZEND_CACHE_SQLITE_ENABLED     => sqlite extension has to be enabled
+ * TESTS_ZEND_CACHE_APC_ENABLED        => apc extension has to be enabled
+ * TESTS_ZEND_CACHE_WINCACHE_ENABLED   => wincache extension has to be enabled
+ * TESTS_ZEND_CACHE_MEMCACHED_ENABLED  => memcache extension has to be enabled and
+ *                                        a memcached server has to be available
+ * TESTS_ZEND_CACHE_LIBMEMCACHED_ENABLED => memcached extension has to be enabled and
+ *                                          a memcached server has to be available
+ * TESTS_ZEND_CACHE_XCACHE_ENABLED     => xcache extension has to be enabled
+ */
+defined('TESTS_ZEND_CACHE_SQLITE_ENABLED') || define('TESTS_ZEND_CACHE_SQLITE_ENABLED', true);
+defined('TESTS_ZEND_CACHE_MEMCACHED_ENABLED') || define('TESTS_ZEND_CACHE_MEMCACHED_ENABLED', true);
+defined('TESTS_ZEND_CACHE_LIBMEMCACHED_ENABLED') || define('TESTS_ZEND_CACHE_LIBMEMCACHED_ENABLED', true);
+
+/**
+ * Zend_Db_Adapter_Pdo_Mysql and Zend_Db_Adapter_Mysqli
+ *
+ * There are separate properties to enable tests for the PDO_MYSQL adapter and
+ * the native Mysqli adapters, but the other properties are shared between the
+ * two MySQL-related Zend_Db adapters.
+ */
+defined('TESTS_ZEND_DB_ADAPTER_PDO_MYSQL_ENABLED') || define('TESTS_ZEND_DB_ADAPTER_PDO_MYSQL_ENABLED',  true);
+defined('TESTS_ZEND_DB_ADAPTER_MYSQLI_ENABLED') || define('TESTS_ZEND_DB_ADAPTER_MYSQLI_ENABLED',  true);
+defined('TESTS_ZEND_DB_ADAPTER_MYSQL_USERNAME') || define('TESTS_ZEND_DB_ADAPTER_MYSQL_USERNAME', 'travis');
+defined('TESTS_ZEND_DB_ADAPTER_MYSQL_PASSWORD') || define('TESTS_ZEND_DB_ADAPTER_MYSQL_PASSWORD', '');
+defined('TESTS_ZEND_DB_ADAPTER_MYSQL_DATABASE') || define('TESTS_ZEND_DB_ADAPTER_MYSQL_DATABASE', 'zftest');
+
+/**
+ * Zend_Db_Adapter_Pdo_Sqlite
+ *
+ * Username and password are irrelevant for SQLite.
+ */
+defined('TESTS_ZEND_DB_ADAPTER_PDO_SQLITE_ENABLED') || define('TESTS_ZEND_DB_ADAPTER_PDO_SQLITE_ENABLED',  true);
+
+/**
+ * Zend_Db_Adapter_Pdo_Pgsql
+ */
+defined('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_ENABLED') || define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_ENABLED',  true);
+defined('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_USERNAME') || define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_USERNAME', 'postgres');
+defined('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_PASSWORD') || define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_PASSWORD', '');
+defined('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_DATABASE') || define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_DATABASE', 'zftest');
+
+
+require_once dirname(__FILE__) . '/TestConfiguration.php.dist';

+ 8 - 6
tests/TestHelper.php

@@ -23,13 +23,15 @@
 /**
  * Include PHPUnit dependencies
  */
-require_once 'PHPUnit/Runner/Version.php';
+if (version_compare(PHPUnit_Runner_Version::id(), '4.0.0', '<')) {
+    require_once 'PHPUnit/Runner/Version.php';
 
-$phpunitVersion = PHPUnit_Runner_Version::id();
-if ($phpunitVersion == '@package_version@' || version_compare($phpunitVersion, '3.5.5', '>=')) {
-    require_once 'PHPUnit/Autoload.php'; // >= PHPUnit 3.5.5
-} else {
-    require_once 'PHPUnit/Framework.php'; // < PHPUnit 3.5.5
+    $phpunitVersion = PHPUnit_Runner_Version::id();
+    if ($phpunitVersion == '@package_version@' || version_compare($phpunitVersion, '3.5.5', '>=')) {
+        require_once 'PHPUnit/Autoload.php'; // >= PHPUnit 3.5.5
+    } else {
+        require_once 'PHPUnit/Framework.php'; // < PHPUnit 3.5.5
+    }
 }
 
 /*

+ 10 - 7
tests/Zend/Auth/Adapter/OpenId/OpenIdTest.php

@@ -352,8 +352,9 @@ class Zend_Auth_Adapter_OpenIdTest extends PHPUnit_Framework_TestCase
             "openid_assoc_handle" => self::HANDLE,
             "openid_claimed_id" => self::ID,
             "openid_identity" => self::REAL_ID,
+            "openid_op_endpoint" => self::SERVER,
             "openid_response_nonce" => "2007-08-14T12:52:33Z46c1a59124fff",
-            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed",
+            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed,op_endpoint",
             "openid_sig" => "h/5AFD25NpzSok5tzHEGCVUkQSw="
         );
         $adapter = new Zend_Auth_Adapter_OpenId(null, new Zend_OpenId_Consumer_Storage_File(dirname(__FILE__)."/_files"));
@@ -387,8 +388,9 @@ class Zend_Auth_Adapter_OpenIdTest extends PHPUnit_Framework_TestCase
             "openid_identity" => self::REAL_ID,
             "openid_response_nonce" => "2007-08-14T12:52:33Z46c1a59124ffe",
             "openid_mode" => "id_res",
-            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed",
-            "openid_sig" => "h/5AFD25NpzSok5tzHEGCVUkQSw="
+            "openid_op_endpoint" => self::SERVER,
+            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed,op_endpoint",
+            "openid_sig" => '7DZUB+y05wJqpYSdFs5cX5FyNMY='
         );
         $adapter = new Zend_Auth_Adapter_OpenId(null, $storage);
         $ret = $adapter->authenticate();
@@ -415,8 +417,9 @@ class Zend_Auth_Adapter_OpenIdTest extends PHPUnit_Framework_TestCase
             "openid_identity" => self::REAL_ID,
             "openid_response_nonce" => "2007-08-14T12:52:33Z46c1a59124ffe",
             "openid_mode" => "id_res",
-            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed",
-            "openid_sig" => "h/5AFD25NpzSok5tzHEGCVUkQSw="
+            "openid_op_endpoint" => self::SERVER,
+            "openid_signed" => "assoc_handle,return_to,claimed_id,identity,response_nonce,mode,signed,op_endpoint",
+            "openid_sig" => "7DZUB+y05wJqpYSdFs5cX5FyNMY="
         );
         $adapter = new Zend_Auth_Adapter_OpenId(null, $storage);
         $ret = $adapter->authenticate();
@@ -446,8 +449,8 @@ class Zend_Auth_Adapter_OpenIdTest extends PHPUnit_Framework_TestCase
             "openid_mode" => "id_res",
             "openid_ns_sreg" => "http://openid.net/extensions/sreg/1.1",
             "openid_sreg_nickname" => "test",
-            "openid_signed" => "ns,assoc_handle,return_to,claimed_id,identity,response_nonce,mode,ns.sreg,sreg.nickname,signed",
-            "openid_sig" => "jcV5K517GrjOxjRzi0QNLX2D+1s="
+            "openid_signed" => "ns,assoc_handle,return_to,claimed_id,identity,response_nonce,mode,ns.sreg,sreg.nickname,signed,op_endpoint",
+            "openid_sig" => 'CIJabsMLZWjhJh+rHMnV+brQ7xE='
         );
         $_POST = array();
         $adapter = new Zend_Auth_Adapter_OpenId(null, $storage);

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

@@ -20,7 +20,6 @@
  * @version    $Id$
  */
 
-require_once 'PHPUnit/Extensions/ExceptionTestCase.php';
 require_once 'Zend/Cache.php';
 
 /**

+ 18 - 0
tests/Zend/DateTest.php

@@ -5698,6 +5698,24 @@ class Zend_DateTest extends PHPUnit_Framework_TestCase
         $out  = $date->toString('Y-MM-dd');
         $this->assertEquals('2012-01-01', $out);
     }
+
+    /**
+     * @group GH-2
+     */
+    public function testGetTimezoneFromStringForTimezonesWithUnderscore()
+    {
+        $date = new Zend_Date();
+
+        $this->assertEquals(
+            'America/Los_Angeles',
+            $date->getTimezoneFromString('America/Los_Angeles')
+        );
+
+        $this->assertEquals(
+            'America/New_York',
+            $date->getTimezoneFromString('America/New_York')
+        );
+    }
 }
 
 class Zend_Date_TestHelper extends Zend_Date

+ 47 - 0
tests/Zend/Db/Adapter/Pdo/SqliteTest.php

@@ -200,4 +200,51 @@ class Zend_Db_Adapter_Pdo_SqliteTest extends Zend_Db_Adapter_Pdo_TestCommon
         return 'Pdo_Sqlite';
     }
 
+    public function testAdapterOptionFetchMode()
+    {
+        $params = $this->_util->getParams();
+
+        $params['options'] = array(
+            Zend_Db::FETCH_MODE => 'obj'
+        );
+        $db = Zend_Db::factory($this->getDriver(), $params);
+
+        //two extra lines to make SQLite work
+        $db->query('CREATE TABLE zfproducts (id)');
+        $db->insert('zfproducts', array('id' => 1));
+
+        $select = $db->select()->from('zfproducts');
+        $row = $db->fetchRow($select);
+        $this->assertTrue($row instanceof stdClass);
+    }
+
+    protected function _testAdapterAlternateStatement($stmtClass)
+    {
+        $ip = get_include_path();
+        $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR .  '..' . DIRECTORY_SEPARATOR . '_files';
+        $newIp = $dir . PATH_SEPARATOR . $ip;
+        set_include_path($newIp);
+
+        $params = $this->_util->getParams();
+
+        $params['options'] = array(
+            Zend_Db::AUTO_QUOTE_IDENTIFIERS => false
+        );
+        $db = Zend_Db::factory($this->getDriver(), $params);
+        $db->getConnection();
+        $db->setStatementClass($stmtClass);
+
+        $currentStmtClass = $db->getStatementClass();
+        $this->assertEquals($stmtClass, $currentStmtClass);
+
+        //extra fix for SQLite
+        $db->query('CREATE TABLE zfbugs (id)');
+
+        $bugs = $this->_db->quoteIdentifier('zfbugs');
+
+        $stmt = $db->prepare("SELECT COUNT(*) FROM $bugs");
+
+        $this->assertTrue($stmt instanceof $stmtClass,
+            'Expecting object of type ' . $stmtClass . ', got ' . get_class($stmt));
+    }
 }

+ 24 - 0
tests/Zend/Db/Select/Pdo/SqliteTest.php

@@ -57,6 +57,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectGroupBy()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectGroupBy();
+        }
         $select = $this->_selectGroupBy();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -74,6 +78,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectGroupByQualified()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectGroupByQualified();
+        }
         $select = $this->_selectGroupByQualified();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -91,6 +99,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectHaving()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHaving();
+        }
         $select = $this->_selectHaving();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -104,6 +116,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectHavingWithParameter()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingWithParameter();
+        }
         $select = $this->_selectHavingWithParameter();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -117,6 +133,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectHavingOr()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingOr();
+        }
         $select = $this->_selectHavingOr();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -132,6 +152,10 @@ class Zend_Db_Select_Pdo_SqliteTest extends Zend_Db_Select_TestCommon
 
     public function testSelectHavingOrWithParameter()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingOrWithParameter();
+        }
         $select = $this->_selectHavingOrWithParameter();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();

+ 9 - 9
tests/Zend/Db/Select/TestCommon.php

@@ -858,7 +858,7 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
 
     public function testSelectWhereWithTypeFloat()
     {
-        $locale = setlocale(LC_ALL, null);
+        $locale = setlocale(LC_ALL, 0);
 
         $select = $this->_selectWhereWithTypeFloat();
         $stmt = $this->_db->query($select);
@@ -1697,7 +1697,7 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
         $serialize = serialize($this->_select());
         $this->assertTrue(is_string($serialize));
     }
-    
+
     /**
      * @group ZF-3792
      */
@@ -1706,7 +1706,7 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
         $table_A = $this->_db->quoteTableAs('A');
         $table_B = $this->_db->quoteTableAs('B');
         $colname = $this->_db->quoteIdentifier('colname');
-        
+
         $s = $this->_db->select()->from('A')->joinUsing('B', $colname);
         $this->assertContains("JOIN {$table_B} ON {$table_B}.{$colname} = {$table_A}.{$colname}", $s->assemble());
     }
@@ -1720,7 +1720,7 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
         $table_B = $this->_db->quoteTableAs('B');
         $colOne  = $this->_db->quoteIdentifier('colOne');
         $colTwo  = $this->_db->quoteIdentifier('colTwo');
-        
+
         $s = $this->_db->select()->from('A')->joinUsing('B', array($colOne,$colTwo));
         $this->assertContains(
             "JOIN {$table_B} ON {$table_B}.{$colOne} = {$table_A}.{$colOne}"
@@ -1737,12 +1737,12 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
         $table1 = $this->_db->quoteTableAs('table1');
         $table2 = $this->_db->quoteTableAs('table2');
         $colname = $this->_db->quoteIdentifier('column1');
-        
+
         $select = $this->_db->select();
         $select->from('table1')->joinUsing('table2', $colname);
         $this->assertRegexp("/ON {$table2}.{$colname}/s", $select->assemble());
     }
-    
+
     /**
      * @group ZF-3309
      */
@@ -1751,10 +1751,10 @@ abstract class Zend_Db_Select_TestCommon extends Zend_Db_TestSetup
         $table1 = $this->_db->quoteTableAs('table1');
         $table2_alias = $this->_db->quoteTableAs('t2');
         $colname = $this->_db->quoteIdentifier('column1');
-        
+
         $select = $this->_db->select();
         $select->from('table1')->joinUsing(array('t2'=>'table2'), $colname);
         $this->assertRegexp("/ON {$table2_alias}.{$colname}/s", $select->assemble());
-    }    
-    
+    }
+
 }

+ 1 - 2
tests/Zend/Db/Table/Rowset/TestCommon.php

@@ -386,7 +386,7 @@ abstract class Zend_Db_Table_Rowset_TestCommon extends Zend_Db_Table_TestSetup
         $this->assertTrue($row->isConnected());
         $this->assertTrue($row->getTable() instanceof Zend_Db_Table_Abstract);
     }
- 
+
     /**
       * @group GH-172
       */
@@ -415,7 +415,6 @@ abstract class Zend_Db_Table_Rowset_TestCommon extends Zend_Db_Table_TestSetup
         $tableClass = get_class($table);
 
         $select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)->setIntegrityCheck(false);
-        $select->from('zfbugs', array('bug_id'));
         $select->join('zfaccounts', 'zfaccounts.account_name = zfbugs.reported_by', 'account_name');
         $select->where('zfaccounts.account_name = ?', 'Bob');
 

+ 24 - 0
tests/Zend/Db/Table/Select/Pdo/SqliteTest.php

@@ -61,6 +61,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectGroupBy()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectGroupBy();
+        }
         $select = $this->_selectGroupBy();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -78,6 +82,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectGroupByQualified()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectGroupByQualified();
+        }
         $select = $this->_selectGroupByQualified();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -95,6 +103,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectHaving()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHaving();
+        }
         $select = $this->_selectHaving();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -108,6 +120,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectHavingWithParameter()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingWithParameter();
+        }
         $select = $this->_selectHavingWithParameter();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -121,6 +137,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectHavingOr()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingOr();
+        }
         $select = $this->_selectHavingOr();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();
@@ -136,6 +156,10 @@ class Zend_Db_Table_Select_Pdo_SqliteTest extends Zend_Db_Table_Select_TestCommo
 
     public function testSelectHavingOrWithParameter()
     {
+        //SQLite doesn't need different test from 5.3
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            return parent::testSelectHavingOrWithParameter();
+        }
         $select = $this->_selectHavingOrWithParameter();
         $stmt = $this->_db->query($select);
         $result = $stmt->fetchAll();

+ 8 - 8
tests/Zend/Db/Table/TestCommon.php

@@ -675,7 +675,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $this->assertEquals($insertResult, $lastInsertId);
         $this->assertEquals(5, $lastInsertId);
     }
-    
+
     /**
      * @group ZF-3837
      */
@@ -693,7 +693,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
             'verified_by'     => 'dduck'
         );
         $insertResult = $table->insert($row);
-        $lastInsertId = $this->_db->lastInsertId();
+        $lastInsertId = $this->_db->lastInsertId('zfbugs', 'bug_id');
         $this->assertEquals($insertResult, $lastInsertId);
         $this->assertEquals(5, $lastInsertId);
     }
@@ -836,7 +836,7 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $mem_delta = $mem2-$mem1;
         $this->assertThat($mem_delta, $this->lessThan(513));
     }
-    
+
     /**
      * @group ZF-2953
      */
@@ -852,12 +852,12 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
             'assigned_to'     => 'goofy',
             'verified_by'     => 'dduck'
         );
-        
+
         // empty string
         $row['bug_id'] = '';
         $insertResult = $table->insert($row);
         $this->assertTrue(is_numeric($insertResult), 'Empty string did not return assigned primary key');
-        
+
         // false (bool)
         $row['bug_id'] = false;
         $insertResult = $table->insert($row);
@@ -867,16 +867,16 @@ abstract class Zend_Db_Table_TestCommon extends Zend_Db_Table_TestSetup
         $row['bug_id'] = array();
         $insertResult = $table->insert($row);
         $this->assertTrue(is_numeric($insertResult), 'Empty array did not return assigned primary key');
-        
+
         // zero '0'
         $row['bug_id'] = '0';
         $table->delete('bug_id > 0'); // clear table
         $insertResult = $table->insert($row);
         $this->assertEquals('0', $insertResult, 'Zero string did not return assigned primary key');
-        
+
         // zero 0
         $row['bug_id'] = 0;
-        $table->delete('bug_id > 0'); // clear table
+        $table->delete('bug_id = 0'); // clear table
         $insertResult = $table->insert($row);
         $this->assertEquals('0', $insertResult, 'Zero int did not return assigned primary key');
     }

+ 1 - 1
tests/Zend/Db/TestSetup.php

@@ -42,7 +42,7 @@ require_once 'Zend/Db.php';
 abstract class Zend_Db_TestSetup extends PHPUnit_Framework_TestCase
 {
     /**
-     * @var Zend_Db_TestUtil
+     * @var Zend_Db_TestUtil_Common
      */
     protected $_util = null;
 

+ 2 - 2
tests/Zend/Db/TestUtil/Common.php

@@ -421,12 +421,12 @@ abstract class Zend_Db_TestUtil_Common
     protected function _getDataCascadeRecursive()
     {
         return array(
-            array('item_id' => '1', 'item_parent' => NULL, 'item_data' => '1'),
+            array('item_id' => '1', 'item_parent' => new Zend_Db_Expr('NULL'), 'item_data' => '1'),
             array('item_id' => '2', 'item_parent' => '1', 'item_data' => '1.2'),
             array('item_id' => '3', 'item_parent' => '1', 'item_data' => '1.3'),
             array('item_id' => '4', 'item_parent' => '3', 'item_data' => '1.3.4'),
             array('item_id' => '5', 'item_parent' => '3', 'item_data' => '1.3.5'),
-            array('item_id' => '6', 'item_parent' => NULL, 'item_data' => '6')
+            array('item_id' => '6', 'item_parent' => new Zend_Db_Expr('NULL'), 'item_data' => '6')
         );
     }
 

+ 33 - 0
tests/Zend/Dojo/View/Helper/DojoTest.php

@@ -51,6 +51,11 @@ require_once 'Zend/View.php';
 class Zend_Dojo_View_Helper_DojoTest extends PHPUnit_Framework_TestCase
 {
     /**
+     * @var Zend_Dojo_View_Helper_Dojo_Container
+     */
+    protected $helper;
+
+    /**
      * Runs the test methods of this class.
      *
      * @return void
@@ -909,6 +914,34 @@ function() {
         $this->assertRegexp('#(function\\(\\){alert\\(\'foo\'\\);})#', $output);
     }
 
+    /**
+     * @group GH-340
+     */
+    public function testRenderStylesheetsOrder()
+    {
+        $helper = $this->helper;
+        $options = array(
+            'localPath'              => '',
+            'stylesheetmodules'      => 'test.stylesheet.module',
+            'registerdojostylesheet' => true,
+            'enable'                 => true,
+        );
+        $helper->setOptions($options);
+
+        $expected = '<style type="text/css">' . "\n"
+                  . '<!--' . "\n"
+                  . '    @import "/dojo/resources/dojo.css";' . "\n"
+                  . '    @import "/test/stylesheet/module/module.css";' . "\n"
+                  . '-->' . "\n"
+                  . '</style>';
+
+        $actual = (string) $helper;
+        $end    = '</style>';
+        $actual = substr($actual, 0, strpos($actual, $end) + strlen($end));
+
+        $this->assertEquals($expected, $actual);
+    }
+
     public function setupDojo()
     {
         $this->helper->requireModule('dijit.layout.ContentPane')

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

@@ -53,23 +53,25 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
 
     public function testIterationShouldReturnOnlyPhpFiles()
     {
+        if (version_compare(PHP_VERSION, '5.3', 'lt')) {
+            $this->markTestSkipped('Test can only be run under 5.3 or later');
+        }
+
         $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());
         }
     }
 
     public function testIterationShouldReturnOnlyPhpFilesContainingClasses()
     {
+        if (version_compare(PHP_VERSION, '5.3', 'lt')) {
+            $this->markTestSkipped('Test can only be run under 5.3 or later');
+        }
+
         $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;
             }
@@ -79,12 +81,13 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
 
     public function testIterationShouldReturnInterfaces()
     {
+        if (version_compare(PHP_VERSION, '5.3', 'lt')) {
+            $this->markTestSkipped('Test can only be run under 5.3 or later');
+        }
+
         $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;
             }
@@ -113,12 +116,13 @@ class Zend_File_ClassFileLocatorTest extends PHPUnit_Framework_TestCase
 
     public function testIterationShouldInjectClassInFoundItems()
     {
+        if (version_compare(PHP_VERSION, '5.3', 'lt')) {
+            $this->markTestSkipped('Test can only be run under 5.3 or later');
+        }
+
         $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;

+ 0 - 4
tests/Zend/Form/Element/NoteTest.php

@@ -26,8 +26,6 @@ if (!defined("PHPUnit_MAIN_METHOD")) {
 }
 
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
-require_once "PHPUnit/Framework/TestCase.php";
-require_once "PHPUnit/Framework/TestSuite.php";
 
 require_once 'Zend/Form/Element/Note.php';
 
@@ -50,8 +48,6 @@ class Zend_Form_Element_NoteTest extends PHPUnit_Framework_TestCase
      */
     public static function main()
     {
-        require_once "PHPUnit/TextUI/TestRunner.php";
-
         $suite  = new PHPUnit_Framework_TestSuite("Zend_Form_Element_NoteTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }

+ 84 - 0
tests/Zend/Form/FormTest.php

@@ -4815,6 +4815,90 @@ class Zend_Form_FormTest extends PHPUnit_Framework_TestCase
 
         $this->assertEquals($expected, $actual);
     }
+
+    /**
+     * @group GH-319
+     */
+    public function testHasErrorsMethodShouldCheckAlsoElements()
+    {
+        // Init form
+        $form    = new Zend_Form();
+        $element = new Zend_Form_Element_Text('foo');
+        $form->addElement($element);
+
+        $element->markAsError();
+
+        // Test form
+        $this->assertTrue($form->hasErrors());
+        $this->assertFalse($form->isValid(array('foo' => 1)));
+
+        // Test element
+        $this->assertTrue($element->hasErrors());
+        $this->assertFalse($element->isValid(1));
+    }
+
+    /**
+     * @group GH-319
+     */
+    public function testHasErrorsMethodShouldCheckAlsoSubForms()
+    {
+        // Init form
+        $form    = new Zend_Form();
+        $subForm = new Zend_Form_SubForm();
+        $element = new Zend_Form_Element_Text('foo');
+        $subForm->addElement($element);
+        $form->addSubForm($subForm, 'subForm');
+
+        $element->markAsError();
+
+        // Test form
+        $this->assertTrue($form->hasErrors());
+        $this->assertFalse($form->isValid(array('foo' => 1)));
+
+        // Test element
+        $this->assertTrue($element->hasErrors());
+        $this->assertFalse($element->isValid(1));
+    }
+
+    public function testSetDefaultsAllowOverridingWithNonArrayParameter()
+    {
+        //this would throw a strict warning if the setDefaults() method requires param to be array
+        $form = new Zend_Form_FormTest_SetDefaults();
+    }
+
+    public function testCanSetElementDefaultValuesFromTraversable()
+    {
+        $this->testCanAddAndRetrieveMultipleElements();
+        $values = array(
+            'foo' => 'foovalue',
+            'bar' => 'barvalue',
+            'baz' => 'bazvalue',
+            'bat' => 'batvalue',
+        );
+        $traversable = new ArrayIterator($values);
+        $this->form->setDefaults($traversable);
+        $elements = $this->form->getElements();
+        foreach (array_keys($values) as $name) {
+            $this->assertEquals($name . 'value', $elements[$name]->getValue());
+        }
+    }
+
+    /**
+     * @expectedException Zend_Form_Exception
+     * @expectedExceptionMessage Argument passed to setDefaults() must be of type array or Traversable.
+     */
+    public function testSetDefaultsWithInvalidTypeThrowsException()
+    {
+        $this->form->setDefaults(new stdClass());
+    }
+}
+
+class Zend_Form_FormTest_SetDefaults extends Zend_Form
+{
+    public function setDefaults($defaults)
+    {
+        return parent::setDefaults($defaults);
+    }
 }
 
 class Zend_Form_FormTest_DisplayGroup extends Zend_Form_DisplayGroup

+ 2 - 6
tests/Zend/Loader/AutoloaderFactoryTest.php

@@ -27,10 +27,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  * Preload a number of classes to ensure they're available once we've disabled
  * other autoloaders.
  */
-require_once 'PHPUnit/Framework/Constraint/IsEqual.php';
-require_once 'PHPUnit/Framework/Constraint/IsInstanceOf.php';
-require_once 'PHPUnit/Framework/Constraint/IsNull.php';
-require_once 'PHPUnit/Framework/Constraint/IsTrue.php';
 require_once 'Zend/Loader/AutoloaderFactory.php';
 require_once 'Zend/Loader/ClassMapAutoloader.php';
 require_once 'Zend/Loader/StandardAutoloader.php';
@@ -54,7 +50,7 @@ class Zend_Loader_AutoloaderFactoryTest extends PHPUnit_Framework_TestCase
             $this->loaders = array();
         }
 
-        // Clear out other autoloaders to ensure those being tested are at the 
+        // Clear out other autoloaders to ensure those being tested are at the
         // top of the stack
         foreach ($this->loaders as $loader) {
             spl_autoload_unregister($loader);
@@ -108,7 +104,7 @@ class Zend_Loader_AutoloaderFactoryTest extends PHPUnit_Framework_TestCase
         }
         include dirname(__FILE__) . '/_files/InvalidInterfaceAutoloader.php';
         Zend_Loader_AutoloaderFactory::factory(array(
-            'InvalidInterfaceAutoloader' => array()            
+            'InvalidInterfaceAutoloader' => array()
         ));
     }
 

+ 9 - 0
tests/Zend/Locale/DataTest.php

@@ -55,6 +55,15 @@ class Zend_Locale_DataTest extends PHPUnit_Framework_TestCase
     }
 
     /**
+     * test for reading the scriptlist from a locale that is an alias
+     */
+    public function testAliases()
+    {
+        $data = Zend_Locale_Data::getList('zh_CN', 'script');
+        $this->assertEquals('阿拉伯文', $data['Arab']);
+    }
+
+    /**
      * test for reading with standard locale
      * expected array
      */

+ 87 - 0
tests/Zend/LocaleTest.php

@@ -88,6 +88,46 @@ class Zend_LocaleTest extends PHPUnit_Framework_TestCase
     }
 
     /**
+     * Test that locale names that have been dropped from CLDR continue to
+     * work.
+     */
+    public function testAliases()
+    {
+        $locale = new Zend_Locale('zh_CN');
+        $this->assertEquals(true, $locale->isLocale('zh_CN'));
+        $this->assertEquals('zh', $locale->getLanguage());
+        $this->assertEquals('CN', $locale->getRegion());
+        $this->assertEquals(true, Zend_Locale::isAlias($locale));
+        $this->assertEquals(true, Zend_Locale::isAlias('zh_CN'));
+        $this->assertEquals('zh_Hans_CN', Zend_Locale::getAlias('zh_CN'));
+
+        $locale = new Zend_Locale('zh_Hans_CN');
+        $this->assertEquals(true, $locale->isLocale('zh_Hans_CN'));
+        $this->assertEquals('zh', $locale->getLanguage());
+        $this->assertEquals('CN', $locale->getRegion());
+        $this->assertEquals(false, Zend_Locale::isAlias('zh_Hans_CN'));
+        $this->assertEquals('zh_Hans_CN', Zend_Locale::getAlias('zh_Hans_CN'));
+    }
+
+    /**
+     * @group GH-337
+     */
+    public function testIsLocaleMethodWithAliases()
+    {
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_CN'));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_CN', false, false));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_CN', true, true));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_CN', false, true));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_CN', true, false));
+
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_Hans_CN'));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_Hans_CN', false, false));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_Hans_CN', true, true));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_Hans_CN', false, true));
+        $this->assertEquals(true, Zend_Locale::isLocale('zh_Hans_CN', true, false));
+    }
+
+    /**
      * test for object creation
      * expected object instance
      */
@@ -869,6 +909,53 @@ class Zend_LocaleTest extends PHPUnit_Framework_TestCase
 		$this->assertEquals('2', Zend_Locale::getTranslation('DEFAULT', 'CurrencyFraction'));
     }
 
+    public function testEachDataFileShouldPresentAsLocaleData()
+    {
+        if (version_compare(PHP_VERSION, '5.3.2', 'lt')) {
+            $this->markTestSkipped('ReflectionMethod::setAccessible can only be run under 5.3.2 or later');
+        }
+
+        $dir = new DirectoryIterator(
+            dirname(__FILE__) . '/../../library/Zend/Locale/Data'
+        );
+        $skip = array(
+            'characters.xml',
+            'coverageLevels.xml',
+            'dayPeriods.xml',
+            'genderList.xml',
+            'languageInfo.xml',
+            'likelySubtags.xml',
+            'metaZones.xml',
+            'numberingSystems.xml',
+            'postalCodeData.xml',
+            'supplementalData.xml',
+            'supplementalMetadata.xml',
+            'telephoneCodeData.xml',
+            'Translation.php',
+            'windowsZones.xml',
+        );
+
+        $files = array('root');
+        /** @var SplFileInfo $fileinfo */
+        foreach ($dir as $fileinfo) {
+            if (!$fileinfo->isDot()
+                && !in_array($fileinfo->getBasename(), $skip)
+            ) {
+                $files[] = $fileinfo->getBasename('.xml');
+            }
+        }
+
+        $class    = new ReflectionClass('Zend_Locale');
+        $property = $class->getProperty('_localeData');
+        $property->setAccessible(true);
+
+        $locale     = new Zend_Locale();
+        $localeData = $property->getValue($locale);
+        $localeData = array_keys($localeData);
+
+        $this->assertEquals(array(), array_diff($files, $localeData));
+    }
+
     /**
      * Ignores a raised PHP error when in effect, but throws a flag to indicate an error occurred
      *

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

@@ -43,9 +43,6 @@ require_once 'Zend/Mail/Transport/Exception.php';
 /** Zend_View_Exception */
 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';
 

+ 5 - 2
tests/Zend/Mail/MessageTest.php

@@ -81,8 +81,11 @@ class Zend_Mail_MessageTest extends PHPUnit_Framework_TestCase
     {
         $message = new Zend_Mail_Message(array('file' => $this->_file));
 
-        $this->assertEquals($message->from, iconv('UTF-8', iconv_get_encoding('internal_encoding'),
-                                                                   '"Peter Müller" <peter-mueller@example.com>'));
+        $enc = PHP_VERSION_ID < 50600
+            ? iconv_get_encoding('internal_encoding')
+            : ini_get('default_charset');
+
+        $this->assertEquals($message->from, iconv('UTF-8', $enc, '"Peter Müller" <peter-mueller@example.com>'));
     }
 
     public function testGetHeaderAsArray()

+ 0 - 2
tests/Zend/Navigation/AllTests.php

@@ -20,8 +20,6 @@
  * @version    $Id$
  */
 
-require_once 'PHPUnit/Framework/Constraint/TraversableContainsOnly.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Navigation_AllTests::main');
 }

+ 24 - 0
tests/Zend/Navigation/ContainerTest.php

@@ -1260,4 +1260,28 @@ class Zend_Navigation_ContainerTest extends PHPUnit_Framework_TestCase
 
         $this->assertEquals(null, $container->getChildren());
     }
+
+    public function testRemovePageRecursively()
+    {
+        $container = new Zend_Navigation(array(
+            array(
+                'route' => 'foo',
+                'pages' => array(
+                    array(
+                        'route' => 'bar',
+                        'pages' => array(
+                            array(
+                                'route' => 'baz',
+                            ),
+                        ),
+                    )
+                )
+            ),
+        ));
+
+        $container->removePage($container->findOneBy('route', 'baz'), true);
+        $this->assertNull($container->findOneBy('route', 'baz'));
+        $container->removePage($container->findOneBy('route', 'bar'), true);
+        $this->assertNull($container->findOneBy('route', 'bar'));
+    }
 }

+ 1 - 11
tests/Zend/RegistryTest.php

@@ -125,17 +125,7 @@ class Zend_RegistryTest extends PHPUnit_Framework_TestCase
 
     public function testRegistryArrayObject()
     {
-        $registry = Zend_Registry::getInstance();
-        $registry['emptyArray'] = array();
-        $registry['null'] = null;
-
-        $this->assertTrue(isset($registry['emptyArray']));
-        $this->assertTrue(isset($registry['null']));
-        $this->assertFalse(isset($registry['noIndex']));
-
-        $this->assertTrue(Zend_Registry::isRegistered('emptyArray'));
-        $this->assertTrue(Zend_Registry::isRegistered('null'));
-        $this->assertFalse(Zend_Registry::isRegistered('noIndex'));
+        $this->assertTrue(Zend_Registry::getInstance() instanceof ArrayObject);
     }
 
     public function testRegistryArrayAsProps()

+ 0 - 1
tests/Zend/Service/SqlAzure/Management/ManagementClientTest.php

@@ -31,7 +31,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_SqlAzure_Management_Client */
 require_once 'Zend/Service/SqlAzure/Management/Client.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/BlobSessionHandlerTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_SessionHandler */
 require_once 'Zend/Service/WindowsAzure/SessionHandler.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/BlobStorageSharedAccessTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/BlobStorageTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/BlobStreamTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/Credentials/SharedAccessSignatureTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Credentials_SharedAccessSignature */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/Credentials/SharedKeyLiteTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Credentials_SharedKeyLite */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/Credentials/SharedKeyTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Credentials_SharedKey */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/Diagnostics/ManagerTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/DynamicTableEntityTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Table */
 require_once 'Zend/Service/WindowsAzure/Storage/Table.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/Management/ManagementClientTest.php

@@ -31,7 +31,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Management_Client */
 require_once 'Zend/Service/WindowsAzure/Management/Client.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/QueueStorageTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_Queue */
 require_once 'Zend/Service/WindowsAzure/Storage/Queue.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/RetryPolicyTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract */
 require_once 'Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/StorageTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage */
 require_once 'Zend/Service/WindowsAzure/Storage.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/TableEntityQueryTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_TableEntityQuery */
 require_once 'Zend/Service/WindowsAzure/Storage/TableEntityQuery.php';

+ 0 - 1
tests/Zend/Service/WindowsAzure/TableEntityTest.php

@@ -29,7 +29,6 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
  */
 require_once dirname(__FILE__) . '/../../../TestHelper.php';
 require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
-require_once 'PHPUnit/Framework/TestCase.php';
 
 /** Zend_Service_WindowsAzure_Storage_TableEntity */
 require_once 'Zend/Service/WindowsAzure/Storage/TableEntity.php';

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff