function PrimitiveDataNormalizerTest::testSupportsNormalizationFail

Same name in other branches
  1. 9 core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\PrimitiveDataNormalizerTest::testSupportsNormalizationFail()
  2. 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\PrimitiveDataNormalizerTest::testSupportsNormalizationFail()
  3. 10 core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\PrimitiveDataNormalizerTest::testSupportsNormalizationFail()

@covers ::supportsNormalization

File

core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php, line 47

Class

PrimitiveDataNormalizerTest
@coversDefaultClass \Drupal\serialization\Normalizer\PrimitiveDataNormalizer @group serialization

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testSupportsNormalizationFail() : void {
    // Test that an object not implementing PrimitiveInterface 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.