diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldTest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldTest.php index 8b34032..94896eb 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldTest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldTest.php @@ -65,7 +65,7 @@ function testUpdateAllowedValues() { // All three options appear. $entity = entity_create('entity_test', array()); - $form = Drupal::service('plugin.manager.entity')->getForm($entity); + $form = \Drupal::service('plugin.manager.entity')->getForm($entity); $this->assertTrue(!empty($form[$this->field_name][$langcode][1]), 'Option 1 exists'); $this->assertTrue(!empty($form[$this->field_name][$langcode][2]), 'Option 2 exists'); $this->assertTrue(!empty($form[$this->field_name][$langcode][3]), 'Option 3 exists'); @@ -91,7 +91,7 @@ function testUpdateAllowedValues() { $this->field['settings']['allowed_values'] = array(2 => 'Two'); field_update_field($this->field); $entity = entity_create('entity_test', array()); - $form = Drupal::service('plugin.manager.entity')->getForm($entity); + $form = \Drupal::service('plugin.manager.entity')->getForm($entity); $this->assertTrue(empty($form[$this->field_name][$langcode][1]), 'Option 1 does not exist'); $this->assertTrue(!empty($form[$this->field_name][$langcode][2]), 'Option 2 exists'); $this->assertTrue(empty($form[$this->field_name][$langcode][3]), 'Option 3 does not exist'); @@ -99,7 +99,7 @@ function testUpdateAllowedValues() { // Completely new options appear. $this->field['settings']['allowed_values'] = array(10 => 'Update', 20 => 'Twenty'); field_update_field($this->field); - $form = Drupal::service('plugin.manager.entity')->getForm($entity); + $form = \Drupal::service('plugin.manager.entity')->getForm($entity); $this->assertTrue(empty($form[$this->field_name][$langcode][1]), 'Option 1 does not exist'); $this->assertTrue(empty($form[$this->field_name][$langcode][2]), 'Option 2 does not exist'); $this->assertTrue(empty($form[$this->field_name][$langcode][3]), 'Option 3 does not exist'); @@ -120,7 +120,7 @@ function testUpdateAllowedValues() { ); field_create_instance($this->instance); $entity = entity_create('entity_test', array()); - $form = Drupal::service('plugin.manager.entity')->getForm($entity); + $form = \Drupal::service('plugin.manager.entity')->getForm($entity); $this->assertTrue(!empty($form[$this->field_name][$langcode][1]), 'Option 1 exists'); $this->assertTrue(!empty($form[$this->field_name][$langcode][2]), 'Option 2 exists'); $this->assertTrue(!empty($form[$this->field_name][$langcode][3]), 'Option 3 exists'); diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php index 9381f78..2887428 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php @@ -81,7 +81,7 @@ function testEntityFormLanguage() { // Explicitly set form langcode. $langcode = $this->langcodes[0]; $form_state['langcode'] = $langcode; - Drupal::service('plugin.manager.entity')->getForm($node, 'default', $form_state); + \Drupal::service('plugin.manager.entity')->getForm($node, 'default', $form_state); $form_langcode = state()->get('entity_test.form_langcode') ?: FALSE; $this->assertTrue($langcode == $form_langcode, 'Form language is the same as the language parameter.');