Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/zendframework/zf2 into qu…
Browse files Browse the repository at this point in the history
…ickfix/sharedem-type-preference
  • Loading branch information
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .travis/run-tests.sh
Expand Up @@ -8,7 +8,7 @@ for tested in "${testedcomponents[@]}"
do
echo "$tested:"
phpunit -c $testdir/phpunit.xml $testdir/$tested
let "result = $result || $?"
result=$(($result || $?))
done

exit $result
exit $result
2 changes: 1 addition & 1 deletion .travis/tested-components
Expand Up @@ -10,7 +10,7 @@ Zend/Crypt
Zend/Currency
Zend/Db
Zend/Di
Zend/Docbook
Zend/DocBook
Zend/Dojo
Zend/Dom
Zend/EventManager
Expand Down
22 changes: 3 additions & 19 deletions src/Value.php
Expand Up @@ -31,19 +31,6 @@
* Using this function, users/Zend\XmlRpc\Client object can create the Zend\XmlRpc\Value objects
* from PHP variables, XML string or by specifing the exact XML-RPC natvie type
*
* @uses Zend\XmlRpc\Generator\DomDocument
* @uses Zend\XmlRpc\Generator\XmlWriter
* @uses Zend\XmlRpc\Value\ArrayValue
* @uses Zend\XmlRpc\Value\Base64
* @uses Zend\XmlRpc\Value\BigInteger
* @uses Zend\XmlRpc\Value\Boolean
* @uses Zend\XmlRpc\Value\DateTime
* @uses Zend\XmlRpc\Value\Double
* @uses Zend\XmlRpc\Value\Exception
* @uses Zend\XmlRpc\Value\Integer
* @uses Zend\XmlRpc\Value\Nil
* @uses Zend\XmlRpc\Value\String
* @uses Zend\XmlRpc\Value\Struct
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
Expand Down Expand Up @@ -195,11 +182,9 @@ public function generateXml()
*
* By default the value type is autodetected according to it's PHP type
*
* @param mixed $value
* @param Zend\XmlRpc\Value::constant $type
*
* @return Zend\XmlRpc\Value
* @static
* @param mixed $value
* @param Zend\XmlRpc\Value::constant $type
* @return Value
*/
public static function getXmlRpcValue($value, $type = self::AUTO_DETECT_TYPE)
{
Expand Down Expand Up @@ -433,7 +418,6 @@ protected static function _createSimpleXMLElement(&$xml)
protected static function _extractTypeAndValue(\SimpleXMLElement $xml, &$type, &$value)
{
list($type, $value) = each($xml);

if (!$type and $value === null) {
$namespaces = array('ex' => 'http://ws.apache.org/xmlrpc/namespaces/extensions');
foreach ($namespaces as $namespaceName => $namespaceUri) {
Expand Down
2 changes: 1 addition & 1 deletion src/Value/Collection.php
Expand Up @@ -56,7 +56,7 @@ public function __construct($value)
/**
* Return the value of this object, convert the XML-RPC native collection values into a PHP array
*
* @return arary
* @return array
*/
public function getValue()
{
Expand Down
5 changes: 5 additions & 0 deletions test/ValueTest.php
Expand Up @@ -424,6 +424,11 @@ public function testArrayMustContainDataElement(Generator $generator)
*/
public function testMarshalNilInStructWrappedInArray(Generator $generator)
{
if (version_compare(phpversion(), '5.4', '>=')) {
// SimpleXMLElement don't understand NIL
$this->markTestIncomplete('Code to test is not compatible with PHP 5.4');
}

Value::setGenerator($generator);
$expected = array(array('id' => '1', 'name' => 'vertebra, caudal', 'description' => null));
$xml = '<value>'
Expand Down

0 comments on commit fdaf0f2

Please sign in to comment.