You are here

public function OverriddenEntityClassTest::testClassOverride in Apigee Edge 8

Tests class overriding.

File

tests/src/Functional/OverriddenEntityClassTest.php, line 32

Class

OverriddenEntityClassTest
Tests entity class overriding for the Edge entity types.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

public function testClassOverride() {

  /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $manager */
  $manager = $this->container
    ->get('entity_type.manager');
  foreach (_apigee_edge_test_entity_class_mapping() as $entity_type => $entity_class) {
    $entity = $manager
      ->getStorage($entity_type)
      ->create();
    $this
      ->assertInstanceOf($entity_class, $entity);
  }
}