public function ContentEntityNormalizerTest::testNormalizeIncompatibleClass in Acquia Content Hub 8
Tests the normalize() method.
Tests to see if it errors on the wrong object.
@covers ::normalize
File
- tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerTest.php, line 226
Class
- ContentEntityNormalizerTest
- PHPUnit test for the ContentEntityNormalizer class.
Namespace
Drupal\Tests\acquia_contenthub\Unit\NormalizerCode
public function testNormalizeIncompatibleClass() {
// Create a config entity class.
$config_mock = $this
->createMock('Drupal\\Core\\Config\\Entity\\ConfigEntityInterface');
// Normalize the Config Entity with the class that we are testing.
$normalized = $this->contentEntityNormalizer
->normalize($config_mock, 'acquia_contenthub_cdf');
// Make sure it didn't do anything.
$this
->assertNull($normalized);
}