diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php index 69802f9..61bbb52 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php @@ -33,17 +33,17 @@ class ConfigExportImportUITest extends WebTestBase { * @var string */ protected $tarball; - + /** * A content type, held between test methods. - * + * * @var string */ protected $content_type; - + /** * A field, held between test methods. - * + * * @var string */ protected $field; @@ -89,12 +89,12 @@ function testExport() { \Drupal::config('system.site') ->set('slogan', $this->slogan) ->save(); - + // Create a content type. $this->content_type = $this->drupalCreateContentType(); $type_exists = (bool) entity_load('node_type', $this->content_type->type); $this->assertTrue($type_exists, 'The new content type has been created in the database.'); - + // Create a field. $this->field = entity_create('field_entity', array( 'name' => drupal_strtolower($this->randomName()), @@ -115,11 +115,11 @@ function testExport() { entity_get_display('node', $this->content_type->type, 'full') ->setComponent($this->field->name) ->save(); - + // Display the creation form. $this->drupalGet('node/add/' . $this->content_type->type); $this->assertFieldByName("{$this->field->name}[0][value]", '', 'Widget is displayed'); - + // Export the site configuration. $this->drupalPostForm('admin/config/development/configuration/full/export', array(), 'Export'); $this->tarball = $this->drupalGetContent(); @@ -131,29 +131,29 @@ function testExport() { function testImport() { $filename = 'temporary://' . $this->randomName(); file_put_contents($filename, $this->tarball); - + // Assert the custom content type does not exist. $this->drupalGet('node/add'); $this->assertNoText($this->content_type->type, 'The new content type does not exist.'); $this->doImport($filename); - + // Now that the role is imported, change the slogan and re-import with a non-root user. $web_user = $this->drupalCreateUser(); $web_user->addRole($this->admin_role); $web_user->save(); $this->drupalLogin($web_user); - + // Change the site slogan. \Drupal::config('system.site') ->set('slogan', $this->randomString(16)) ->save(); $this->assertNotEqual($this->slogan, \Drupal::config('system.site')->get('slogan')); - + $this->doImport($filename); - + $this->drupalLogin($this->root_user); - + // Check that settings are returned to their prior values. $this->assertEqual($this->slogan, \Drupal::config('system.site')->get('slogan')); $this->drupalGet('node/add/' . $this->content_type->type);