public function DataDefinitionFetcherTest::testFetchingByBasicSubPath in Typed Data API enhancements 8
@covers ::fetchDefinitionBySubPaths
File
- tests/src/ Kernel/ DataDefinitionFetcherTest.php, line 105 
Class
- DataDefinitionFetcherTest
- Tests that data fetcher definition fetching functions work correctly.
Namespace
Drupal\Tests\typed_data\KernelCode
public function testFetchingByBasicSubPath() {
  $target_definition = $this->nodeDefinition
    ->getPropertyDefinition('title')
    ->getItemDefinition()
    ->getPropertyDefinition('value');
  $fetched_definition = $this->dataFetcher
    ->fetchDefinitionBySubPaths($this->nodeDefinition, [
    'title',
    '0',
    'value',
  ]);
  $this
    ->assertSame($target_definition, $fetched_definition);
}