Add a link to the status report from the database update results
Closes #3508449
Merge request reports
Activity
811 811 $this->assertSession()->pageTextContains('Updates were attempted.'); 812 812 $this->assertSession()->linkExists('logged'); 813 813 $this->assertSession()->linkExists('Administration pages'); 814 $this->assertSession()->linkExists('Status report'); 814 815 $this->assertSession()->elementNotExists('xpath', '//main//a[contains(@href, "update.php")]'); 815 $this->clickLink('Administration pages'); 816 $this->clickLink('Status report'); - Comment on lines -815 to +816
There are already checks of the "Administration pages" link destination in this file. The idea here is to get one test for "Status report" without slowing down this test unnecessarily.
Edited by cilefen
710 710 'url' => Url::fromRoute('system.admin')->setOption('base_url', $base_url), 711 711 ]; 712 712 } 713 if ($this->account->hasPermission('administer site configuration')) { 714 $links['status-report'] = [ 715 'title' => $this->t('Status report'), 716 'url' => Url::fromRoute('system.status')->setOption('base_url', $base_url), 717 ]; 718 } - Comment on lines +713 to +718
This could probably be rewritten to use
Url::access
713 if ($this->account->hasPermission('administer site configuration')) { 714 $links['status-report'] = [ 715 'title' => $this->t('Status report'), 716 'url' => Url::fromRoute('system.status')->setOption('base_url', $base_url), 717 ]; 718 } 713 $url = Url::fromRoute('system.status')->setOption('base_url', $base_url); 714 if ($url->access($this->account)) { 715 $links['status-report'] = [ 716 'title' => $this->t('Status report'), 717 'url' => $url, 718 ]; 719 } However I can see that $this->user->hasPermission was already used above for other links, so suggest addressing these both in a follow up issue.
Please register or sign in to reply