public function LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 4.0.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.0.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.1.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.2.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.3.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.4.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.5.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.7.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
- 3.8.x tests/src/Functional/LingotekContentEntityGetProfileHookTest.php \Drupal\Tests\lingotek\Functional\LingotekContentEntityGetProfileHookTest::testGetProfileWithoutParentProfile()
Tests that a profile can be overridden before uploading.
File
- tests/
src/ Functional/ LingotekContentEntityGetProfileHookTest.php, line 177
Class
- LingotekContentEntityGetProfileHookTest
- Tests the hooks for getting content entity associated profile.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testGetProfileWithoutParentProfile() {
// Create a node with group 1 profile.
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool';
$edit['body[0][value]'] = 'Llamas are very cool';
$edit['langcode[0][value]'] = 'en';
$this
->saveAndPublishNodeForm($edit);
// Save a comment.
$edit = [];
$edit['subject[0][value]'] = 'First test';
$edit['comment_body[0][value]'] = 'First test body';
$this
->drupalPostForm(NULL, $edit, 'Save');
$this
->saveLingotekContentTranslationSettings([
'node' => [
'article' => [
'profiles' => 'manual',
'fields' => [
'title' => 1,
'body' => 1,
],
],
],
'comment' => [
'comment' => [
'profiles' => 'manual',
'fields' => [
'comment_body' => 1,
],
],
],
]);
$this
->goToContentBulkManagementForm('comment');
$this
->drupalGet('node/1');
// Save another comment.
$edit = [];
$edit['subject[0][value]'] = 'Second test';
$edit['comment_body[0][value]'] = 'Second test body';
$this
->drupalPostForm(NULL, $edit, 'Save');
$this
->goToContentBulkManagementForm('comment');
}