Browse Source

Merge remote-tracking branch 'upstream/master' into columnQuotes

Andrey F. Kupreychik 10 years ago
parent
commit
3e3cd6a53b
65 changed files with 596 additions and 122 deletions
  1. 4 1
      .travis.yml
  2. 3 3
      README.md
  3. 1 1
      documentation/manual/en/ref/requirements-dependencies-table.xml
  4. 3 3
      library/Zend/Amf/Server.php
  5. 2 2
      library/Zend/Controller/Action/Helper/Redirector.php
  6. 15 7
      library/Zend/Controller/Action/Helper/ViewRenderer.php
  7. 14 0
      library/Zend/Controller/Request/Http.php
  8. 1 0
      library/Zend/Controller/Request/HttpTestCase.php
  9. 5 4
      library/Zend/Controller/Router/Route/Chain.php
  10. 1 1
      library/Zend/Date/DateObject.php
  11. 1 1
      library/Zend/Http/Client/Adapter/Proxy.php
  12. 3 1
      library/Zend/Http/UserAgent/AbstractDevice.php
  13. 1 0
      library/Zend/Mail/Storage.php
  14. 2 0
      library/Zend/Mail/Storage/Imap.php
  15. 6 0
      library/Zend/Measure/Number.php
  16. 0 16
      library/Zend/Serializer/Adapter/PythonPickle.php
  17. 3 3
      library/Zend/Session.php
  18. 43 0
      library/Zend/Session/Validator/Exception.php
  19. 6 2
      library/Zend/Translate.php
  20. 3 1
      library/Zend/Translate/Adapter.php
  21. 1 1
      library/Zend/Version.php
  22. 53 4
      library/Zend/View.php
  23. 12 1
      library/Zend/View/Helper/HeadLink.php
  24. 16 0
      library/Zend/View/Helper/HeadMeta.php
  25. 13 1
      library/Zend/View/Helper/HeadScript.php
  26. 8 1
      library/Zend/View/Helper/HeadStyle.php
  27. 4 0
      library/Zend/View/Helper/Navigation.php
  28. 1 1
      library/Zend/View/Helper/Navigation/HelperAbstract.php
  29. 4 4
      library/Zend/XmlRpc/Server.php
  30. 1 1
      puppet/manifests/default.pp
  31. 2 8
      puppet/scripts/php-build.sh
  32. 1 1
      resources/languages/cs/Zend_Validate.php
  33. 2 2
      resources/languages/es/Zend_Validate.php
  34. 1 1
      resources/languages/hr/Zend_Validate.php
  35. 1 1
      resources/languages/it/Zend_Validate.php
  36. 1 1
      resources/languages/ja/Zend_Validate.php
  37. 1 1
      resources/languages/nl/Zend_Validate.php
  38. 1 1
      resources/languages/pt_BR/Zend_Validate.php
  39. 1 1
      resources/languages/ru/Zend_Validate.php
  40. 1 1
      resources/languages/sk/Zend_Validate.php
  41. 1 1
      resources/languages/sr/Zend_Validate.php
  42. 1 1
      resources/languages/uk/Zend_Validate.php
  43. 1 1
      tests/Zend/Cache/CommonBackendTest.php
  44. 19 0
      tests/Zend/Controller/Action/Helper/ViewRendererTest.php
  45. 2 0
      tests/Zend/Controller/Request/HttpTestCaseTest.php
  46. 114 0
      tests/Zend/Controller/Router/Route/ChainTest.php
  47. 14 2
      tests/Zend/DateTest.php
  48. 12 0
      tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php
  49. 10 0
      tests/Zend/Http/UserAgent/AbstractDeviceTest.php
  50. 7 0
      tests/Zend/Log/Writer/AbstractTest.php
  51. 4 0
      tests/Zend/Log/Writer/DbTest.php
  52. 40 0
      tests/Zend/Measure/NumberTest.php
  53. 3 0
      tests/Zend/Serializer/Adapter/PhpCodeTest.php
  54. 2 2
      tests/Zend/Service/Audioscrobbler/AudioscrobblerTest.php
  55. 8 0
      tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php
  56. 6 0
      tests/Zend/Session/SaveHandler/DbTableTest.php
  57. 6 0
      tests/Zend/Session/SessionTest.php
  58. 1 1
      tests/Zend/Validate/EmailAddressTest.php
  59. 30 0
      tests/Zend/View/Helper/HeadLinkTest.php
  60. 20 0
      tests/Zend/View/Helper/HeadMetaTest.php
  61. 14 0
      tests/Zend/View/Helper/HeadScriptTest.php
  62. 28 0
      tests/Zend/View/Helper/HeadStyleTest.php
  63. 0 1
      tests/php52_config.ini
  64. 11 35
      tests/php52_install_dependencies.sh
  65. 0 0
      tests/php7_config.ini

+ 4 - 1
.travis.yml

@@ -6,6 +6,7 @@ php:
   - 5.4
   - 5.5
   - 5.6
+  - 7
   - hhvm
 
 env: TMPDIR=/tmp
@@ -24,8 +25,9 @@ before_script:
   - mysql -e 'create database zftest;'
   - psql -c 'create database zftest;' -U postgres
 
-  - if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-add tests/config.ini; fi
+  - if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [[ "$TRAVIS_PHP_VERSION" != "7" ]]; then phpenv config-add tests/config.ini; fi
   - if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then phpenv config-add tests/php52_config.ini; fi
+  - if [[ "$TRAVIS_PHP_VERSION" == "7" ]]; then phpenv config-add tests/php7_config.ini; fi
 
   - cp ./tests/TestConfiguration.travis.php ./tests/TestConfiguration.php
 
@@ -35,4 +37,5 @@ script:
  
 matrix:
   allow_failures:
+   - php: 7
    - php: hhvm

+ 3 - 3
README.md

@@ -7,10 +7,10 @@ Master: [![Build Status](https://api.travis-ci.org/zendframework/zf1.png?branch=
 RELEASE INFORMATION
 ===================
 
-Zend Framework 1.12.11dev Release.
-Released on MMMMM DD, YYYY.
+Zend Framework 1.12.12dev Release.
+Released on MMMMMMMM DD, YYYY.
 
-IMPORTANT FIXES FOR 1.12.11
+IMPORTANT FIXES FOR 1.12.12
 ---------------------------
 
 See http://framework.zend.com/changelog for full details.

+ 1 - 1
documentation/manual/en/ref/requirements-dependencies-table.xml

@@ -118,7 +118,7 @@
                 </entry>
             </row>
             <row>
-                <entry morerows="4" valign="middle">&requirements.soft;</entry>
+                <entry morerows="3" valign="middle">&requirements.soft;</entry>
                 <entry>
                     <ulink
                         url="&zf.manual.link;/zend.db.html">

+ 3 - 3
library/Zend/Amf/Server.php

@@ -767,9 +767,9 @@ class Zend_Amf_Server implements Zend_Server_Interface
             throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object');
         }
 
-        $argv = null;
+        $args = null;
         if (2 < func_num_args()) {
-            $argv = array_slice(func_get_args(), 2);
+            $args = array_slice(func_get_args(), 2);
         }
 
         // Use the class name as the name space by default.
@@ -780,7 +780,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
 
         $this->_classAllowed[is_object($class) ? get_class($class) : $class] = true;
 
-        $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
+        $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
         $this->_buildDispatchTable();
 
         return $this;

+ 2 - 2
library/Zend/Controller/Action/Helper/Redirector.php

@@ -406,7 +406,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He
     /**
      * Redirect to a route-based URL
      *
-     * Uses route's assemble method tobuild the URL; route is specified by $name;
+     * Uses route's assemble method to build the URL; route is specified by $name;
      * default route is used if none provided.
      *
      * @param  array   $urlOptions Array of key/value pairs used to assemble URL
@@ -427,7 +427,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He
     /**
      * Redirect to a route-based URL, and immediately exit
      *
-     * Uses route's assemble method tobuild the URL; route is specified by $name;
+     * Uses route's assemble method to build the URL; route is specified by $name;
      * default route is used if none provided.
      *
      * @param  array   $urlOptions Array of key/value pairs used to assemble URL

+ 15 - 7
library/Zend/Controller/Action/Helper/ViewRenderer.php

@@ -841,13 +841,21 @@ class Zend_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_
         $inflector  = $this->getInflector();
         $request    = $this->getRequest();
         $dispatcher = $this->getFrontController()->getDispatcher();
-        $module     = $dispatcher->formatModuleName($request->getModuleName());
-        $controller = substr(
-            $dispatcher->formatControllerName($request->getControllerName()),
-            0,
-            -10
-        );
-        $action     = $dispatcher->formatActionName($request->getActionName());
+
+        // Format module name
+        $module = $dispatcher->formatModuleName($request->getModuleName());
+
+        // Format controller name
+        require_once 'Zend/Filter/Word/CamelCaseToDash.php';
+        $filter     = new Zend_Filter_Word_CamelCaseToDash();
+        $controller = $filter->filter($request->getControllerName());
+        $controller = $dispatcher->formatControllerName($controller);
+        if ('Controller' == substr($controller, -10)) {
+            $controller = substr($controller, 0, -10);
+        }
+
+        // Format action name
+        $action = $dispatcher->formatActionName($request->getActionName());
 
         $params     = compact('module', 'controller', 'action');
         foreach ($vars as $key => $value) {

+ 14 - 0
library/Zend/Controller/Request/Http.php

@@ -918,6 +918,20 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
     }
 
     /**
+     * Was the request made by PATCH?
+     *
+     * @return boolean
+     */
+    public function isPatch()
+    {
+        if ('PATCH' == $this->getMethod()) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
      * Is the request a Javascript XMLHttpRequest?
      *
      * Should work with Prototype/Script.aculo.us, possibly others.

+ 1 - 0
library/Zend/Controller/Request/HttpTestCase.php

@@ -62,6 +62,7 @@ class Zend_Controller_Request_HttpTestCase extends Zend_Controller_Request_Http
         'GET',
         'HEAD',
         'OPTIONS',
+        'PATCH',
         'POST',
         'PUT',
     );

+ 5 - 4
library/Zend/Controller/Router/Route/Chain.php

@@ -86,10 +86,10 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
      */
     public function match($request, $partial = null)
     {
+        $rawPath     = $request->getPathInfo();
         $path        = trim($request->getPathInfo(), self::URI_DELIMITER);
         $subPath     = $path;
         $values      = array();
-        $numRoutes   = count($this->_routes);
         $matchedPath = null;
 
         foreach ($this->_routes as $key => $route) {
@@ -101,12 +101,12 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
                 $separator = substr($subPath, 0, strlen($this->_separators[$key]));
 
                 if ($separator !== $this->_separators[$key]) {
+                    $request->setPathInfo($rawPath);
                     return false;
                 }
 
                 $subPath = substr($subPath, strlen($separator));
             }
-
             // TODO: Should be an interface method. Hack for 1.0 BC
             if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {
                 $match = $subPath;
@@ -115,8 +115,10 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
                 $match = $request;
             }
 
-            $res = $route->match($match, true, ($key == $numRoutes - 1));
+            $res = $route->match($match, true);
+
             if ($res === false) {
+                $request->setPathInfo($rawPath);
                 return false;
             }
 
@@ -124,7 +126,6 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
 
             if ($matchedPath !== null) {
                 $subPath   = substr($subPath, strlen($matchedPath));
-                $separator = substr($subPath, 0, strlen($this->_separators[$key]));
             }
 
             $values = $res + $values;

+ 1 - 1
library/Zend/Date/DateObject.php

@@ -318,7 +318,7 @@ abstract class Zend_Date_DateObject {
             // standard). However, this is not desired, so replacing 
             // all occurrences of "o" not preceded by a backslash 
             // with "Y"
-            $format = preg_replace('/(?<!\\\\)o\b/', 'Y', $format);
+            $format = preg_replace('/(?<!\\\\)o/', 'Y', $format);
             $result = ($gmt) ? @gmdate($format, $timestamp) : @date($format, $timestamp);
             date_default_timezone_set($oldzone);
             return $result;

+ 1 - 1
library/Zend/Http/Client/Adapter/Proxy.php

@@ -244,7 +244,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
     )
     {
         $request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
-                   "Host: " . $this->config['proxy_host'] . "\r\n";
+                   "Host: " . $host . "\r\n";
 
         // Process provided headers, including important ones to CONNECT request
         foreach ($headers as $k => $v) {

+ 3 - 1
library/Zend/Http/UserAgent/AbstractDevice.php

@@ -509,7 +509,9 @@ abstract class Zend_Http_UserAgent_AbstractDevice
                 }
                 $result['browser_version'] = '??';
             }
-        } elseif ($product == 'mozilla' && $result['browser_version'] < 5.0) {
+        } elseif ($product == 'mozilla' && isset($result['browser_version'])
+                  && $result['browser_version'] < 5.0
+        ) {
             // handles the real Mozilla (or old Netscape if version < 5.0)
             $result['browser_name'] = 'Netscape';
         }

+ 1 - 0
library/Zend/Mail/Storage.php

@@ -31,6 +31,7 @@ class Zend_Mail_Storage
     // system flags and other flags
     const FLAG_PASSED   = 'Passed';
     const FLAG_SEEN     = '\Seen';
+    const FLAG_UNSEEN   = '\Unseen';
     const FLAG_ANSWERED = '\Answered';
     const FLAG_FLAGGED  = '\Flagged';
     const FLAG_DELETED  = '\Deleted';

+ 2 - 0
library/Zend/Mail/Storage/Imap.php

@@ -88,6 +88,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract
     protected static $_knownFlags = array('\Passed'   => Zend_Mail_Storage::FLAG_PASSED,
                                           '\Answered' => Zend_Mail_Storage::FLAG_ANSWERED,
                                           '\Seen'     => Zend_Mail_Storage::FLAG_SEEN,
+                                          '\Unseen'   => Zend_Mail_Storage::FLAG_UNSEEN,
                                           '\Deleted'  => Zend_Mail_Storage::FLAG_DELETED,
                                           '\Draft'    => Zend_Mail_Storage::FLAG_DRAFT,
                                           '\Flagged'  => Zend_Mail_Storage::FLAG_FLAGGED);
@@ -99,6 +100,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract
     protected static $_searchFlags = array('\Recent'   => 'RECENT',
                                            '\Answered' => 'ANSWERED',
                                            '\Seen'     => 'SEEN',
+                                           '\Unseen'   => 'UNSEEN',
                                            '\Deleted'  => 'DELETED',
                                            '\Draft'    => 'DRAFT',
                                            '\Flagged'  => 'FLAGGED');

+ 6 - 0
library/Zend/Measure/Number.php

@@ -415,6 +415,12 @@ class Zend_Measure_Number extends Zend_Measure_Abstract
     public function convertTo($type, $round = 0, $locale = null)
     {
         $this->setType($type);
+
+        // Roman numerals do not need a formatting
+        if ($this->getType() === self::ROMAN) {
+            return $this->_value;
+        }
+
         return $this->toString($round, $locale);
     }
 }

+ 0 - 16
library/Zend/Serializer/Adapter/PythonPickle.php

@@ -100,11 +100,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
     const OP_SHORT_BINBYTES  = 'C';     //  "     "   ;    "      "       "      " < 256 bytes
 
     /**
-     * @var bool Whether or not this is a PHP 6 binary
-     */
-    protected static $_isPhp6 = null;
-
-    /**
      * @var bool Whether or not the system is little-endian
      */
     protected static $_isLittleEndian = null;
@@ -155,9 +150,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
         if (self::$_isLittleEndian === null) {
             self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00");
         }
-        if (self::$_isPhp6 === null) {
-            self::$_isPhp6 = !version_compare(PHP_VERSION, '6.0.0', '<');
-        }
 
         $this->_marker = new stdClass();
     }
@@ -1103,10 +1095,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
         $pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX
         $data    = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data);
 
-        if (self::$_isPhp6) {
-            $data = unicode_decode($data, 'UTF-8');
-        }
-
         $this->_stack[] = $data;
     }
 
@@ -1172,10 +1160,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
         list(, $n) = unpack('l', $n);
         $data      = $this->_read($n);
 
-        if (self::$_isPhp6) {
-            $data = unicode_decode($data, 'UTF-8');
-        }
-
         $this->_stack[] = $data;
     }
 

+ 3 - 3
library/Zend/Session.php

@@ -811,9 +811,9 @@ class Zend_Session extends Zend_Session_Abstract
             }
             $validator = new $validator_name;
             if ($validator->validate() === false) {
-                /** @see Zend_Session_Exception */
-                require_once 'Zend/Session/Exception.php';
-                throw new Zend_Session_Exception("This session is not valid according to {$validator_name}.");
+                /** @see Zend_Session_Validator_Exception */
+                require_once 'Zend/Session/Validator/Exception.php';
+                throw new Zend_Session_Validator_Exception("This session is not valid according to {$validator_name}.");
             }
         }
     }

+ 43 - 0
library/Zend/Session/Validator/Exception.php

@@ -0,0 +1,43 @@
+<?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    Zend_Session
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ * @since      Preview Release 0.2
+ */
+
+
+/**
+ * @see Zend_Session_Exception
+ */
+require_once 'Zend/Session/Exception.php';
+
+
+/**
+ * Zend_Session_Validator_Exception
+ *
+ * @category   Zend
+ * @package    Zend_Session
+ * @subpackage Validator
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Session_Validator_Exception extends Zend_Session_Exception
+{
+
+}
+

+ 6 - 2
library/Zend/Translate.php

@@ -63,7 +63,9 @@ class Zend_Translate {
     /**
      * Generates the standard translation object
      *
-     * @param  array|Zend_Config $options Options to use
+     * @param  array|Zend_Config|Zend_Translate_Adapter $options Options to use
+     * @param  string|array [$content] Path to content, or content itself
+     * @param  string|Zend_Locale [$locale]
      * @throws Zend_Translate_Exception
      */
     public function __construct($options = array())
@@ -96,7 +98,9 @@ class Zend_Translate {
     /**
      * Sets a new adapter
      *
-     * @param  array|Zend_Config $options Options to use
+     * @param  array|Zend_Config|Zend_Translate_Adapter $options Options to use
+     * @param  string|array [$content] Path to content, or content itself
+     * @param  string|Zend_Locale [$locale]
      * @throws Zend_Translate_Exception
      */
     public function setAdapter($options = array())

+ 3 - 1
library/Zend/Translate/Adapter.php

@@ -119,7 +119,9 @@ abstract class Zend_Translate_Adapter {
     /**
      * Generates the adapter
      *
-     * @param  array|Zend_Config $options Translation options for this adapter
+     * @param  string|array|Zend_Config $options Translation options for this adapter
+     * @param  string|array [$content]
+     * @param  string|Zend_Locale [$locale]
      * @throws Zend_Translate_Exception
      * @return void
      */

+ 1 - 1
library/Zend/Version.php

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

+ 53 - 4
library/Zend/View.php

@@ -29,10 +29,59 @@ require_once 'Zend/View/Abstract.php';
 /**
  * Concrete class for handling view scripts.
  *
- * @category   Zend
- * @package    Zend_View
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @category  Zend
+ * @package   Zend_View
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd     New BSD License
+ *
+ * Convenience methods for build in helpers (@see __call):
+ *
+ * @method string baseUrl($file = null)
+ * @method string currency($value = null, $currency = null)
+ * @method Zend_View_Helper_Cycle cycle(array $data = array(), $name = Zend_View_Helper_Cycle::DEFAULT_NAME)
+ * @method Zend_View_Helper_Doctype doctype($doctype = null)
+ * @method string fieldset($name, $content, $attribs = null)
+ * @method string form($name, $attribs = null, $content = false)
+ * @method string formButton($name, $value = null, $attribs = null)
+ * @method string formCheckbox($name, $value = null, $attribs = null, array $checkedOptions = null)
+ * @method string formErrors($errors, array $options = null)
+ * @method string formFile($name, $attribs = null)
+ * @method string formHidden($name, $value = null, array $attribs = null)
+ * @method string formImage($name, $value = null, $attribs = null)
+ * @method string formLabel($name, $value = null, array $attribs = null)
+ * @method string formMultiCheckbox($name, $value = null, $attribs = null, $options = null, $listsep = "<br />\n")
+ * @method string formNote($name, $value = null)
+ * @method string formPassword($name, $value = null, $attribs = null)
+ * @method string formRadio($name, $value = null, $attribs = null, $options = null, $listsep = "<br />\n")
+ * @method string formReset($name = '', $value = 'Reset', $attribs = null)
+ * @method string formSelect($name, $value = null, $attribs = null, $options = null, $listsep = "<br />\n")
+ * @method string formSubmit($name, $value = null, $attribs = null)
+ * @method string formText($name, $value = null, $attribs = null)
+ * @method string formTextarea($name, $value = null, $attribs = null)
+ * @method Zend_View_Helper_Gravatar gravatar($email = "", $options = array(), $attribs = array())
+ * @method Zend_View_Helper_HeadLink headLink(array $attributes = null, $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
+ * @method Zend_View_Helper_HeadMeta headMeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = array(), $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
+ * @method Zend_View_Helper_HeadScript headScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
+ * @method Zend_View_Helper_HeadStyle headStyle($content = null, $placement = 'APPEND', $attributes = array())
+ * @method Zend_View_Helper_HeadTitle headTitle($title = null, $setType = null)
+ * @method string htmlFlash($data, array $attribs = array(), array $params = array(), $content = null)
+ * @method string htmlList(array $items, $ordered = false, $attribs = false, $escape = true)
+ * @method string htmlObject($data, $type, array $attribs = array(), array $params = array(), $content = null)
+ * @method string htmlPage($data, array $attribs = array(), array $params = array(), $content = null)
+ * @method string htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null)
+ * @method Zend_View_Helper_InlineScript inlineScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript')
+ * @method string|void json($data, $keepLayouts = false, $encodeData = true)
+ * @method Zend_View_Helper_Layout layout()
+ * @method Zend_View_Helper_Navigation navigation(Zend_Navigation_Container $container = null)
+ * @method string paginationControl(Zend_Paginator $paginator = null, $scrollingStyle = null, $partial = null, $params = null)
+ * @method string partial($name = null, $module = null, $model = null)
+ * @method string partialLoop($name = null, $module = null, $model = null)
+ * @method Zend_View_Helper_Placeholder_Container_Abstract placeholder($name)
+ * @method void renderToPlaceholder($script, $placeholder)
+ * @method string serverUrl($requestUri = null)
+ * @method string translate($messageid = null)
+ * @method string url(array $urlOptions = array(), $name = null, $reset = false, $encode = true)
+ * @method Zend_Http_UserAgent userAgent(Zend_Http_UserAgent $userAgent = null)
  */
 class Zend_View extends Zend_View_Abstract
 {

+ 12 - 1
library/Zend/View/Helper/HeadLink.php

@@ -32,6 +32,14 @@ require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
  * @subpackage Helper
  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @method $this appendAlternate($href, $type, $title, $extras)
+ * @method $this appendStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array())
+ * @method $this offsetSetAlternate($index, $href, $type, $title, $extras)
+ * @method $this offsetSetStylesheet($index, $href, $media = 'screen', $conditionalStylesheet = false, array $extras = array())
+ * @method $this prependAlternate($href, $type, $title, $extras)
+ * @method $this prependStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array())
+ * @method $this setAlternate($href, $type, $title, $extras)
+ * @method $this setStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array())
  */
 class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_Standalone
 {
@@ -311,7 +319,10 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S
             && !empty($attributes['conditionalStylesheet'])
             && is_string($attributes['conditionalStylesheet']))
         {
-            $link = '<!--[if ' . $attributes['conditionalStylesheet'] . ']> ' . $link . '<![endif]-->';
+            if (str_replace(' ', '', $attributes['conditionalStylesheet']) === '!IE') {
+                $link = '<!-->' . $link . '<!--';
+            }
+            $link = '<!--[if ' . $attributes['conditionalStylesheet'] . ']>' . $link . '<![endif]-->';
         }
 
         return $link;

+ 16 - 0
library/Zend/View/Helper/HeadMeta.php

@@ -32,6 +32,19 @@ require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
  * @subpackage Helper
  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @method $this appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
+ * @method $this appendName($keyValue, $content, $conditionalName)
+ * @method $this appendProperty($property, $content, $modifiers)
+ * @method $this offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv)
+ * @method $this offsetSetName($index, $keyValue, $content, $conditionalName)
+ * @method $this offsetSetProperty($index, $property, $content, $modifiers)
+ * @method $this prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
+ * @method $this prependName($keyValue, $content, $conditionalName)
+ * @method $this prependProperty($property, $content, $modifiers)
+ * @method $this setCharset($charset)
+ * @method $this setHttpEquiv($keyValue, $content, $modifiers)
+ * @method $this setName($keyValue, $content, $modifiers)
+ * @method $this setProperty($property, $content, $modifiers)
  */
 class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_Standalone
 {
@@ -381,6 +394,9 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
             && !empty($item->modifiers['conditional'])
             && is_string($item->modifiers['conditional']))
         {
+            if (str_replace(' ', '', $item->modifiers['conditional']) === '!IE') {
+                $meta = '<!-->' . $meta . '<!--';
+            }
             $meta = '<!--[if ' . $this->_escape($item->modifiers['conditional']) . ']>' . $meta . '<![endif]-->';
         }
         

+ 13 - 1
library/Zend/View/Helper/HeadScript.php

@@ -31,6 +31,14 @@ require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
  * @subpackage Helper
  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @method $this appendFile($src, $type = 'text/javascript', array $attrs = array())
+ * @method $this appendScript($script, $type = 'text/javascript', array $attrs = array())
+ * @method $this offsetSetFile($index, $src, $type = 'text/javascript', array $attrs = array())
+ * @method $this offsetSetScript($index, $script, $type = 'text/javascript', array $attrs = array())
+ * @method $this prependFile($src, $type = 'text/javascript', array $attrs = array())
+ * @method $this prependScript($script, $type = 'text/javascript', array $attrs = array())
+ * @method $this setFile($src, $type = 'text/javascript', array $attrs = array())
+ * @method $this setScript($script, $type = 'text/javascript', array $attrs = array())
  */
 class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container_Standalone
 {
@@ -447,7 +455,11 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container
             && !empty($item->attributes['conditional'])
             && is_string($item->attributes['conditional']))
         {
-            $html = $indent . '<!--[if ' . $item->attributes['conditional'] . ']> ' . $html . '<![endif]-->';
+            // inner wrap with comment end and start if !IE
+            if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') {
+                $html = '<!-->' . $html . '<!--';
+            }
+            $html = $indent . '<!--[if ' . $item->attributes['conditional'] . ']>' . $html . '<![endif]-->';
         } else {
             $html = $indent . $html;
         }

+ 8 - 1
library/Zend/View/Helper/HeadStyle.php

@@ -31,6 +31,10 @@ require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
  * @subpackage Helper
  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @method $this appendStyle($content, array $attributes = array())
+ * @method $this offsetSetStyle($index, $content, array $attributes = array())
+ * @method $this prependStyle($content, array $attributes = array())
+ * @method $this setStyle($content, array $attributes = array())
  */
 class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_Standalone
 {
@@ -370,7 +374,10 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_
               . '</style>';
 
         if (null == $escapeStart && null == $escapeEnd) {
-            $html = '<!--[if ' . $item->attributes['conditional'] . ']> ' . $html . '<![endif]-->';
+            if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') {
+                $html = '<!-->' . $html . '<!--';
+            }
+            $html = '<!--[if ' . $item->attributes['conditional'] . ']>' . $html . '<![endif]-->';
         }
 
         return $html;

+ 4 - 0
library/Zend/View/Helper/Navigation.php

@@ -33,6 +33,10 @@ require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';
  * @subpackage Helper
  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @method Zend_View_Helper_Navigation_Breadcrumbs breadcrumbs
+ * @method Zend_View_Helper_Navigation_Links links
+ * @method Zend_View_Helper_Navigation_Menu menu
+ * @method Zend_View_Helper_Navigation_Sitemap sitemap
  */
 class Zend_View_Helper_Navigation
     extends Zend_View_Helper_Navigation_HelperAbstract

+ 1 - 1
library/Zend/View/Helper/Navigation/HelperAbstract.php

@@ -952,7 +952,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract
      * Sets default ACL role(s) to use when iterating pages if not explicitly
      * set later with {@link setRole()}
      *
-     * @param  midex $role               [optional] role to set. Expects null,
+     * @param  mixed $role               [optional] role to set. Expects null,
      *                                   string, or an instance of
      *                                   {@link Zend_Acl_Role_Interface}.
      *                                   Default is null, which sets no default

+ 4 - 4
library/Zend/XmlRpc/Server.php

@@ -278,13 +278,13 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract
             throw new Zend_XmlRpc_Server_Exception('Invalid method class', 610);
         }
 
-        $argv = null;
+        $args = null;
         if (2 < func_num_args()) {
-            $argv = func_get_args();
-            $argv = array_slice($argv, 2);
+            $args = func_get_args();
+            $args = array_slice($args, 2);
         }
 
-        $dispatchable = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
+        $dispatchable = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
         foreach ($dispatchable->getMethods() as $reflection) {
             $this->_buildSignature($reflection, $class);
         }

+ 1 - 1
puppet/manifests/default.pp

@@ -7,7 +7,7 @@ exec { "apt-update" :
 }
 
 # install vim and all packages required to build PHP
-$packages = [ "vim", "curl", "libxpm-dev", "libmcrypt-dev", "libbz2-dev", "libcurl4-gnutls-dev", "libjpeg62-dev", "libpng12-dev", "libfreetype6-dev", "libt1-dev", "libgmp3-dev", "libmysqlclient-dev", "libpq-dev", "libpcre3-dev", "libxml2-dev", "libxslt-dev", "make"]
+$packages = [ "vim", "curl", "libxpm-dev", "libmcrypt-dev", "libbz2-dev", "libcurl4-gnutls-dev", "libjpeg62-dev", "libpng12-dev", "libfreetype6-dev", "libt1-dev", "libgmp3-dev", "libmysqlclient-dev", "libpq-dev", "libpcre3-dev", "libxml2-dev", "libxslt-dev", "make", "phpunit"]
 
 package { $packages :
     ensure => installed,

+ 2 - 8
puppet/scripts/php-build.sh

@@ -76,15 +76,9 @@ make -j 5
 echo "Installing ${VERSION}${POSTFIX} in $PHP_DIR"
 sudo make install
 
-echo "Installing PHPUnit"
-export PATH=/usr/local/php/${VERSION}/bin:/usr/local/bin:/usr/bin:/bin:/vagrant/puppet/scripts
-sudo pear update-channels
-sudo pear upgrade-all
-sudo pear config-set auto_discover 1
-sudo pear install pear.phpunit.de/PHPUnit-3.4.15
-
+echo "Linking PHPUnit library"
+sudo ln -s /usr/share/php/PHPUnit /usr/local/php/${VERSION}${POSTFIX}/lib/php/PHPUnit
 
 echo ""
 echo "PHP version ${VERSION} is now installed. Type: pe ${VERSION}"
 echo ""
-

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

@@ -78,7 +78,7 @@ return array(
     // Zend_Validate_EmailAddress
     "Invalid type given. String expected" => "Chybný typ. Byl očekáván řetězec",
     "'%value%' is no valid email address in the basic format local-part@hostname" => "'%value%' není platná e-mailová adresa ve formátu local-part@hostname",
-    "'%hostname%' is no valid hostname for email address '%value%'" => "'%hostname%' není platné hostname pro emailovou adresu '%value%'",
+    "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' není platné hostname pro emailovou adresu '%value%'",
     "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' neobsahuje platný MX záznam pro e-mailovou adresu '%value%'",
     "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' není v směrovatelném úseku sítě. E-mailová adresa '%value%' by neměla být požadována z veřejné sítě",
     "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' nemůže být porovnán proti dot-atom formátu",

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' no se ajusta al formato de fecha '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "No fue encontrado ningun registro que coincida con %value%",
+    "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%",
 
     // Zend_Validate_Digits
@@ -78,7 +78,7 @@ return array(
     // Zend_Validate_EmailAddress
     "Invalid type given, value should be a string" => "El tipo especificado no es válido, el valor debe ser una cadena de texto",
     "'%value%' is no valid email address in the basic format local-part@hostname" => "'%value%' no es una dirección de correo electrónico válido en el formato local-part@hostname",
-    "'%hostname%' is no valid hostname for email address '%value%'" => "'%hostname%' no es un nombre de host válido para la dirección de correo electrónico '%value%'",
+    "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' no es un nombre de host válido para la dirección de correo electrónico '%value%'",
     "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' no parece tener un registro MX válido para la dirección de correo electrónico '%value%'",
     "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network." => "'%hostname%' no esta en un segmento de red ruteable. La dirección de correo electrónico '%value%' no se debe poder resolver desde una red pública.",
     "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' no es igual al formato dot-atom",

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

@@ -66,7 +66,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' ne odgovara formatu datuma '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Nije pronađen zapis koji se podudara sa %value%",
+    "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",
 
     // Zend_Validate_Digits

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' non corrisponde al formato data '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Non è stato trovato una riga con valore %value%",
+    "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%",
 
     // Zend_Validate_Digits

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

@@ -78,7 +78,7 @@ return array(
     // Zend_Validate_EmailAddress
     "Invalid type given. String expected" => "不正な形式です。文字列が期待されています",
     "'%value%' is no valid email address in the basic format local-part@hostname" => "'%value%' はメールアドレスの基本的な形式 local-part@hostname ではありません",
-    "'%hostname%' is no valid hostname for email address '%value%'" => "メールアドレス '%value%' 内の '%hostname%' は有効なホスト名ではありません",
+    "'%hostname%' is not a valid hostname for email address '%value%'" => "メールアドレス '%value%' 内の '%hostname%' は有効なホスト名ではありません",
     "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "メールアドレス '%value%' 内の '%hostname%' は有効な MX レコードではないようです",
     "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' はネットワークセグメントにありません。メールアドレス '%value%' はパブリックなネットワークから名前解決できませんでした",
     "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' はドットアトム形式ではありません",

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' past niet in het datumformaat '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Er kon geen record gevonden wat overeenkomt met %value%",
+    "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",
 
     // Zend_Validate_Digits

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' não se encaixa no formato de data '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Não foram encontrados registros para %value%",
+    "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%",
 
     // Zend_Validate_Digits

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' не соответствует формату даты '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Не найдено записей, совпадающих с '%value%'",
+    "No record matching '%value%' was found" => "Не найдено записей, совпадающих с '%value%'",
     "A record matching '%value%' was found" => "Найдена запись, совпадающая со значением '%value%'",
 
     // Zend_Validate_Digits

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

@@ -80,7 +80,7 @@ return array(
     "'%value%' is not a valid email address in the basic format local-part@hostname" => "'%value%' nie je platná e-mailová adresa v tvare local-part@hostname",
     "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' je neplatný hostname pre emailovou adresu '%value%'",
     "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' neobsahuje platný MX záznam pre e-mailovou adresu '%value%'",
-    "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' nie je v smerovateľnom úseku siete. E-mailová adresa '%valute%' by nemala byť požadovaná z verejnej siete",
+    "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' nie je v smerovateľnom úseku siete. E-mailová adresa '%value%' by nemala byť požadovaná z verejnej siete",
     "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' nemôže byť porovnaný proti dot-atom formátu",
     "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' nemôže byť porovnaný proti quoted-string formátu",
     "'%localPart%' is not a valid local part for email address '%value%'" => "'%localPart%' je neplatná 'local part' pre e-mailovou adresu '%value%'",

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' nije u formatu datuma '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Zapis koji se poklapa sa %value% nije pronađen",
+    "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",
 
     // Zend_Validate_Digits

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

@@ -67,7 +67,7 @@ return array(
     "'%value%' does not fit the date format '%format%'" => "'%value%' не відповідає формату дати '%format%'",
 
     // Zend_Validate_Db_Abstract
-    "No record matching %value% was found" => "Не знайдено записів, що відповідають '%value%'",
+    "No record matching '%value%' was found" => "Не знайдено записів, що відповідають '%value%'",
     "A record matching '%value%' was found" => "Знайдено запис, що відповідає '%value%'",
 
     // Zend_Validate_Digits

+ 1 - 1
tests/Zend/Cache/CommonBackendTest.php

@@ -235,7 +235,7 @@ abstract class Zend_Cache_CommonBackendTest extends PHPUnit_Framework_TestCase {
             && getenv('TRAVIS')
         ) {
             $this->markTestSkipped(
-                'Test randomly fail on travis-ci.'
+                'Test randomly fail on Travis CI.'
             );
         }
 

+ 19 - 0
tests/Zend/Controller/Action/Helper/ViewRendererTest.php

@@ -938,6 +938,25 @@ class Zend_Controller_Action_Helper_ViewRendererTest extends PHPUnit_Framework_T
         );
     }
 
+    /**
+     * @group GH-440
+     */
+    public function testControllerNameFormattingShouldRespectWordCamelCaseToDash()
+    {
+       $this->request->setControllerName('MetadataValidation')
+                     ->setActionName('index');
+
+       $this->helper->setActionController(
+           new Bar_IndexController(
+               $this->request, $this->response, array()
+           )
+       );
+
+       $this->assertEquals(
+           'metadata-validation/index.phtml', $this->helper->getViewScript()
+       );
+    }
+
     protected function _normalizePath($path)
     {
         return str_replace(array('/', '\\'), '/', $path);

+ 2 - 0
tests/Zend/Controller/Request/HttpTestCaseTest.php

@@ -307,6 +307,8 @@ class Zend_Controller_Request_HttpTestCaseTest extends PHPUnit_Framework_TestCas
         $this->assertTrue($this->request->isHead());
         $this->request->setMethod('DELETE');
         $this->assertTrue($this->request->isDelete());
+        $this->request->setMethod('PATCH');
+        $this->assertTrue($this->request->isPatch());
     }
 }
 

+ 114 - 0
tests/Zend/Controller/Router/Route/ChainTest.php

@@ -815,6 +815,54 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $this->assertEquals(2, $res['bar']);
     }
 
+    public function testMultipleChainsWithVersion2Routes()
+    {
+
+        $foo = new Zend_Controller_Router_Route_SubclassTest('foo');
+        $bar = new Zend_Controller_Router_Route_SubclassTest('bar', array('baz' => 'no'));
+
+
+        $chain = $foo->chain($bar);
+
+        $foo2 = new Zend_Controller_Router_Route_SubclassTest('foo');
+        $baz = new Zend_Controller_Router_Route_SubclassTest('baz', array('baz' => 'baz'));
+
+        $chain2 = $foo2->chain($baz);
+
+        $rewrite = new Zend_Controller_Router_Rewrite();
+        $rewrite->addRoute('chain2', $chain2); // First In Last Out, we want this to be matched against second
+        $rewrite->addRoute('chain1', $chain);
+        $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo/baz');
+
+        $res = $rewrite->route($request);
+        $this->assertEquals('baz', $res->getParam('baz'), 'Route did not match');
+        $this->assertEquals('chain2', $rewrite->getCurrentRouteName(), 'Routing did not match expected route');
+    }
+
+    /**
+     * @throws Zend_Controller_Router_Exception
+     */
+    public function testMultipleChainsResettingPathInfoInSegmentBlock()
+    {
+        $foo = new Zend_Controller_Router_Route_SubclassTest('notfoo');
+        $bar = new Zend_Controller_Router_Route_SubclassTest('bar', array('baz' => 'no'));
+
+
+        $chain = $foo->chain($bar);
+
+        $static = new Zend_Controller_Router_Route_SimpleSubclassTest('/foo', array('foo' => 'foo'));
+
+        $rewrite = new Zend_Controller_Router_Rewrite();
+        $rewrite->addRoute('static', $static); // First In Last Out, we want this to be matched against second
+        $rewrite->addRoute('chain', $chain);
+        $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo');
+
+        $res = $rewrite->route($request);
+        $this->assertEquals('foo', $res->getParam('foo'), 'Route did not match');
+        $this->assertEquals('static', $rewrite->getCurrentRouteName(), 'Routing did not match expected route');
+
+    }
+
     /**
      * @group ZF-11443
      */
@@ -934,6 +982,72 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
     }
 }
 
+class Zend_Controller_Router_Route_SimpleSubclassTest extends Zend_Controller_Router_Route_Abstract
+{
+    /**
+     * @var string
+     */
+    protected $path;
+
+    /**
+     * @var array
+     */
+    protected $params = array();
+
+    public function __construct($path, $params)
+    {
+        $this->path = $path;
+        $this->params = $params;
+    }
+
+    public function match($path, $partial = false)
+    {
+        $path = $path->getPathInfo();
+        if ($path == $this->path) {
+            $this->setMatchedPath($this->path);
+            return $this->params;
+        }
+        return false;
+    }
+
+    public function getVersion()
+    {
+        return 2;
+    }
+
+    public function assemble($data = array(), $reset = false, $encode = false)
+    {}
+
+    public static function getInstance(Zend_Config $config)
+    {}
+
+}
+
+class Zend_Controller_Router_Route_SubclassTest extends Zend_Controller_Router_Route_Static
+{
+    public function match($path, $partial = false)
+    {
+        $path = $path->getPathInfo();
+        $match = parent::match($path, $partial);
+        if (is_array($match)) {
+            $this->setMatchedPath($this->_route);
+        }
+        return $match;
+    }
+
+    public function getVersion()
+    {
+        return 2;
+    }
+
+    public function assemble($data = array(), $reset = false, $encode = false)
+    {}
+
+    public static function getInstance(Zend_Config $config)
+    {}
+
+}
+
 /**
  * Zend_Controller_Router_ChainTest_Request - request object for router testing
  *

+ 14 - 2
tests/Zend/DateTest.php

@@ -5522,7 +5522,7 @@ class Zend_DateTest extends PHPUnit_Framework_TestCase
         Zend_Date::setOptions(array('format_type' => 'php'));
 
         date_default_timezone_set('GMT');
-        $date = new Zend_Date(mktime(20,10,0,09,20,2009));
+        $date = new Zend_Date(mktime(20,10,0,9,20,2009));
         $this->assertSame(gmdate('w',$date->getTimestamp()), $date->toString(      'w'));
         $this->assertSame(gmdate('d',$date->getTimestamp()), $date->toString(      'd'));
         $this->assertSame(gmdate('D',$date->getTimestamp()), $date->toString('D', 'en'));
@@ -5561,7 +5561,7 @@ class Zend_DateTest extends PHPUnit_Framework_TestCase
         $this->assertSame(gmdate('U',$date->getTimestamp()), $date->toString(      'U'));
 
         date_default_timezone_set('Indian/Maldives');
-        $date = new Zend_Date(mktime(20,10,0,09,20,2009));
+        $date = new Zend_Date(mktime(20,10,0,9,20,2009));
         $this->assertSame(date('w',$date->getTimestamp()), $date->toString(      'w'));
         $this->assertSame(date('d',$date->getTimestamp()), $date->toString(      'd'));
         $this->assertSame(date('D',$date->getTimestamp()), $date->toString('D', 'en'));
@@ -5725,6 +5725,18 @@ class Zend_DateTest extends PHPUnit_Framework_TestCase
             $date->getTimezoneFromString('America/New_York')
         );
     }
+
+    /**
+     * @group GH-561
+     */
+    public function testGetYearAndMonthWithoutDot()
+    {
+        $date = new Zend_Date('2014.12.29');
+
+        $this->assertEquals('29.12.2014', $date->get(Zend_Date::DATE_MEDIUM));
+        $this->assertEquals('2014.12', $date->get('Y.M'));
+        $this->assertEquals('201412', $date->get('YM'));
+    }
 }
 
 class Zend_Date_TestHelper extends Zend_Date

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

@@ -265,6 +265,12 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
 
     public function testRespondsToValidConfirmationWith200Response()
     {
+        if (getenv('TRAVIS')) {
+            $this->markTestSkipped(
+                'Test randomly fail on Travis CI.'
+            );
+        }
+
         $this->_get['hub_mode'] = 'unsubscribe';
         $this->_tableGateway->expects($this->any())
             ->method('find')
@@ -306,6 +312,12 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
 
     public function testRespondsToValidConfirmationWithBodyContainingHubChallenge()
     {
+        if (getenv('TRAVIS')) {
+            $this->markTestSkipped(
+                'Test randomly fail on Travis CI.'
+            );
+        }
+
         $this->_tableGateway->expects($this->any())
             ->method('find')
             ->with($this->equalTo('verifytokenkey'))

+ 10 - 0
tests/Zend/Http/UserAgent/AbstractDeviceTest.php

@@ -10128,4 +10128,14 @@ audio/vnd.qcelp, application/xhtml+xml'
         $capabilities = Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent($userAgent);
         $this->assertEquals('Opera', $capabilities['browser_name']);
     }
+
+    /**
+     * @group GH-550
+     */
+    public function testOnlyBrowserNameShouldNotResultInNotices()
+    {
+        $userAgent    = 'Mozilla';
+        $capabilities = Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent($userAgent);
+        $this->assertEquals('Mozilla', $capabilities['browser_name']);
+    }
 }

+ 7 - 0
tests/Zend/Log/Writer/AbstractTest.php

@@ -37,6 +37,9 @@ require_once 'Zend/Log/Writer/Abstract.php';
  */
 class Zend_Log_Writer_AbstractTest extends PHPUnit_Framework_TestCase
 {
+    /**
+     * @var Zend_Log_Writer_Abstract
+     */
     protected $_writer;
 
     public static function main()
@@ -55,6 +58,10 @@ class Zend_Log_Writer_AbstractTest extends PHPUnit_Framework_TestCase
      */
     public function testSetFormatter()
     {
+        if (version_compare(phpversion(), '7', '>=')) {
+            $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
+        }
+
         require_once 'Zend/Log/Formatter/Simple.php';
         $this->_writer->setFormatter(new Zend_Log_Formatter_Simple());
         $this->setExpectedException('PHPUnit_Framework_Error');

+ 4 - 0
tests/Zend/Log/Writer/DbTest.php

@@ -138,6 +138,10 @@ class Zend_Log_Writer_DbTest extends PHPUnit_Framework_TestCase
      */
     public function testThrowStrictSetFormatter()
     {
+        if (version_compare(phpversion(), '7', '>=')) {
+            $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
+        }
+
         try {
             $this->writer->setFormatter(new StdClass());
         } catch (Exception $e) {

+ 40 - 0
tests/Zend/Measure/NumberTest.php

@@ -254,4 +254,44 @@ class Zend_Measure_NumberTest extends PHPUnit_Framework_TestCase
         $value = new Zend_Measure_Number('_X',Zend_Measure_Number::ROMAN, 'en');
         $this->assertEquals('10,000 ⑽', $value->convertTo(Zend_Measure_Number::DECIMAL));
     }
+
+    /**
+     * @dataProvider providerConvertingDecimalToRoman
+     * @group GH-536
+     */
+    public function testConvertingDecimalToRoman($decimal, $roman)
+    {
+        $number = new Zend_Measure_Number(
+            $decimal,
+            Zend_Measure_Number::DECIMAL,
+            null
+        );
+
+        $this->assertEquals(
+            $roman,
+            $number->convertTo(Zend_Measure_Number::ROMAN)
+        );
+    }
+
+    /**
+     * Data provider for testConvertingDecimalToRoman
+     * @group GH-536
+     * @return array
+     */
+    public function providerConvertingDecimalToRoman()
+    {
+        return array(
+            array(10, 'X'),
+            array(11, 'XI'),
+            array(12, 'XII'),
+            array(13, 'XIII'),
+            array(14, 'XIV'),
+            array(15, 'XV'),
+            array(16, 'XVI'),
+            array(17, 'XVII'),
+            array(18, 'XVIII'),
+            array(19, 'XIX'),
+            array(20, 'XX'),
+        );
+    }
 }

+ 3 - 0
tests/Zend/Serializer/Adapter/PhpCodeTest.php

@@ -141,6 +141,9 @@ class Zend_Serializer_Adapter_PhpCodeTest extends PHPUnit_Framework_TestCase
 
     public function testUnserialzeInvalid()
     {
+        if (version_compare(phpversion(), '7', '>=')) {
+            $this->markTestSkipped('Evaling of invalid input is PHP Parse error in PHP7+');
+        }
         $value = 'not a serialized string';
         $this->setExpectedException('Zend_Serializer_Exception');
         $this->_adapter->unserialize($value);

+ 2 - 2
tests/Zend/Service/Audioscrobbler/AudioscrobblerTest.php

@@ -46,7 +46,7 @@ class Zend_Service_Audioscrobbler_AudioscrobblerTest extends Zend_Service_Audios
 
         try {
             $response = $as->userGetProfileInformation();
-            $this->fail('Expected Zend_Service_Technorati_Exception not thrown');
+            $this->fail('Expected Zend_Http_Client_Exception not thrown');
         } catch(Zend_Http_Client_Exception $e) {
             $this->assertContains("No user exists with this name", $e->getMessage());
         }
@@ -60,7 +60,7 @@ class Zend_Service_Audioscrobbler_AudioscrobblerTest extends Zend_Service_Audios
 
         try {
             $response = $as->userGetProfileInformation();
-            $this->fail('Expected Zend_Service_Technorati_Exception not thrown');
+            $this->fail('Expected Zend_Http_Client_Exception not thrown');
         } catch(Zend_Http_Client_Exception $e) {
             $this->assertContains("404", $e->getMessage());
         }

+ 8 - 0
tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php

@@ -164,6 +164,10 @@ class Zend_Service_DeveloperGarden_OfflineSecurityTokenServerTest extends PHPUni
 
     public function testSetTokenToCache1stParamException()
     {
+        if (version_compare(phpversion(), '7', '>=')) {
+            $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
+        }
+
         try {
             Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache(
                 'NotExisting',
@@ -176,6 +180,10 @@ class Zend_Service_DeveloperGarden_OfflineSecurityTokenServerTest extends PHPUni
 
     public function testSetTokenToCache2ndParamException()
     {
+        if (version_compare(phpversion(), '7', '>=')) {
+            $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
+        }
+
         try {
             Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache(
                 'securityToken',

+ 6 - 0
tests/Zend/Session/SaveHandler/DbTableTest.php

@@ -449,6 +449,12 @@ class Zend_Session_SaveHandler_DbTableTest extends PHPUnit_Framework_TestCase
 
     public function testReadWriteThreeTimesAndGc()
     {
+        if (getenv('TRAVIS')) {
+            $this->markTestSkipped(
+                'Test randomly fail on Travis CI.'
+            );
+        }
+
         $config = $this->_saveHandlerTableConfig;
         unset($config[Zend_Session_SaveHandler_DbTable::PRIMARY_ASSIGNMENT]);
         $config['primary'] = array($config['primary'][0]);

+ 6 - 0
tests/Zend/Session/SessionTest.php

@@ -782,6 +782,12 @@ class Zend_SessionTest extends PHPUnit_Framework_TestCase
      */
     public function testSetExpirationSeconds()
     {
+        if (getenv('TRAVIS')) {
+            $this->markTestSkipped(
+                'Test randomly fail on Travis CI.'
+            );
+        }
+
         // Calculate common script execution time
         $startTime = time();
         exec($this->_script, $result, $returnValue);

+ 1 - 1
tests/Zend/Validate/EmailAddressTest.php

@@ -633,7 +633,7 @@ class Zend_Validate_EmailAddressTest extends PHPUnit_Framework_TestCase
         }
         $validator = new Zend_Validate_EmailAddress();
         $validator->setValidateMx(true);
-        $this->assertTrue($validator->isValid('testmail@detrèsbonsdomaines.com'));
+        $this->assertTrue($validator->isValid('testmail@zürich.ch'));
     }
 }
 

+ 30 - 0
tests/Zend/View/Helper/HeadLinkTest.php

@@ -496,6 +496,36 @@ class Zend_View_Helper_HeadLinkTest extends PHPUnit_Framework_TestCase
 
         $this->assertEquals($expected, $this->helper->toString());
     }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalStylesheetCreationNoIE()
+    {
+        $this->helper->setStylesheet('/styles.css', 'screen', '!IE');
+        $item = $this->helper->getValue();
+        $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+        $this->assertEquals('!IE', $item->conditionalStylesheet);
+        $string = $this->helper->toString();
+        $this->assertContains('/styles.css', $string);
+        $this->assertContains('<!--[if !IE]><!--><', $string);
+        $this->assertContains('<!--<![endif]-->', $string);
+    }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalStylesheetCreationNoIEWidthSpaces()
+    {
+        $this->helper->setStylesheet('/styles.css', 'screen', '! IE');
+        $item = $this->helper->getValue();
+        $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+        $this->assertEquals('! IE', $item->conditionalStylesheet);
+        $string = $this->helper->toString();
+        $this->assertContains('/styles.css', $string);
+        $this->assertContains('<!--[if ! IE]><!--><', $string);
+        $this->assertContains('<!--<![endif]-->', $string);
+    }
 }
 
 // Call Zend_View_Helper_HeadLinkTest::main() if this source file is executed directly.

+ 20 - 0
tests/Zend/View/Helper/HeadMetaTest.php

@@ -543,6 +543,26 @@ class Zend_View_Helper_HeadMetaTest extends PHPUnit_Framework_TestCase
         $result = (string)$helper->headMeta()->appendName('foo','bar');
         $this->assertEquals($expected, $result);
     }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalNoIE()
+    {
+        $html = $this->helper->appendHttpEquiv('foo', 'bar', array('conditional' => '!IE'))->toString();
+        $this->assertContains('<!--[if !IE]><!--><', $html);
+        $this->assertContains('<!--<![endif]-->', $html);
+    }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalNoIEWidthSpace()
+    {
+        $html = $this->helper->appendHttpEquiv('foo', 'bar', array('conditional' => '! IE'))->toString();
+        $this->assertContains('<!--[if ! IE]><!--><', $html);
+        $this->assertContains('<!--<![endif]-->', $html);
+    }
 }
 
 // Call Zend_View_Helper_HeadMetaTest::main() if this source file is executed directly.

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

@@ -520,6 +520,20 @@ document.write(bar.strlen());');
         $this->assertNotContains('//<!--', $test);
         $this->assertNotContains('//-->', $test);
     }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalScriptNoIE()
+    {
+        $this->helper->setAllowArbitraryAttributes(true);
+        $this->helper->appendFile(
+            '/js/foo.js', 'text/javascript', array('conditional' => '!IE')
+        );
+        $test = $this->helper->toString();
+        $this->assertContains('<!--[if !IE]><!--><', $test);
+        $this->assertContains('<!--<![endif]-->', $test);
+    }
 }
 
 // Call Zend_View_Helper_HeadScriptTest::main() if this source file is executed directly.

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

@@ -456,6 +456,34 @@ a {
         $this->assertNotContains('<!--' . PHP_EOL, $value);
         $this->assertNotContains(PHP_EOL . '-->', $value);
     }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalScriptNoIE()
+    {
+        $this->helper->appendStyle('
+a {
+    display: none;
+}', array('media' => 'screen,projection', 'conditional' => '!IE'));
+        $test = $this->helper->toString();
+        $this->assertContains('<!--[if !IE]><!--><', $test);
+        $this->assertContains('<!--<![endif]-->', $test);
+    }
+
+    /**
+     * @group GH-515
+     */
+    public function testConditionalScriptNoIEWidthSpace()
+    {
+        $this->helper->appendStyle('
+a {
+    display: none;
+}', array('media' => 'screen,projection', 'conditional' => '! IE'));
+        $test = $this->helper->toString();
+        $this->assertContains('<!--[if ! IE]><!--><', $test);
+        $this->assertContains('<!--<![endif]-->', $test);
+    }
 }
 
 // Call Zend_View_Helper_HeadStyleTest::main() if this source file is executed directly.

+ 0 - 1
tests/php52_config.ini

@@ -1 +0,0 @@
-extension = memcached.so

+ 11 - 35
tests/php52_install_dependencies.sh

@@ -11,30 +11,19 @@ pear uninstall -n pear.phpunit.de/PHP_Timer
 # Install PHPUnit from git (only possibility for PHPUnit 3.6)
 cd tests
 mkdir phpunit && cd phpunit
-git clone git://github.com/sebastianbergmann/phpunit.git
-git clone git://github.com/sebastianbergmann/dbunit.git
-git clone git://github.com/sebastianbergmann/php-file-iterator.git
-git clone git://github.com/sebastianbergmann/php-text-template.git
-git clone git://github.com/sebastianbergmann/php-code-coverage.git
-git clone git://github.com/sebastianbergmann/php-token-stream.git
-git clone git://github.com/sebastianbergmann/php-timer.git
-git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
-git clone git://github.com/sebastianbergmann/phpunit-selenium.git
-git clone git://github.com/sebastianbergmann/phpunit-story.git
-git clone git://github.com/sebastianbergmann/php-invoker.git
 
 # last versions without anonymous functions
-cd dbunit && git checkout 1.1 && cd ..
-cd php-code-coverage && git checkout 1.1 && cd ..
-cd php-file-iterator && git checkout 1.3.2 && cd ..
-cd php-invoker && git checkout 1.1.1 && cd ..
-cd php-text-template && git checkout 1.1.2 && cd ..
-cd php-timer && git checkout 1.0.3 && cd ..
-cd php-token-stream && git checkout 1.1.4 && cd ..
-cd phpunit && git checkout 3.6.12 && cd ..
-cd phpunit-mock-objects && git checkout 1.1 && cd ..
-cd phpunit-selenium && git checkout 1.1 && cd ..
-cd phpunit-story && git checkout 1.0.0 && cd ..
+git clone --depth=1 --branch=3.6.12 git://github.com/sebastianbergmann/phpunit.git
+git clone --depth=1 --branch=1.1 git://github.com/sebastianbergmann/dbunit.git
+git clone --depth=1 --branch=1.3.2 git://github.com/sebastianbergmann/php-file-iterator.git
+git clone --depth=1 --branch=1.1.2 git://github.com/sebastianbergmann/php-text-template.git
+git clone --depth=1 --branch=1.1 git://github.com/sebastianbergmann/php-code-coverage.git
+git clone --depth=1 --branch=1.1.4 git://github.com/sebastianbergmann/php-token-stream.git
+git clone --depth=1 --branch=1.0.3 git://github.com/sebastianbergmann/php-timer.git
+git clone --depth=1 --branch=1.1 git://github.com/sebastianbergmann/phpunit-mock-objects.git
+git clone --depth=1 --branch=1.1 git://github.com/sebastianbergmann/phpunit-selenium.git
+git clone --depth=1 --branch=1.0.0 git://github.com/sebastianbergmann/phpunit-story.git
+git clone --depth=1 --branch=1.1.1 git://github.com/sebastianbergmann/php-invoker.git
 
 sed -i 's/@package_version@/3.6.12/g' phpunit/PHPUnit/Runner/Version.php
 cat phpunit/PHPUnit/Runner/Version.php
@@ -42,16 +31,3 @@ cat phpunit/PHPUnit/Runner/Version.php
 cd phpunit
 
 php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php --version
-
-cd ..
-cd ..
-
-# memcache 2.1.0 is the last version to support the php 5.2 branch
-pecl download memcached-2.1.0
-tar zxvf memcached*.tgz && cd memcached*
-make clean
-printf "\n" | phpize
-./configure --with-libmemcached-dir=/usr/local && make && make install
-
-printf "\n" | pecl uninstall memcache
-printf "\n" | pecl install memcache

+ 0 - 0
tests/php7_config.ini