Mercurial > hg > isophonics-drupal-site
annotate core/modules/simpletest/src/Tests/SimpleTestInstallBatchTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\simpletest\Tests; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\entity_test\Entity\EntityTest; |
Chris@0 | 6 use Drupal\simpletest\WebTestBase; |
Chris@0 | 7 |
Chris@0 | 8 /** |
Chris@0 | 9 * Tests batch operations during tests execution. |
Chris@0 | 10 * |
Chris@0 | 11 * This demonstrates that a batch will be successfully executed during module |
Chris@0 | 12 * installation when running tests. |
Chris@0 | 13 * |
Chris@0 | 14 * @group simpletest |
Chris@18 | 15 * @group WebTestBase |
Chris@18 | 16 * @group FunctionalTestSetupTrait |
Chris@18 | 17 * |
Chris@18 | 18 * @see \Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest |
Chris@0 | 19 */ |
Chris@0 | 20 class SimpleTestInstallBatchTest extends WebTestBase { |
Chris@0 | 21 |
Chris@0 | 22 /** |
Chris@0 | 23 * Modules to enable. |
Chris@0 | 24 * |
Chris@0 | 25 * @var array |
Chris@0 | 26 */ |
Chris@18 | 27 public static $modules = ['test_batch_test', 'entity_test']; |
Chris@0 | 28 |
Chris@0 | 29 /** |
Chris@18 | 30 * Tests loading entities created in a batch in test_batch_test_install(). |
Chris@0 | 31 */ |
Chris@0 | 32 public function testLoadingEntitiesCreatedInBatch() { |
Chris@0 | 33 $entity1 = EntityTest::load(1); |
Chris@0 | 34 $this->assertNotNull($entity1, 'Successfully loaded entity 1.'); |
Chris@0 | 35 $entity2 = EntityTest::load(2); |
Chris@0 | 36 $this->assertNotNull($entity2, 'Successfully loaded entity 2.'); |
Chris@0 | 37 } |
Chris@0 | 38 |
Chris@0 | 39 } |