ProcessingTest.php

Same filename in this branch
  1. 10 core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
Same filename in other branches
  1. 9 core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
  2. 8.9.x core/modules/system/tests/src/Functional/Batch/ProcessingTest.php
  3. 11.x core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php
  4. 11.x core/modules/system/tests/src/Functional/Batch/ProcessingTest.php

Namespace

Drupal\Tests\system\FunctionalJavascript\Batch

File

core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\system\FunctionalJavascript\Batch;

use Drupal\FunctionalJavascriptTests\WebDriverTestBase;

/**
 * @group Batch
 */
class ProcessingTest extends WebDriverTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'batch_test',
        'test_page_test',
    ];
    
    /**
     * {@inheritdoc}
     *
     * @todo Use the stark theme in https://drupal.org/i/3407067.
     */
    protected $defaultTheme = 'olivero';
    
    /**
     * Tests that a link to the error page is shown.
     */
    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.');
    }

}

Classes

Title Deprecated Summary
ProcessingTest @group Batch

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