BatchKernelTest.php in Drupal 8
File
core/tests/Drupal/KernelTests/Core/Batch/BatchKernelTest.php
View source
<?php
namespace Drupal\KernelTests\Core\Batch;
use Drupal\KernelTests\KernelTestBase;
class BatchKernelTest extends KernelTestBase {
protected function setUp() {
parent::setUp();
require_once $this->root . '/core/includes/batch.inc';
}
public function testNeedsUpdate() {
$this
->assertEquals(FALSE, _batch_needs_update());
$this
->assertEquals(TRUE, _batch_needs_update(TRUE));
$this
->assertEquals(TRUE, _batch_needs_update());
$this
->assertEquals(FALSE, _batch_needs_update(FALSE));
$this
->assertEquals(FALSE, _batch_needs_update());
}
}