class ModuleInstallBatchTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest
- 10 core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest
- 9 core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest
- 8.9.x core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest
Tests batch operations during tests execution.
This demonstrates that a batch will be successfully executed during module installation when running tests.
Attributes
#[Group('Test')]
#[Group('FunctionalTestSetupTrait')]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of ModuleInstallBatchTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Core/ Test/ ModuleInstallBatchTest.php, line 18
Namespace
Drupal\FunctionalTests\Core\TestView source
class ModuleInstallBatchTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'test_batch_test',
'entity_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests loading entities created in a batch in test_batch_test_install().
*/
public function testLoadingEntitiesCreatedInBatch() : void {
foreach ([
1,
2,
] as $id) {
$this->assertNotNull(EntityTest::load($id), 'Successfully loaded entity ' . $id);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.