protected function LingotekJobManagementTests::createContent in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 4.0.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.0.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.1.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.2.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.3.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.5.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.6.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.7.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
- 3.8.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::createContent()
5 calls to LingotekJobManagementTests::createContent()
- LingotekJobManagementTests::testJobTranslationConfigTab in tests/
src/ Functional/ LingotekJobManagementTests.php - LingotekJobManagementTests::testJobTranslationConfigTabHasOwnFilter in tests/
src/ Functional/ LingotekJobManagementTests.php - LingotekJobManagementTests::testJobTranslationContentTab in tests/
src/ Functional/ LingotekJobManagementTests.php - LingotekJobManagementTests::testJobTranslationContentTabHasOwnFilter in tests/
src/ Functional/ LingotekJobManagementTests.php - LingotekJobManagementTests::testJobTranslationTab in tests/
src/ Functional/ LingotekJobManagementTests.php
File
- tests/
src/ Functional/ LingotekJobManagementTests.php, line 212
Class
- LingotekJobManagementTests
- Tests job management listings.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function createContent() {
// Create a node.
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool';
$edit['body[0][value]'] = 'Llamas are very cool';
$edit['langcode[0][value]'] = 'en';
$edit['field_tags[target_id]'] = implode(',', [
'Camelid',
'Herbivorous',
'Awesome',
]);
$this
->saveAndPublishNodeForm($edit);
$metadata = LingotekContentMetadata::loadByTargetId('taxonomy_term', 1);
$metadata
->setJobId('my-test-job-id-1');
$metadata
->save();
$metadata = LingotekContentMetadata::loadByTargetId('taxonomy_term', 2);
$metadata
->setJobId('my-test-job-id-1');
$metadata
->save();
$metadata = LingotekContentMetadata::loadByTargetId('taxonomy_term', 3);
$metadata
->setJobId('my-test-job-id-2');
$metadata
->save();
$metadata = LingotekContentMetadata::loadByTargetId('node', 1);
$metadata
->setJobId('my-test-job-id-1');
$metadata
->save();
$metadata = LingotekConfigMetadata::loadByConfigName('system.site');
$metadata
->setJobId('my-test-job-id-1');
$metadata
->save();
}