public function testCalculateDependenciesWithThirdPartySettings() { $this->entity =
$this->
getMockForAbstractClass('\Drupal\Core\Config\Entity\ConfigEntityBase',
[[],
$this->entityTypeId
]);
$this->entity->
setThirdPartySetting('test_provider', 'test', 'test'
);
$this->entity->
setThirdPartySetting('test_provider2', 'test', 'test'
);
$this->entity->
setThirdPartySetting($this->provider, 'test', 'test'
);
$this->
assertEquals(['test_provider', 'test_provider2'
],
$this->entity->
calculateDependencies()->
getDependencies()['module'
]);
$changed =
$this->entity->
onDependencyRemoval(['module' =>
['test_provider2'
]]);
$this->
assertTrue($changed, 'Calling onDependencyRemoval with an existing third party dependency provider returns TRUE.'
);
$changed =
$this->entity->
onDependencyRemoval(['module' =>
['test_provider3'
]]);
$this->
assertFalse($changed, 'Calling onDependencyRemoval with a non-existing third party dependency provider returns FALSE.'
);
$this->
assertEquals(['test_provider'
],
$this->entity->
calculateDependencies()->
getDependencies()['module'
]);
} /**
* @covers ::__sleep
*/
public function testSleepWithPluginCollections() { $instance_id = 'the_instance_id';