You are here

public function LingotekSettingsTabUtilitiesFormTest::testFormDebugUtilityWithDebugEnabled in Lingotek Translation 8

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

@covers ::buildForm

File

tests/src/Unit/Form/LingotekSettingsTabUtilitiesFormTest.php, line 87

Class

LingotekSettingsTabUtilitiesFormTest
@coversDefaultClass \Drupal\lingotek\Form\LingotekSettingsTabUtilitiesForm @group lingotek @preserveGlobalState disabled

Namespace

Drupal\Tests\lingotek\Unit\Form

Code

public function testFormDebugUtilityWithDebugEnabled() {
  $this->state
    ->expects($this
    ->any())
    ->method('get')
    ->with('lingotek.enable_debug_utilities')
    ->will($this
    ->returnValue(TRUE));
  $build = [];
  $form_state = $this
    ->getMock('Drupal\\Core\\Form\\FormStateInterface');
  $build = $this->form
    ->buildForm($build, $form_state);
  $this
    ->assertSame($build['utilities']['lingotek_table']['enable_debug_utilities']['actions']['submit']['#value']
    ->getUntranslatedString(), 'Disable debug operations');
}