From 8a1fad31787f570846348fe0ef41f010a89839cb Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 5 Jul 2016 21:58:41 +0000 Subject: [PATCH] XML-RPC: Add unit test to verify IXR changes in [37244]. Props aaires. Fixes #36586. git-svn-id: https://develop.svn.wordpress.org/trunk@37980 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/xmlrpc/basic.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/xmlrpc/basic.php b/tests/phpunit/tests/xmlrpc/basic.php index abe9e69eb6..bbbcbd7d5d 100644 --- a/tests/phpunit/tests/xmlrpc/basic.php +++ b/tests/phpunit/tests/xmlrpc/basic.php @@ -93,4 +93,17 @@ class Tests_XMLRPC_Basic extends WP_XMLRPC_UnitTestCase { $this->assertArrayHasKey( 'faultCode', $result[2] ); } -} \ No newline at end of file + + /** + * @ticket 36586 + */ + function test_isStruct_on_non_numerically_indexed_array() { + $value = new IXR_Value( array( '0.0' => 100 ) ); + + $return = "\n"; + $return .= " 0.0100\n"; + $return .= ""; + + $this->assertXmlStringEqualsXmlString( $return, $value->getXML() ); + } +}