diff -u b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php --- b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php @@ -575,7 +575,7 @@ $edit['taxonomy_forums'] = $this->root_forum['tid']; $edit['shadow'] = TRUE; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertRaw(t('Forum topic %title has been updated.', array('%title' => $edit["title"])), 'Forum node was edited'); + $this->assertRaw(t('Forum topic %title has been updated.', array('%title' => $edit['title[0][value]'])), 'Forum node was edited'); // Verify topic was moved to a different forum. $forum_tid = db_query("SELECT tid FROM {forum} WHERE nid = :nid AND vid = :vid", array( diff -u b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php --- b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php @@ -45,15 +45,15 @@ function testNodeCreation() { // Create a node. $edit = array(); - $edit["title"] = $this->randomName(8); + $edit['title[0][value]'] = $this->randomName(8); $edit["body[0][value]"] = $this->randomName(16); $this->drupalPostForm('node/add/page', $edit, t('Save')); // Check that the Basic page has been created. - $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit["title"])), 'Basic page created.'); + $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.'); // Check that the node exists in the database. - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->assertTrue($node, 'Node found in database.'); } diff -u b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php @@ -60,14 +60,14 @@ // Create a node with language Language::LANGCODE_NOT_SPECIFIED. $edit = array(); - $edit["title"] = $this->randomName(8); + $edit['title[0][value]'] = $this->randomName(8); $edit['body[0][value]'] = $this->randomName(16); $this->drupalGet('node/add/page'); $form_langcode = \Drupal::state()->get('entity_test.form_langcode') ?: FALSE; $this->drupalPostForm(NULL, $edit, t('Save')); - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->assertTrue($node->language()->id == $form_langcode, 'Form language is the same as the entity language.'); // Edit the node and test the form language. @@ -95,7 +95,7 @@ $edit['body[0][value]'] = $this->randomName(16); $edit['langcode'] = $langcode; $this->drupalPostForm('node/add/page', $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit["title"])), 'Basic page created.'); + $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit['title[0][value]'])), 'Basic page created.'); // Check to make sure the node was created. $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); diff -u b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php --- b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -116,7 +116,7 @@ $this->drupalPostForm('node/add/article', $edit, t('Save')); // Check that the term is displayed when the node is viewed. - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->drupalGet('node/' . $node->id()); $this->assertText($term1->label(), 'Term is displayed when viewing the node.'); @@ -184,7 +184,7 @@ // Save, creating the terms. $this->drupalPostForm('node/add/article', $edit, t('Save')); - $this->assertRaw(t('@type %title has been created.', array('@type' => t('Article'), '%title' => $edit["title"])), 'The node was created successfully.'); + $this->assertRaw(t('@type %title has been created.', array('@type' => t('Article'), '%title' => $edit['title[0][value]'])), 'The node was created successfully.'); foreach ($terms as $term) { $this->assertText($term, 'The term was saved and appears on the node page.'); } @@ -205,7 +205,7 @@ $term_names = array($term_objects['term3']->label(), $term_objects['term4']->label()); // Get the node. - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->drupalGet('node/' . $node->id()); foreach ($term_names as $term_name) { only in patch2: unchanged: --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php @@ -95,7 +95,7 @@ function testCommentLanguage() { // Create "Article" content. $title = $this->randomName(); $edit = array( - 'title' => $title, + 'title[0][value]' => $title, 'body[0][value]' => $this->randomName(), 'langcode' => $node_langcode, 'comment[0][status]' => COMMENT_OPEN, only in patch2: unchanged: --- a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php +++ b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php @@ -309,7 +309,7 @@ private function doNode($type) { // Create a node using the form in order to generate an add content event // (which is not triggered by drupalCreateNode). $edit = $this->getContent($type); - $title = $edit["title"]; + $title = $edit['title[0][value]']; $this->drupalPostForm('node/add/' . $type, $edit, t('Save')); $this->assertResponse(200); // Retrieve the node object. @@ -369,7 +369,7 @@ private function getContent($type) { switch ($type) { case 'forum': $content = array( - 'title' => $this->randomName(8), + 'title[0][value]' => $this->randomName(8), 'taxonomy_forums' => array(1), 'body[0][value]' => $this->randomName(32), ); @@ -377,7 +377,7 @@ private function getContent($type) { default: $content = array( - 'title' => $this->randomName(8), + 'title[0][value]' => $this->randomName(8), 'body[0][value]' => $this->randomName(32), ); break; only in patch2: unchanged: --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php @@ -99,7 +99,7 @@ public function testAutoCreate() { $this->assertFalse($result, 'Referenced node does not exist yet.'); $edit = array( - 'title' => $this->randomName(), + 'title[0][value]' => $this->randomName(), 'test_field[0][target_id]' => $new_title, ); $this->drupalPostForm("node/add/$this->referencing_type", $edit, 'Save'); only in patch2: unchanged: --- a/core/modules/field/lib/Drupal/field/Tests/reEnableModuleFieldTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/reEnableModuleFieldTest.php @@ -85,8 +85,8 @@ function testReEnabledField() { // Submit an article node with a telephone field so data exist for the // field. $edit = array( - "title" => $this->randomName(), - "field_telephone[0][value]" => "123456789", + 'title[0][value]' => $this->randomName(), + 'field_telephone[0][value]' => "123456789", ); $this->drupalPostForm(NULL, $edit, t('Save')); $this->assertRaw(''); only in patch2: unchanged: --- a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php @@ -139,7 +139,7 @@ function updateFileField($name, $type_name, $instance_settings = array(), $widge */ function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE, $extras = array()) { $edit = array( - "title" => $this->randomName(), + 'title[0][value]' => $this->randomName(), 'revision' => (string) (int) $new_revision, ); only in patch2: unchanged: --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php @@ -232,13 +232,13 @@ function testFilterAdmin() { $text = $body . '' . $extra_text . ''; $edit = array(); - $edit["title"] = $this->randomName(); + $edit['title[0][value]'] = $this->randomName(); $edit['body[0][value]'] = $text; $edit['body[0][format]'] = $basic; $this->drupalPostForm('node/add/page', $edit, t('Save')); - $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit["title"])), 'Filtered node created.'); + $this->assertRaw(t('Basic page %title has been created.', array('%title' => $edit['title[0][value]'])), 'Filtered node created.'); - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->assertTrue($node, 'Node found in database.'); $this->drupalGet('node/' . $node->id()); only in patch2: unchanged: --- a/core/modules/image/lib/Drupal/image/Tests/ImageFieldTestBase.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageFieldTestBase.php @@ -114,7 +114,7 @@ function createImageField($name, $type_name, $field_settings = array(), $instanc */ function uploadNodeImage($image, $field_name, $type) { $edit = array( - 'title' => $this->randomName(), + 'title[0][value]' => $this->randomName(), ); $edit['files[' . $field_name . '_0]'] = drupal_realpath($image->uri); $this->drupalPostForm('node/add/' . $type, $edit, t('Save and publish')); only in patch2: unchanged: --- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php @@ -29,7 +29,8 @@ function testNodeTitleXSS() { $xss = ''; $title = $xss . $this->randomName(); - $edit = array("title" => $title); + $edit = array(); + $edit['title[0][value]'] = $title; $this->drupalPostForm('node/add/page', $edit, t('Preview')); $this->assertNoRaw($xss, 'Harmful tags are escaped when previewing a node.'); @@ -39,7 +40,7 @@ function testNodeTitleXSS() { $this->drupalGet('node/' . $node->id()); // assertTitle() decodes HTML-entities inside the element. - $this->assertTitle($edit["title"] . ' | Drupal', 'Title is diplayed when viewing a node.'); + $this->assertTitle($title . ' | Drupal', 'Title is diplayed when viewing a node.'); $this->assertNoRaw($xss, 'Harmful tags are escaped when viewing a node.'); $this->drupalGet('node/' . $node->id() . '/edit'); only in patch2: unchanged: --- a/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php +++ b/core/modules/number/lib/Drupal/number/Tests/NumberFieldTest.php @@ -199,7 +199,7 @@ function testNumberIntegerField() { // Create new content and check that prefix and suffix are shown. $rand_number = rand(); $edit = array( - 'title' => $this->randomName(), + 'title[0][value]' => $this->randomName(), 'field_' .$field_name . '[0][value]' => $rand_number, ); $this->drupalPostForm("node/add/$type", $edit, t('Save')); only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/System/PageTitleTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/PageTitleTest.php @@ -71,16 +71,16 @@ function testTitleTags() { $this->assertTrue(strpos(drupal_get_title(), '<em>') !== FALSE, 'Tags in title are not converted to entities when $output is PASS_THROUGH.'); // Generate node content. $edit = array( - 'title' => '!SimpleTest! ' . $title . $this->randomName(20), + 'title[0][value]' => '!SimpleTest! ' . $title . $this->randomName(20), 'body[0][value]' => '!SimpleTest! test body' . $this->randomName(200), ); // Create the node with HTML in the title. $this->drupalPostForm('node/add/page', $edit, t('Save')); - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->assertNotNull($node, 'Node created and found in database'); $this->drupalGet("node/" . $node->id()); - $this->assertText(check_plain($edit["title"]), 'Check to make sure tags in the node title are converted.'); + $this->assertText(check_plain($edit['title[0][value]']), 'Check to make sure tags in the node title are converted.'); } /** * Test if the title of the site is XSS proof. only in patch2: unchanged: --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php @@ -92,7 +92,7 @@ function testTaxonomyRss() { // Post an article. $edit = array(); - $edit["title"] = $this->randomName(); + $edit['title[0][value]'] = $this->randomName(); $edit[$this->field_name . '[]'] = $term1->id(); $this->drupalPostForm('node/add/article', $edit, t('Save')); only in patch2: unchanged: --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php @@ -103,14 +103,14 @@ function testTaxonomyIndex() { // Post an article. $edit = array(); - $edit["title"] = $this->randomName(); + $edit['title[0][value]'] = $this->randomName(); $edit['body[0][value]'] = $this->randomName(); $edit["{$this->field_name_1}[]"] = $term_1->id(); $edit["{$this->field_name_2}[]"] = $term_1->id(); $this->drupalPostForm('node/add/article', $edit, t('Save')); // Check that the term is indexed, and only once. - $node = $this->drupalGetNodeByTitle($edit["title"]); + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->id(), ':tid' => $term_1->id(), only in patch2: unchanged: --- a/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneFieldTest.php +++ b/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneFieldTest.php @@ -87,8 +87,8 @@ function testTelephoneField() { // Test basic entery of telephone field. $edit = array( - "title" => $this->randomName(), - "field_telephone[0][value]" => "123456789", + 'title[0][value]' => $this->randomName(), + 'field_telephone[0][value]' => "123456789", ); $this->drupalPostForm(NULL, $edit, t('Save')); @@ -96,8 +96,8 @@ function testTelephoneField() { // Add number with a space in it. Need to ensure it is stripped on output. $edit = array( - "title" => $this->randomName(), - "field_telephone[0][value]" => "1234 56789", + 'title[0][value]' => $this->randomName(), + 'field_telephone[0][value]' => "1234 56789", ); $this->drupalPostForm('node/add/article', $edit, t('Save'));