You are here

public function XmlEncoderTest::testEncode in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\XmlEncoderTest::testEncode()
  2. 8 core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testEncode()
Same name and namespace in other branches
  1. 8.0 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 63
Contains \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest.

Class

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

Namespace

Drupal\Tests\serialization\Unit\Encoder

Code

public function testEncode() {
  $this->baseEncoder
    ->expects($this
    ->once())
    ->method('encode')
    ->with($this->testArray, 'test', array())
    ->will($this
    ->returnValue('test'));
  $this
    ->assertEquals('test', $this->encoder
    ->encode($this->testArray, 'test'));
}