Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / simpletest / src / Tests / SimpleTestInstallBatchTest.php
1 <?php
2
3 namespace Drupal\simpletest\Tests;
4
5 use Drupal\entity_test\Entity\EntityTest;
6 use Drupal\simpletest\WebTestBase;
7
8 /**
9  * Tests batch operations during tests execution.
10  *
11  * This demonstrates that a batch will be successfully executed during module
12  * installation when running tests.
13  *
14  * @group simpletest
15  */
16 class SimpleTestInstallBatchTest extends WebTestBase {
17
18   /**
19    * Modules to enable.
20    *
21    * @var array
22    */
23   public static $modules = ['simpletest', 'simpletest_test', 'entity_test'];
24
25   /**
26    * Tests loading entities created in a batch in simpletest_test_install().
27    */
28   public function testLoadingEntitiesCreatedInBatch() {
29     $entity1 = EntityTest::load(1);
30     $this->assertNotNull($entity1, 'Successfully loaded entity 1.');
31     $entity2 = EntityTest::load(2);
32     $this->assertNotNull($entity2, 'Successfully loaded entity 2.');
33   }
34
35 }