diff --git a/src/Tests/Form/LingotekNodeBulkFormTest.php b/src/Tests/Form/LingotekNodeBulkFormTest.php index f4f30fb..88b8cb6 100644 --- a/src/Tests/Form/LingotekNodeBulkFormTest.php +++ b/src/Tests/Form/LingotekNodeBulkFormTest.php @@ -5,27 +5,29 @@ namespace Drupal\lingotek\Tests\Form; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\language\Entity\ContentLanguageSettings; use Drupal\lingotek\Tests\LingotekTestBase; -use Drupal\node\NodeInterface; /** - * Tests translating a node using the bulk management form. + * Tests the bulk management form. * * @group lingotek */ class LingotekNodeBulkFormTest extends LingotekTestBase { /** - * Modules to install. - * - * @var array + * {@inheritdoc} */ public static $modules = ['block', 'node']; /** - * @var NodeInterface + * A node used for testing. + * + * @var \Drupal\node\NodeInterface */ protected $node; + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); @@ -68,7 +70,7 @@ class LingotekNodeBulkFormTest extends LingotekTestBase { // Create a node. for ($i = 1; $i < 15; $i++) { $edit = array(); - $edit['title[0][value]'] = 'Llamas are cool ' . $i ; + $edit['title[0][value]'] = 'Llamas are cool ' . $i; $edit['body[0][value]'] = 'Llamas are very cool ' . $i; $edit['langcode[0][value]'] = 'en'; $edit['lingotek_translation_profile'] = 'manual'; @@ -85,10 +87,10 @@ class LingotekNodeBulkFormTest extends LingotekTestBase { $basepath = \Drupal::request()->getBasePath(); // I can init the upload of content. - $this->assertLinkByHref($basepath . '/admin/lingotek/entity/upload/node/11?destination=' . $basepath .'/admin/lingotek/manage/node'); + $this->assertLinkByHref($basepath . '/admin/lingotek/entity/upload/node/11?destination=' . $basepath . '/admin/lingotek/manage/node'); $edit = [ - 'table[11]' => TRUE, // Node 11. - 'table[12]' => TRUE, // Node 12. + 'table[11]' => TRUE, // Node 11. + 'table[12]' => TRUE, // Node 12. 'operation' => 'upload' ]; $this->drupalPostForm(NULL, $edit, t('Execute')); @@ -97,9 +99,9 @@ class LingotekNodeBulkFormTest extends LingotekTestBase { $this->assertUrl('admin/lingotek/manage/node?page=1'); // There is a link for checking status. - $this->assertLinkByHref($basepath . '/admin/lingotek/entity/check_upload/dummy-document-hash-id?destination=' . $basepath .'/admin/lingotek/manage/node'); + $this->assertLinkByHref($basepath . '/admin/lingotek/entity/check_upload/dummy-document-hash-id?destination=' . $basepath . '/admin/lingotek/manage/node'); // And we can already request a translation. - $this->assertLinkByHref($basepath . '/admin/lingotek/entity/add_target/dummy-document-hash-id/es_MX?destination=' . $basepath .'/admin/lingotek/manage/node'); + $this->assertLinkByHref($basepath . '/admin/lingotek/entity/add_target/dummy-document-hash-id/es_MX?destination=' . $basepath . '/admin/lingotek/manage/node'); $this->clickLink('EN'); $this->assertText('The import for node Llamas are cool 11 is complete.'); @@ -123,7 +125,7 @@ class LingotekNodeBulkFormTest extends LingotekTestBase { } $edit = array(); - $edit['title[0][value]'] = 'Llamas are cool ' . $i ; + $edit['title[0][value]'] = 'Llamas are cool ' . $i; $edit['body[0][value]'] = 'Llamas are very cool ' . $i; $edit['langcode[0][value]'] = 'en'; $edit['lingotek_translation_profile'] = $profile;