You are here

public function ContentEntityNormalizerTest::testSupportsNormalization in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 56
Contains \Drupal\Tests\serialization\Unit\Normalizer\ContentEntityNormalizerTest.

Class

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

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

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