public function DefaultFieldComparatorTest::testEntityReferenceFieldProperties in Changed Fields API 8.3
Default field comparator: entity_reference field's property(s).
File
- tests/
src/ Unit/ DefaultFieldComparatorTest.php, line 256
Class
- DefaultFieldComparatorTest
- @coversDefaultClass \Drupal\changed_fields\Plugin\FieldComparator\DefaultFieldComparator
Namespace
Drupal\Tests\changed_fields\UnitCode
public function testEntityReferenceFieldProperties() {
$this->fieldDefinitionMock
->expects($this
->once())
->method('getType')
->willReturn('entity_reference');
$properties = $this
->invokeMethod($this->fieldComparator, 'getComparableProperties', [
$this->fieldDefinitionMock,
]);
$this
->assertArrayEquals([
'target_id',
], $properties);
}