function XmlEncoderTest::testSupportsEncoding

Tests the supportsEncoding() method.

File

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

Class

XmlEncoderTest
Tests Drupal\serialization\Encoder\XmlEncoder.

Namespace

Drupal\Tests\serialization\Unit\Encoder

Code

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

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