You are here

public function SchedulerStatusReportTest::testStatusReport in Scheduler 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/SchedulerStatusReportTest.php \Drupal\Tests\scheduler\Functional\SchedulerStatusReportTest::testStatusReport()

Tests that the Scheduler Time Check report is shown.

File

tests/src/Functional/SchedulerStatusReportTest.php, line 17

Class

SchedulerStatusReportTest
Tests the Scheduler section of the status report.

Namespace

Drupal\Tests\scheduler\Functional

Code

public function testStatusReport() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('admin/reports/status');
  $this
    ->assertSession()
    ->pageTextContains('Scheduler Time Check');
  $this
    ->assertSession()
    ->pageTextContains('In most cases the server time should match Coordinated Universal Time (UTC) / Greenwich Mean Time (GMT)');
  $admin_regional_settings = Url::fromRoute('system.regional_settings');
  $this
    ->assertSession()
    ->linkExists('changed by admin users');
  $this
    ->assertSession()
    ->linkByHrefExists($admin_regional_settings
    ->toString());
  $account_edit = Url::fromRoute('entity.user.edit_form', [
    'user' => $this->adminUser
      ->id(),
  ]);
  $this
    ->assertSession()
    ->linkExists('user account');
  $this
    ->assertSession()
    ->linkByHrefExists($account_edit
    ->toString());
}