You are here

public function SettingsFormTest::testValidationCorrectParameters in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/SettingsFormTest.php \Drupal\Tests\tmgmt_smartling\Functional\SettingsFormTest::testValidationCorrectParameters()

Test Smartling provider plugin form validation with correct parameters.

File

tests/src/Functional/SettingsFormTest.php, line 37

Class

SettingsFormTest
Settings form tests.

Namespace

Drupal\Tests\tmgmt_smartling\Functional

Code

public function testValidationCorrectParameters() {
  if (!empty($this->smartlingPluginProviderSettings)) {

    // Validation with correct parameters.
    $translator = $this
      ->setUpSmartlingProviderSettings($this->smartlingPluginProviderSettings);
    $supported_remote_languages = $translator
      ->getPlugin()
      ->getSupportedRemoteLanguages($translator);
    $this
      ->assertNotEqual(0, count($supported_remote_languages));
  }
  else {
    $this
      ->fail("Smartling settings file for simpletests not found.");
  }
}