function EntityFieldManagerTest::testGetBaseFieldDefinitions

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityFieldManagerTest::testGetBaseFieldDefinitions()
  2. 9 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityFieldManagerTest::testGetBaseFieldDefinitions()
  3. 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityFieldManagerTest::testGetBaseFieldDefinitions()

Tests the getBaseFieldDefinitions() method.

@legacy-covers ::getBaseFieldDefinitions @legacy-covers ::buildBaseFieldDefinitions

File

core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php, line 230

Class

EntityFieldManagerTest
Tests Drupal\Core\Entity\EntityFieldManager.

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetBaseFieldDefinitions() : void {
  $field_definition = $this->setUpEntityWithFieldDefinition();
  $expected = [
    'id' => $field_definition,
  ];
  $this->assertSame($expected, $this->entityFieldManager
    ->getBaseFieldDefinitions('test_entity_type'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.