You are here

public function DataFetcherTest::testFetchingNonExistingEntityReference in Typed Data API enhancements 8

@covers ::fetchDataByPropertyPath

File

tests/src/Kernel/DataFetcherTest.php, line 166

Class

DataFetcherTest
Class DataFetcherTest.

Namespace

Drupal\Tests\typed_data\Kernel

Code

public function testFetchingNonExistingEntityReference() {
  $fetched_user = $this->dataFetcher
    ->fetchDataByPropertyPath($this->node
    ->getTypedData(), 'uid.0.entity')
    ->getValue();
  $this
    ->assertNull($fetched_user);
}