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