You are here

public function CleanerTest::testCleanerConfigPage in Cleaner 8

Test Cleaner config page.

File

src/Tests/CleanerTest.php, line 43

Class

CleanerTest
Class CleanerTest.

Namespace

Drupal\cleaner\Tests

Code

public function testCleanerConfigPage() {
  $this
    ->drupalLogin($this
    ->drupalCreateUser([], NULL, TRUE));
  $this
    ->drupalGet('admin/config/system/cleaner');
  $this
    ->assertResponse(200);

  // Ensure all fields exists and has a default values.
  foreach (self::$cleanerConfigs as $name => $value) {
    $message = "{$name} setting exist and has a correct initial value";
    $this
      ->assertFieldByName($name, $value, $message);
  }
}