wp.getUsersBlogs' . 'someuser' . 'verysecretpassword'; $method = XmlRpcMethod::parse($payload); $this->assertEquals('wp.getUsersBlogs', $method->name); $this->assertEquals(['someuser', 'verysecretpassword'], $method->params); } public function testShouldNotExpandEntities(): void { $payload = <<<'XML' ]> &xxx; XML; $method = XmlRpcMethod::parse($payload); $this->assertNull($method); } public function testInvalidXMLShouldThrowRuntimeException(): void { $payload = 'some content'; $this->expectException(\RuntimeException::class); XmlRpcMethod::parse($payload); } }