.../block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php | 10 +++++----- core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php | 10 +--------- .../views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index 85f0ace..ba51073 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -61,7 +61,7 @@ public function testBlockCategory() { $edit['description'] = $this->randomString(); $edit['block[create]'] = TRUE; $edit['block[style][row_plugin]'] = 'fields'; - $this->drupalPost('admin/structure/views/add', $edit, t('Save and edit')); + $this->drupalPostForm('admin/structure/views/add', $edit, t('Save and edit')); // Test that the block was given a default category corresponding to its // base table. @@ -76,7 +76,7 @@ public function testBlockCategory() { $this->assertTrue(!empty($elements), 'The test block appears in the category for its base table.'); // Clone the block before changing the category. - $this->drupalPost('admin/structure/views/view/' . $edit['id'] . '/edit/block_1', array(), t('Clone @display_title', array('@display_title' => 'Block'))); + $this->drupalPostForm('admin/structure/views/view/' . $edit['id'] . '/edit/block_1', array(), t('Clone @display_title', array('@display_title' => 'Block'))); $this->assertUrl('admin/structure/views/view/' . $edit['id'] . '/edit/block_2'); // Change the block category to a random string. @@ -86,13 +86,13 @@ public function testBlockCategory() { $this->assertTrue(!empty($link)); $this->clickLink($label); $category = $this->randomString(); - $this->drupalPost(NULL, array('block_category' => $category), t('Apply')); + $this->drupalPostForm(NULL, array('block_category' => $category), t('Apply')); // Clone the block after changing the category. - $this->drupalPost(NULL, array(), t('Clone @display_title', array('@display_title' => 'Block'))); + $this->drupalPostForm(NULL, array(), t('Clone @display_title', array('@display_title' => 'Block'))); $this->assertUrl('admin/structure/views/view/' . $edit['id'] . '/edit/block_3'); - $this->drupalPost(NULL, array(), t('Save')); + $this->drupalPostForm(NULL, array(), t('Save')); // Test that the blocks are listed under the correct categories. $category_id = 'edit-' . drupal_html_id(String::checkPlain($category)); diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php index 68fdaae..ef7bb0d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php @@ -45,15 +45,7 @@ public function testAjaxView() { $data['view_display_id'] = 'test_ajax_view'; $post = 'view_name=test_ajax_view&view_display_id=page_1'; - $response = $this->curlExec(array( - CURLOPT_URL => url('views/ajax', array('absolute' => TRUE)), - CURLOPT_POST => TRUE, - CURLOPT_POSTFIELDS => $post, - CURLOPT_HTTPHEADER => array( - 'Accept: application/json', - 'Content-Type: application/x-www-form-urlencoded', - ), - )); + $response = $this->drupalPost('views/ajax', 'application/json', $post); $data = Json::decode($response); // Ensure that the view insert command is part of the result. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php index db74ae0..fe12b2b 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php @@ -38,7 +38,7 @@ public function testDeleteLink() { $this->clickLink(t('Delete view')); $this->assertUrl('admin/structure/views/view/test_view/delete'); - $this->drupalPost(NULL, array(), t('Delete')); + $this->drupalPostForm(NULL, array(), t('Delete')); $this->assertUrl('admin/structure/views'); $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_view');