class BatchKernelTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php \Drupal\KernelTests\Core\Batch\BatchKernelTest
- 10 core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php \Drupal\KernelTests\Core\Batch\BatchKernelTest
- 8.9.x core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php \Drupal\KernelTests\Core\Batch\BatchKernelTest
Tests batch functionality.
@group Batch
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\Batch\BatchKernelTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of BatchKernelTest
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Batch/ BatchKernelTest.php, line 12
Namespace
Drupal\KernelTests\Core\BatchView source
class BatchKernelTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
require_once $this->root . '/core/includes/batch.inc';
}
/**
* Tests _batch_needs_update().
*/
public function testNeedsUpdate() {
// Before ever being called, the return value should be FALSE.
$this->assertEquals(FALSE, _batch_needs_update());
// Set the value to TRUE.
$this->assertEquals(TRUE, _batch_needs_update(TRUE));
// Check that without a parameter TRUE is returned.
$this->assertEquals(TRUE, _batch_needs_update());
// Set the value to FALSE.
$this->assertEquals(FALSE, _batch_needs_update(FALSE));
$this->assertEquals(FALSE, _batch_needs_update());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.