You are here

public function DataDefinitionFetcherTest::testFetchingField in Typed Data API enhancements 8

@covers ::fetchDefinitionByPropertyPath

File

tests/src/Kernel/DataDefinitionFetcherTest.php, line 197

Class

DataDefinitionFetcherTest
Tests that data fetcher definition fetching functions work correctly.

Namespace

Drupal\Tests\typed_data\Kernel

Code

public function testFetchingField() {
  $target_definition = $this->nodeDefinition
    ->getPropertyDefinition('field_integer');
  $fetched_definition = $this->dataFetcher
    ->fetchDefinitionByPropertyPath($this->nodeDefinition, 'field_integer');
  $this
    ->assertSame($target_definition, $fetched_definition);
}