You are here

public function AnonymousPublishingAdminSettingsTest::testAnonymousPublishingSettings in Anonymous Publishing 8

File

modules/anonymous_publishing_cl/src/Tests/AnonymousPublishingAdminSettingsTest.php, line 62

Class

AnonymousPublishingAdminSettingsTest
Overall testing.

Namespace

Drupal\anonymous_publishing_cl\Tests

Code

public function testAnonymousPublishingSettings() {

  // Open admin UI.
  $this
    ->drupalGet('/admin/config/people/anonymous_publishing_cl');

  // ----------------------------------------------------------------------
  // 1) Check the default settings value.
  $this
    ->assertFieldChecked('edit-allowed-content-types-article', 'Anonymous Posting for article page is activated.');
  $this
    ->assertFieldChecked('edit-allowed-content-types-comment', 'Anonymous Posting for comments is activated.');
  $this
    ->assertFieldChecked('edit-general-options-sactivate', 'Allow self-activation option is activated.');
  $this
    ->assertNoFieldChecked('edit-general-options-sactstick', 'Allow self-activation sticky option is disabled.');
  $this
    ->assertFieldById('edit-flood-limit', '-1', 'Flood limit is set to -1');
}