$queue = \Drupal::
queue('update_fetch_tasks'
);
$this->
assertEquals(0,
$queue->
numberOfItems(), 'Queue is empty'
);
update_create_fetch_task($projecta);
$this->
assertEquals(1,
$queue->
numberOfItems(), 'Queue contains one item'
);
update_create_fetch_task($projectb);
$this->
assertEquals(2,
$queue->
numberOfItems(), 'Queue contains two items'
);
// Try to add a project again.
update_create_fetch_task($projecta);
$this->
assertEquals(2,
$queue->
numberOfItems(), 'Queue still contains two items'
);
// Clear storage and try again.
update_storage_clear();
update_create_fetch_task($projecta);
$this->
assertEquals(2,
$queue->
numberOfItems(), 'Queue contains two items'
);
} /**
* Checks language module in core package at admin/reports/updates.
*/
public function testLanguageModuleUpdate() { $this->
setProjectInstalledVersion('8.0.0'
);
// Instead of using refreshUpdateStatus(), set these manually.
$this->
config('update.settings'
)