JsonEncoderTest.php in Zircon Profile 8.0
Same filename in this branch
Same filename and directory in other branches
Namespace
Drupal\Tests\serialization\Unit\EncoderFile
core/modules/serialization/tests/src/Unit/Encoder/JsonEncoderTest.phpView source
<?php
/**
* @file
* Contains \Drupal\Tests\serialization\Unit\Encoder\JsonEncoderTest.
*/
namespace Drupal\Tests\serialization\Unit\Encoder;
use Drupal\serialization\Encoder\JsonEncoder;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\serialization\Encoder\JsonEncoder
* @group serialization
*/
class JsonEncoderTest extends UnitTestCase {
/**
* Tests the supportsEncoding() method.
*/
public function testSupportsEncoding() {
$encoder = new JsonEncoder();
$this
->assertTrue($encoder
->supportsEncoding('json'));
$this
->assertTrue($encoder
->supportsEncoding('ajax'));
$this
->assertFalse($encoder
->supportsEncoding('xml'));
}
}
Classes
Name | Description |
---|---|
JsonEncoderTest | @coversDefaultClass \Drupal\serialization\Encoder\JsonEncoder @group serialization |