function ModuleInstallBatchTest::testLoadingEntitiesCreatedInBatch

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

File

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

Class

ModuleInstallBatchTest
Tests batch operations during tests execution.

Namespace

Drupal\FunctionalTests\Core\Test

Code

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.