public function JobsTest::testCreateJobEmptyNameValidation in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/JobsTest.php \Drupal\Tests\tmgmt_smartling\Functional\JobsTest::testCreateJobEmptyNameValidation()
Create job form: empty name validation.
File
- tests/
src/ Functional/ JobsTest.php, line 212
Class
- JobsTest
- Jobs tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testCreateJobEmptyNameValidation() {
if (!empty($this->smartlingPluginProviderSettings)) {
$this
->drupalPostForm('/admin/tmgmt/sources', [
'items[1]' => 1,
], t('Request translation'));
$this
->drupalPostForm(NULL, [
'target_language' => 'de',
'settings[create_new_job_tab][name]' => '',
'settings[create_new_job_tab][due_date][date]' => '2020-12-12',
'settings[create_new_job_tab][due_date][time]' => '12:12',
'settings[create_new_job_tab][authorize]' => TRUE,
'settings[smartling_users_time_zone]' => 'Europe/Kiev',
], t('Submit to provider'));
$this
->assertText(t('Job Name field is required.'));
}
else {
$this
->fail("Smartling settings file for simpletests not found.");
}
}