function XmlEncoderTest::testDecode

Same name in other branches
  1. 9 core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testDecode()
  2. 10 core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testDecode()
  3. 11.x core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testDecode()

Tests the decode() method.

File

core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php, line 73

Class

XmlEncoderTest
@coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder @group serialization

Namespace

Drupal\Tests\serialization\Unit\Encoder

Code

public function testDecode() {
    $this->baseEncoder
        ->expects($this->once())
        ->method('decode')
        ->with('test', 'test', [])
        ->will($this->returnValue($this->testArray));
    $this->assertEquals($this->testArray, $this->encoder
        ->decode('test', 'test'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.