function PageTest::testBatchProgressMessages
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Batch/PageTest.php \Drupal\Tests\system\Functional\Batch\PageTest::testBatchProgressMessages()
- 10 core/modules/system/tests/src/Functional/Batch/PageTest.php \Drupal\Tests\system\Functional\Batch\PageTest::testBatchProgressMessages()
- 11.x core/modules/system/tests/src/Functional/Batch/PageTest.php \Drupal\Tests\system\Functional\Batch\PageTest::testBatchProgressMessages()
Tests that the progress messages are correct.
File
-
core/
modules/ system/ tests/ src/ Functional/ Batch/ PageTest.php, line 75
Class
- PageTest
- Tests the content of the progress page.
Namespace
Drupal\Tests\system\Functional\BatchCode
public function testBatchProgressMessages() {
// Go to the initial step only.
$this->maximumMetaRefreshCount = 0;
$this->drupalGet('batch-test/test-title');
$this->assertRaw('<div class="progress__description">Initializing.<br /> </div>', 'Initial progress message appears correctly.');
$this->assertNoRaw('&nbsp;', 'Initial progress message is not double escaped.');
// Now also go to the next step.
$this->maximumMetaRefreshCount = 1;
$this->drupalGet('batch-test/test-title');
$this->assertRaw('<div class="progress__description">Completed 1 of 1.</div>', 'Progress message for second step appears correctly.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.