You are here

public function SettingsFormTest::testValidationCorrectParameters in TMGMT Translator Smartling 8.2

Test Smartling provider plugin form validation with correct parameters.

File

src/Tests/SettingsFormTest.php, line 37

Class

SettingsFormTest
Settings form tests.

Namespace

Drupal\tmgmt_smartling\Tests

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.");
  }
}