/**
* @covers ::onChange
*/
public function testOnChange() { $entity =
$this->
createMock('\Drupal\Core\Entity\ContentEntityInterface'
);
$entity->
expects($this->
once()) ->
method('onChange'
) ->
with('foo'
) ->
willReturn(NULL
);
$this->entityAdapter->
setValue($entity);
$this->entityAdapter->
onChange('foo'
);
} /**
* @covers ::getDataDefinition
*/
public function testGetDataDefinition() { $definition =
$this->entityAdapter->
getDataDefinition();
$this->
assertInstanceOf('\Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface',
$definition);
$this->
assertEquals($definition->
getEntityTypeId(),
$this->entityTypeId
);
$this->
assertEquals($definition->
getBundles(),
[$this->bundle
]);
}