function NullNormalizerTest::testSupportsNormalization
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\NullNormalizerTest::testSupportsNormalization()
- 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\NullNormalizerTest::testSupportsNormalization()
- 11.x core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\NullNormalizerTest::testSupportsNormalization()
@covers ::__construct @covers ::supportsNormalization
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ NullNormalizerTest.php, line 43
Class
- NullNormalizerTest
- @coversDefaultClass \Drupal\serialization\Normalizer\NullNormalizer @group serialization
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public function testSupportsNormalization() : void {
$mock = $this->createMock('Drupal\\Core\\TypedData\\TypedDataInterface');
$this->assertTrue($this->normalizer
->supportsNormalization($mock));
// Also test that an object not implementing TypedDataInterface fails.
$this->assertFalse($this->normalizer
->supportsNormalization(new \stdClass()));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.