function UpdateRegistryTest::testFilterOutInvokedUpdatesByModule
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php \Drupal\Tests\Core\Update\UpdateRegistryTest::testFilterOutInvokedUpdatesByModule()
@covers ::filterOutInvokedUpdatesByModule
@group legacy
File
-
core/
tests/ Drupal/ Tests/ Core/ Update/ UpdateRegistryTest.php, line 455
Class
- UpdateRegistryTest
- @coversDefaultClass \Drupal\Core\Update\UpdateRegistry[[api-linebreak]] @group Update
Namespace
Drupal\Tests\Core\UpdateCode
public function testFilterOutInvokedUpdatesByModule() {
$this->expectDeprecation('Drupal\\Core\\Update\\UpdateRegistry\\filterOutInvokedUpdatesByModule() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Update\\UpdateRegistry::filterOutInvokedUpdatesByExtension() instead. See https://www.drupal.org/node/3260162');
$this->setupBasicExtensions();
$key_value = $this->prophesize(KeyValueStoreInterface::class);
$key_value->get('existing_updates', [])
->willReturn([
'module_a_post_update_b',
'module_a_post_update_a',
'module_b_post_update_a',
])
->shouldBeCalledTimes(1);
$key_value->set('existing_updates', [
'module_b_post_update_a',
])
->willReturn(NULL)
->shouldBeCalledTimes(1);
$key_value = $key_value->reveal();
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
'module_a',
'module_b',
], $key_value, FALSE);
$update_registry->filterOutInvokedUpdatesByModule('module_a');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.