You are here

public function ContentEntityNormalizerTest::testSupportsNormalization in Acquia Content Hub 8

Test the supportsNormalization method.

@covers ::supportsNormalization

File

tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php, line 197

Class

ContentEntityNormalizerTest
PHPUnit test for the ContentEntityNormalizer class.

Namespace

Drupal\Tests\acquia_contenthub\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));
}