function ModuleInstallBatchTest::testLoadingEntitiesCreatedInBatch

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest::testLoadingEntitiesCreatedInBatch()
  2. 10 core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest::testLoadingEntitiesCreatedInBatch()
  3. 11.x core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest::testLoadingEntitiesCreatedInBatch()

Tests loading entities created in a batch in test_batch_test_install().

File

core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php, line 36

Class

ModuleInstallBatchTest
Tests batch operations during tests execution.

Namespace

Drupal\FunctionalTests\Core\Test

Code

public function testLoadingEntitiesCreatedInBatch() {
    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.