comparison core/modules/simpletest/src/Tests/SimpleTestInstallBatchTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children af1871eacc83
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 }