scheduler-8.x-1.x-dev/tests/src/Functional/SchedulerStatusReportTest.php

tests/src/Functional/SchedulerStatusReportTest.php
<?php

namespace Drupal\Tests\scheduler\Functional;

use Drupal\Core\Url;
use PHPUnit\Framework\Attributes\Group;

/**
 * Tests the Scheduler section of the status report.
 *
 * @group scheduler
 */
#[Group('scheduler')]
class SchedulerStatusReportTest extends SchedulerBrowserTestBase {

  /**
   * Tests that the Scheduler Time Check report is shown.
   */
  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());
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc