public function XmlEncoderTest::testEncode in Drupal 9
Same name and namespace in other branches
- 8 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 61
Class
- XmlEncoderTest
- @coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder @group serialization
Namespace
Drupal\Tests\serialization\Unit\EncoderCode
public function testEncode() {
$this->baseEncoder
->expects($this
->once())
->method('encode')
->with($this->testArray, 'test', [])
->will($this
->returnValue('test'));
$this
->assertEquals('test', $this->encoder
->encode($this->testArray, 'test'));
}