You are here

public function ContentEntityNormalizerTest::testSupportsNormalization in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\ContentEntityNormalizerTest::testSupportsNormalization()
  2. 10 core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\ContentEntityNormalizerTest::testSupportsNormalization()

@covers ::supportsNormalization

File

core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php, line 54

Class

ContentEntityNormalizerTest
@coversDefaultClass \Drupal\serialization\Normalizer\ContentEntityNormalizer @group serialization

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testSupportsNormalization() {
  $content_mock = $this
    ->createMock('Drupal\\Core\\Entity\\ContentEntityInterface');
  $config_mock = $this
    ->createMock('Drupal\\Core\\Config\\Entity\\ConfigEntityInterface');
  $this
    ->assertTrue($this->contentEntityNormalizer
    ->supportsNormalization($content_mock));
  $this
    ->assertFalse($this->contentEntityNormalizer
    ->supportsNormalization($config_mock));
}