Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/simpletest/src/Tests/KernelTestBaseTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
237 /** | 237 /** |
238 * Tests that the module list is retained after enabling/installing/disabling. | 238 * Tests that the module list is retained after enabling/installing/disabling. |
239 */ | 239 */ |
240 public function testEnableModulesFixedList() { | 240 public function testEnableModulesFixedList() { |
241 // Install system module. | 241 // Install system module. |
242 $this->container->get('module_installer')->install(['system', 'menu_link_content']); | 242 $this->container->get('module_installer')->install(['system', 'user', 'menu_link_content']); |
243 $entity_manager = \Drupal::entityManager(); | 243 $entity_manager = \Drupal::entityManager(); |
244 | 244 |
245 // entity_test is loaded via $modules; its entity type should exist. | 245 // entity_test is loaded via $modules; its entity type should exist. |
246 $this->assertEqual($this->container->get('module_handler')->moduleExists('entity_test'), TRUE); | 246 $this->assertEqual($this->container->get('module_handler')->moduleExists('entity_test'), TRUE); |
247 $this->assertTrue(TRUE == $entity_manager->getDefinition('entity_test')); | 247 $this->assertTrue(TRUE == $entity_manager->getDefinition('entity_test')); |
268 | 268 |
269 // Reactivate the previously uninstalled module. | 269 // Reactivate the previously uninstalled module. |
270 $this->enableModules(['field_test']); | 270 $this->enableModules(['field_test']); |
271 | 271 |
272 // Create a field. | 272 // Create a field. |
273 $this->installEntitySchema('entity_test'); | |
273 $display = EntityViewDisplay::create([ | 274 $display = EntityViewDisplay::create([ |
274 'targetEntityType' => 'entity_test', | 275 'targetEntityType' => 'entity_test', |
275 'bundle' => 'entity_test', | 276 'bundle' => 'entity_test', |
276 'mode' => 'default', | 277 'mode' => 'default', |
277 ]); | 278 ]); |