You are here

public function EntityFieldManagerTest::testGetFieldDefinitions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityFieldManagerTest::testGetFieldDefinitions()

Tests the getFieldDefinitions() method.

@covers ::getFieldDefinitions @covers ::buildBundleFieldDefinitions

File

core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php, line 238
Contains \Drupal\Tests\Core\Entity\EntityFieldManagerTest.

Class

EntityFieldManagerTest
@coversDefaultClass \Drupal\Core\Entity\EntityFieldManager @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetFieldDefinitions() {
  $field_definition = $this
    ->setUpEntityWithFieldDefinition();
  $expected = [
    'id' => $field_definition,
  ];
  $this
    ->assertSame($expected, $this->entityFieldManager
    ->getFieldDefinitions('test_entity_type', 'test_entity_bundle'));
}