Issue #2597860 by neclimdul: UpdateRegistryTest tests missing assertions
parent
ff04d6a67d
commit
88f80206ec
|
@ -236,8 +236,12 @@ EOS;
|
||||||
public function testRegisterInvokedUpdatesWithoutExistingUpdates() {
|
public function testRegisterInvokedUpdatesWithoutExistingUpdates() {
|
||||||
$this->setupBasicModules();
|
$this->setupBasicModules();
|
||||||
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
||||||
$key_value->get('existing_updates', [])->willReturn([]);
|
$key_value->get('existing_updates', [])
|
||||||
$key_value->set('existing_updates', ['module_a_post_update_a'])->willReturn(NULL);
|
->willReturn([])
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
|
$key_value->set('existing_updates', ['module_a_post_update_a'])
|
||||||
|
->willReturn(NULL)
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
$key_value = $key_value->reveal();
|
$key_value = $key_value->reveal();
|
||||||
|
|
||||||
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
||||||
|
@ -253,8 +257,12 @@ EOS;
|
||||||
public function testRegisterInvokedUpdatesWithMultiple() {
|
public function testRegisterInvokedUpdatesWithMultiple() {
|
||||||
$this->setupBasicModules();
|
$this->setupBasicModules();
|
||||||
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
||||||
$key_value->get('existing_updates', [])->willReturn([]);
|
$key_value->get('existing_updates', [])
|
||||||
$key_value->set('existing_updates', ['module_a_post_update_a', 'module_a_post_update_b'])->willReturn(NULL);
|
->willReturn([])
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
|
$key_value->set('existing_updates', ['module_a_post_update_a', 'module_a_post_update_b'])
|
||||||
|
->willReturn(NULL)
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
$key_value = $key_value->reveal();
|
$key_value = $key_value->reveal();
|
||||||
|
|
||||||
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
||||||
|
@ -270,8 +278,12 @@ EOS;
|
||||||
public function testRegisterInvokedUpdatesWithExistingUpdates() {
|
public function testRegisterInvokedUpdatesWithExistingUpdates() {
|
||||||
$this->setupBasicModules();
|
$this->setupBasicModules();
|
||||||
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
||||||
$key_value->get('existing_updates', [])->willReturn(['module_a_post_update_b']);
|
$key_value->get('existing_updates', [])
|
||||||
$key_value->set('existing_updates', ['module_a_post_update_b', 'module_a_post_update_a'])->willReturn(NULL);
|
->willReturn(['module_a_post_update_b'])
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
|
$key_value->set('existing_updates', ['module_a_post_update_b', 'module_a_post_update_a'])
|
||||||
|
->willReturn(NULL)
|
||||||
|
->shouldBeCalledTimes(1);
|
||||||
$key_value = $key_value->reveal();
|
$key_value = $key_value->reveal();
|
||||||
|
|
||||||
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
||||||
|
@ -287,8 +299,12 @@ EOS;
|
||||||
public function testFilterOutInvokedUpdatesByModule() {
|
public function testFilterOutInvokedUpdatesByModule() {
|
||||||
$this->setupBasicModules();
|
$this->setupBasicModules();
|
||||||
$key_value = $this->prophesize(KeyValueStoreInterface::class);
|
$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']);
|
$key_value->get('existing_updates', [])
|
||||||
$key_value->set('existing_updates', ['module_b_post_update_a'])->willReturn(NULL);
|
->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();
|
$key_value = $key_value->reveal();
|
||||||
|
|
||||||
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
$update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [
|
||||||
|
|
Loading…
Reference in New Issue