wordpress-develop/tests/phpunit/tests/xmlrpc/message.php
Sergey Biryukov d790be16dc Coding Standards: Remove superfluous blank lines at the end of various classes.
Note: This is enforced by WPCS 3.0.0.

Follow-up to [56536].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56547 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-08 09:30:38 +00:00

34 lines
1.0 KiB
PHP

<?php
/**
* Unit tests covering IXR_Message functionality.
*
* @package WordPress
* @subpackage IXR
*/
/**
* Test wp-includes/IXR/class-IXR-message.php
*
* @group xmlrpc
*/
class Tests_XMLRPC_Message extends WP_UnitTestCase {
/**
* Tests that `IXR_Message::tag_open()` does not create a dynamic `currentTag` property,
* and uses the declared `_currentTag` property instead.
*
* The notice that we should not see:
* `Deprecated: Creation of dynamic property IXR_Message::$currentTag is deprecated`.
*
* @ticket 56033
*
* @covers IXR_Message::tag_open
*/
public function test_tag_open_does_not_create_dynamic_property() {
$message = new IXR_Message( '<methodResponse><params><param><value>1</value></param></params></methodResponse>' );
$this->assertTrue( $message->parse() );
$this->assertSame( 'methodResponse', $message->messageType ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$this->assertSame( array( '1' ), $message->params );
}
}