function ProcessingTest::testLinkToErrorPageAppears

Same name in other branches
  1. 10 core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php \Drupal\Tests\system\FunctionalJavascript\Batch\ProcessingTest::testLinkToErrorPageAppears()

Tests that a link to the error page is shown.

File

core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php, line 29

Class

ProcessingTest
@group Batch

Namespace

Drupal\Tests\system\FunctionalJavascript\Batch

Code

public function testLinkToErrorPageAppears() : void {
    $edit = [
        'batch' => 'batch_8',
    ];
    $this->drupalGet('batch-test');
    $this->submitForm($edit, 'Submit');
    $this->assertNotNull($this->assertSession()
        ->waitForLink('the error page'));
    $this->assertSession()
        ->assertNoEscaped('<');
    $this->assertSession()
        ->responseContains('Exception in batch');
    $this->clickLink('the error page');
    $this->assertSession()
        ->pageTextContains('Redirection successful.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.