You are here

public function XmlEncoderTest::testSupportsEncoding in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest::testSupportsEncoding()

Tests the supportsEncoding() method.

File

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

Class

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

Namespace

Drupal\Tests\serialization\Unit\Encoder

Code

public function testSupportsEncoding() {
  $this
    ->assertTrue($this->encoder
    ->supportsEncoding('xml'));
  $this
    ->assertFalse($this->encoder
    ->supportsEncoding('json'));
}