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
This commit is contained in:
Dominik Schilling 2016-07-05 21:58:41 +00:00
parent eb176b40b8
commit 8a1fad3178
1 changed files with 14 additions and 1 deletions

View File

@ -93,4 +93,17 @@ class Tests_XMLRPC_Basic extends WP_XMLRPC_UnitTestCase {
$this->assertArrayHasKey( 'faultCode', $result[2] );
}
}
/**
* @ticket 36586
*/
function test_isStruct_on_non_numerically_indexed_array() {
$value = new IXR_Value( array( '0.0' => 100 ) );
$return = "<struct>\n";
$return .= " <member><name>0.0</name><value><int>100</int></value></member>\n";
$return .= "</struct>";
$this->assertXmlStringEqualsXmlString( $return, $value->getXML() );
}
}