diff -u b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php --- b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php @@ -12,20 +12,29 @@ class ConfigExportImportUITest extends WebTestBase { /** + * The slogan set and asserted. + * * @var string */ protected $slogan; /** + * The contents of the config export tarball held between test methods. + * * @var string */ protected $tarball; /** + * The name of the role. + * * @var string */ protected $role; + /** + * The order of methods in this test class do matter. + */ const SORT_METHODS = TRUE; public static $modules = array('config'); @@ -47,6 +56,9 @@ $this->drupalLogin($this->root_user); } + /** + * Tests exporting the site configuration. + */ function testExport() { // Create a role for second round. $this->role = $this->drupalCreateRole(array('synchronize configuration', 'import configuration')); @@ -58,6 +70,9 @@ $this->tarball = $this->drupalGetContent(); } + /** + * Tests importing the tarball created in testExport(). + */ function testImport() { $filename = 'temporary://' . $this->randomName(); file_put_contents($filename, $this->tarball); @@ -73,6 +88,12 @@ $this->doImport($filename); } + /** + * Import a tarball and assert the slogan is correct. + * + * @param string $filename + * The name of the tarball containing the configuration to be imported. + */ protected function doImport($filename) { $this->assertNotEqual($this->slogan, \Drupal::config('system.site')->get('slogan')); $this->drupalPostForm('admin/config/development/configuration/import', array('files[import_tarball]' => $filename), 'Upload');