function XmlEncoderTest::testEncode
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testEncode()
- 8.9.x core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testEncode()
- 11.x core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testEncode()
Tests the encode() method.
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Encoder/ XmlEncoderTest.php, line 68
Class
- XmlEncoderTest
- @coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder @group serialization
Namespace
Drupal\Tests\serialization\Unit\EncoderCode
public function testEncode() : void {
$this->baseEncoder
->expects($this->once())
->method('encode')
->with($this->testArray, 'test', [])
->willReturn('test');
$this->assertEquals('test', $this->encoder
->encode($this->testArray, 'test'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.