You are here

public function LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  2. 3.0.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  3. 3.1.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  4. 3.2.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  5. 3.3.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  6. 3.4.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  7. 3.5.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  8. 3.6.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  9. 3.7.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()
  10. 3.8.x tests/src/Functional/LingotekSystemSiteBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkDebugTest::testDebugOptionsDisplay()

Tests that a config can be exported using the debug options on the management page.

File

tests/src/Functional/LingotekSystemSiteBulkDebugTest.php, line 36

Class

LingotekSystemSiteBulkDebugTest
Tests debugging a config object using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDebugOptionsDisplay() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Go to the bulk config management page.
  $this
    ->goToConfigBulkManagementForm();

  // There is no 'debug' option group.
  $this
    ->assertEmpty($this
    ->xpath('//select[@id=:id]//optgroup[@label=:label]', [
    ':id' => 'edit-operation',
    ':label' => 'debug',
  ]), 'There is no debug group.');

  // Enable the debug operations.
  $this
    ->drupalGet('admin/lingotek/settings');
  $this
    ->drupalPostForm(NULL, [], t('Enable debug operations'));

  // Go to the bulk config management page.
  $this
    ->goToConfigBulkManagementForm();

  // There should be a 'debug' option group with the right operation.
  $this
    ->assertNotEmpty($this
    ->xpath('//select[@id=:id]//optgroup[@label=:label]', [
    ':id' => 'edit-operation',
    ':label' => 'debug',
  ]), 'There is a debug group.');
  $this
    ->assertNotEmpty($this
    ->xpath('//select[@id=:id]//option[@value=:value]', [
    ':id' => 'edit-operation',
    ':value' => 'debug.export',
  ]), 'There is a debug export option.');
}