Commit d61097a6 authored by Marco Villegas's avatar Marco Villegas
Browse files

Follow core drupalPost rename for forms.

Following core's d009cac09c57f6d7e37a5d20aa87676fab959210.
parent 784ccc2b
Loading
Loading
Loading
Loading
+1 −1
Changes for block_example/lib/Drupal/block_example/Tests/BlockExampleTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ function testBlockExampleBasic() {
    $edit = array(
      'settings[block_example_string_text]' => $this->randomName(),
    );
    $this->drupalPost('admin/structure/block/manage/' . $theme_name . '.block_example_example_configurable_text', $edit, t('Save block'));
    $this->drupalPostForm('admin/structure/block/manage/' . $theme_name . '.block_example_example_configurable_text', $edit, t('Save block'));

    // Verify that new content is shown.
    $this->drupalGet('/');
+6 −6
Changes for cron_example/lib/Drupal/cron_example/Tests/CronExampleTestCase.php: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -49,17 +49,17 @@ function testCronExampleBasic() {

    // Initial run should cause cron_example_cron() to fire.
    $post = array();
    $this->drupalPost('examples/cron_example', $post, t('Run cron now'));
    $this->drupalPostForm('examples/cron_example', $post, t('Run cron now'));
    $this->assertText(t('cron_example executed at'));

    // Forcing should also cause cron_example_cron() to fire.
    $post['cron_reset'] = TRUE;
    $this->drupalPost(NULL, $post, t('Run cron now'));
    $this->drupalPostForm(NULL, $post, t('Run cron now'));
    $this->assertText(t('cron_example executed at'));

    // But if followed immediately and not forced, it should not fire.
    $post['cron_reset'] = FALSE;
    $this->drupalPost(NULL, $post, t('Run cron now'));
    $this->drupalPostForm(NULL, $post, t('Run cron now'));
    $this->assertNoText(t('cron_example executed at'));


@@ -68,17 +68,17 @@ function testCronExampleBasic() {
      'num_items' => 5,
      'queue' => 'cron_example_queue_1',
    );
    $this->drupalPost(NULL, $post, t('Add jobs to queue'));
    $this->drupalPostForm(NULL, $post, t('Add jobs to queue'));
    $this->assertText('There are currently 5 items in queue 1 and 0 items in queue 2');
    $post = array(
      'num_items' => 100,
      'queue' => 'cron_example_queue_2',
    );
    $this->drupalPost(NULL, $post, t('Add jobs to queue'));
    $this->drupalPostForm(NULL, $post, t('Add jobs to queue'));
    $this->assertText('There are currently 5 items in queue 1 and 100 items in queue 2');

    $post = array();
    $this->drupalPost('examples/cron_example', $post, t('Run cron now'));
    $this->drupalPostForm('examples/cron_example', $post, t('Run cron now'));
    $this->assertPattern('/Queue 1 worker processed item with sequence 5 /');
    $this->assertPattern('/Queue 2 worker processed item with sequence 100 /');
  }
+2 −2
Changes for dbtng_example/lib/Drupal/dbtng_example/Tests/DBTNGExampleTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ function testUI() {

    //Test the add tab.
    // Add the new entry.
    $this->drupalPost('examples/dbtng/add',
    $this->drupalPostForm('examples/dbtng/add',
      array('name'  => 'Some', 'surname' => 'Anonymous', 'age' => 33), t('Add'));
    // Now find the new entry.
    $this->drupalGet('examples/dbtng');
@@ -63,7 +63,7 @@ function testUI() {
    $entry = $result[0];
    unset($entry->uid);
    $entry->name = 'NewFirstName';
    $this->drupalPost('examples/dbtng/update',
    $this->drupalPostForm('examples/dbtng/update',
      (array)$entry, t('Update'));
    // Now find the new entry.
    $this->drupalGet('examples/dbtng');