diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php index bb4e55e..05f139d 100644 --- a/core/modules/comment/src/Tests/CommentTestBase.php +++ b/core/modules/comment/src/Tests/CommentTestBase.php @@ -82,7 +82,7 @@ protected function setUp() { $this->container->get('comment.manager')->addDefaultField('node', 'article'); // Create a test node authored by the web user. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->id(), 'langcode' => 'en')); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->id())); } /** diff --git a/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php index c4150f3..61fa85e 100644 --- a/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php +++ b/core/modules/contextual/src/Tests/ContextualDynamicContextTest.php @@ -50,9 +50,9 @@ function testDifferentPermissions() { // - An article, which should be user-editable. // - A page, which should not be user-editable. // - A second article, which should also be user-editable. - $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'langcode' => 'en')); - $node2 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1, 'langcode' => 'en')); - $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'langcode' => 'en')); + $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node2 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); + $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); // Now, on the front page, all article nodes should have contextual links // placeholders, as should the view that contains them. diff --git a/core/modules/file/src/Tests/FileFieldRSSContentTest.php b/core/modules/file/src/Tests/FileFieldRSSContentTest.php index 42b88ce..db265c2 100644 --- a/core/modules/file/src/Tests/FileFieldRSSContentTest.php +++ b/core/modules/file/src/Tests/FileFieldRSSContentTest.php @@ -51,7 +51,7 @@ function testFileFieldRSSContent() { // Create a new node with a file field set. Promote to frontpage // needs to be set so this node will appear in the RSS feed. - $node = $this->drupalCreateNode(array('type' => $type_name, 'promote' => 1, 'langcode' => 'en')); + $node = $this->drupalCreateNode(array('type' => $type_name, 'promote' => 1)); $test_file = $this->getTestFile('text'); // Create a new node with the uploaded file. diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index 008d175..e767c2e 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -73,13 +73,15 @@ public function getViewsData() { $data['node_field_data']['sticky']['filter']['type'] = 'yes-no'; $data['node_field_data']['sticky']['sort']['help'] = t('Whether or not the content is sticky. To list sticky content first, set this to descending.'); - $data['node']['translation_link'] = array( - 'title' => t('Translation link'), - 'help' => t('Provide a link to the translations overview for nodes.'), - 'field' => array( - 'id' => 'content_translation_link', - ), - ); + if (\Drupal::moduleHandler()->moduleExists('content_translation')) { + $data['node']['translation_link'] = array( + 'title' => t('Translation link'), + 'help' => t('Provide a link to the translations overview for nodes.'), + 'field' => array( + 'id' => 'content_translation_link', + ), + ); + } $data['node']['view_node'] = array( 'field' => array( diff --git a/core/modules/node/src/Tests/NodeLinksTest.php b/core/modules/node/src/Tests/NodeLinksTest.php index 718f8c8..4c0efa7 100644 --- a/core/modules/node/src/Tests/NodeLinksTest.php +++ b/core/modules/node/src/Tests/NodeLinksTest.php @@ -27,7 +27,6 @@ public function testHideLinks() { $node = $this->drupalCreateNode(array( 'type' => 'article', 'promote' => NODE_PROMOTED, - 'langcode' => 'en', )); // Links are displayed by default. diff --git a/core/modules/node/src/Tests/NodeLoadMultipleTest.php b/core/modules/node/src/Tests/NodeLoadMultipleTest.php index fbeb16b..3cea6a1 100644 --- a/core/modules/node/src/Tests/NodeLoadMultipleTest.php +++ b/core/modules/node/src/Tests/NodeLoadMultipleTest.php @@ -31,10 +31,10 @@ protected function setUp() { * Creates four nodes and ensures that they are loaded correctly. */ function testNodeMultipleLoad() { - $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'langcode' => 'en')); - $node2 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'langcode' => 'en')); - $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 0, 'langcode' => 'en')); - $node4 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0, 'langcode' => 'en')); + $node1 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node2 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); + $node3 = $this->drupalCreateNode(array('type' => 'article', 'promote' => 0)); + $node4 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0)); // Confirm that promoted nodes appear in the default node listing. $this->drupalGet('node'); diff --git a/core/modules/node/src/Tests/NodeRSSContentTest.php b/core/modules/node/src/Tests/NodeRSSContentTest.php index 6a1c830..e4b7cb3 100644 --- a/core/modules/node/src/Tests/NodeRSSContentTest.php +++ b/core/modules/node/src/Tests/NodeRSSContentTest.php @@ -40,7 +40,7 @@ protected function setUp() { */ function testNodeRSSContent() { // Create a node. - $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'langcode' => 'en')); + $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1)); $this->drupalGet('rss.xml'); diff --git a/core/modules/node/src/Tests/NodeTitleTest.php b/core/modules/node/src/Tests/NodeTitleTest.php index 470465c..d692be5 100644 --- a/core/modules/node/src/Tests/NodeTitleTest.php +++ b/core/modules/node/src/Tests/NodeTitleTest.php @@ -41,7 +41,6 @@ function testNodeTitle() { $settings = array( 'title' => $this->randomMachineName(8), 'promote' => 1, - 'langcode' => 'en', ); $node = $this->drupalCreateNode($settings); @@ -65,7 +64,6 @@ function testNodeTitle() { // Test edge case where node title is set to 0. $settings = array( 'title' => 0, - 'langcode' => 'en', ); $node = $this->drupalCreateNode($settings); // Test that 0 appears as . diff --git a/core/modules/rdf/src/Tests/StandardProfileTest.php b/core/modules/rdf/src/Tests/StandardProfileTest.php index e21c7cf..d097a5e 100644 --- a/core/modules/rdf/src/Tests/StandardProfileTest.php +++ b/core/modules/rdf/src/Tests/StandardProfileTest.php @@ -139,7 +139,6 @@ protected function setUp() { $article_settings = array( 'type' => 'article', 'promote' => NODE_PROMOTED, - 'langcode' => 'en', 'field_image' => array( array( 'target_id' => $this->image->id(), @@ -153,13 +152,13 @@ protected function setUp() { ); $this->article = $this->drupalCreateNode($article_settings); // Create second article to test teaser list. - $this->drupalCreateNode(array('type' => 'article', 'promote' => NODE_PROMOTED, 'langcode' => 'en')); + $this->drupalCreateNode(array('type' => 'article', 'promote' => NODE_PROMOTED,)); // Create article comment. $this->articleComment = $this->saveComment($this->article->id(), $this->webUser->id(), NULL, 0); // Create page. - $this->page = $this->drupalCreateNode(array('type' => 'page', 'langcode' => 'en')); + $this->page = $this->drupalCreateNode(array('type' => 'page')); // Set URIs. // Image. diff --git a/core/modules/system/src/Tests/System/FrontPageTest.php b/core/modules/system/src/Tests/System/FrontPageTest.php index 609da92..dd24ef5 100644 --- a/core/modules/system/src/Tests/System/FrontPageTest.php +++ b/core/modules/system/src/Tests/System/FrontPageTest.php @@ -30,7 +30,7 @@ protected function setUp() { $this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration')); $this->drupalLogin($this->admin_user); $this->drupalCreateContentType(array('type' => 'page')); - $this->node_path = "node/" . $this->drupalCreateNode(array('promote' => 1, 'langcode' => 'en'))->id(); + $this->node_path = "node/" . $this->drupalCreateNode(array('promote' => 1))->id(); // Configure 'node' as front page. \Drupal::config('system.site')->set('page.front', 'node')->save(); diff --git a/core/modules/views/src/Tests/DefaultViewsTest.php b/core/modules/views/src/Tests/DefaultViewsTest.php index e656058..c0feff5 100644 --- a/core/modules/views/src/Tests/DefaultViewsTest.php +++ b/core/modules/views/src/Tests/DefaultViewsTest.php @@ -94,7 +94,6 @@ protected function setUp() { if ($i % 2) { $values['promote'] = TRUE; } - $values['langcode'] = 'en'; $values['body'][]['value'] = l('Node ' . 1, 'node/' . 1); $node = $this->drupalCreateNode($values); diff --git a/core/profiles/standard/src/Tests/StandardTest.php b/core/profiles/standard/src/Tests/StandardTest.php index 32eebe3..9977e64 100644 --- a/core/profiles/standard/src/Tests/StandardTest.php +++ b/core/profiles/standard/src/Tests/StandardTest.php @@ -75,7 +75,6 @@ function testStandard() { 'title' => 'Foobar', 'promote' => 1, 'status' => 1, - 'langcode' => 'en' )); // Add a comment.