diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php index 00b9678..774f170 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageControllerInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\Core\Config\Entity\ConfigStorageControllerInterface. + * Contains \Drupal\Core\Config\Entity\ConfigStorageControllerInterface. */ namespace Drupal\Core\Config\Entity; @@ -10,7 +10,7 @@ use Drupal\Core\Config\Config; /** - * @todo. + * Provides an interface for configuration-specific storage controllers. */ interface ConfigStorageControllerInterface { diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityExportFormTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityExportFormTest.php new file mode 100644 index 0000000..8e208cf --- /dev/null +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityExportFormTest.php @@ -0,0 +1,58 @@ + 'Configuration entity Export UI', + 'description' => 'Tests the user interface for exporting configuration entities.', + 'group' => 'Configuration', + ); + } + + /** + * Tests the Export link in the listing and the generated export. + */ + public function testConfigTestExport() { + $this->drupalGet('admin/structure/config_test'); + $this->clickLink('Export'); + $this->assertUrl('admin/structure/config_test/manage/dotted.default/export'); + $element = $this->xpath('//textarea[@id="edit-export"]'); + $this->assertTrue(!empty($element), 'Textarea with config export found.'); + + $config_entity = entity_load('config_test', 'dotted.default'); + $uuid = $config_entity->uuid(); + $expected_export = array(); + $expected_export[] = 'id: dotted.default'; + $expected_export[] = "uuid: $uuid"; + $expected_export[] = 'label: Default'; + $expected_export[] = 'weight: \'0\''; + $expected_export[] = 'style: \'\''; + $expected_export[] = 'status: \'1\''; + $expected_export[] = 'langcode: en'; + $expected_export[] = 'protected_property: Default'; + $expected_export[] = ''; + $expected_export = implode("\n", $expected_export); + $this->assertEqual((string) $element[0], $expected_export); + } + +} diff --git a/core/modules/config/tests/config_test/config_test.routing.yml b/core/modules/config/tests/config_test/config_test.routing.yml index c26a438..9462e27 100644 --- a/core/modules/config/tests/config_test/config_test.routing.yml +++ b/core/modules/config/tests/config_test/config_test.routing.yml @@ -51,3 +51,10 @@ config_test_entity_delete: entity_type: 'config_test' requirements: _access: 'TRUE' + +config_test_entity_export: + pattern: '/admin/structure/config_test/manage/{config_test}/export' + defaults: + _entity_form: 'config_test.export' + requirements: + _access: 'TRUE' diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php new file mode 100644 index 0000000..1570bc7 --- /dev/null +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php @@ -0,0 +1,35 @@ +access('update')) { + $uri = $entity->uri(); + $operations['export'] = array( + 'title' => t('Export'), + 'href' => $uri['path'] . '/export', + 'options' => $uri['options'], + 'weight' => 30, + ); + } + return $operations; + } + +} diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php index dc76288..bbca069 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php @@ -21,9 +21,10 @@ * module = "config_test", * controllers = { * "storage" = "Drupal\config_test\ConfigTestStorageController", - * "list" = "Drupal\Core\Config\Entity\ConfigEntityListController", + * "list" = "Drupal\config_test\ConfigTestListController", * "form" = { * "default" = "Drupal\config_test\ConfigTestFormController", + * "export" = "Drupal\Core\Config\Entity\ConfigEntityExportForm", * "delete" = "Drupal\config_test\Form\ConfigTestDeleteForm" * }, * "access" = "Drupal\config_test\ConfigTestAccessController" diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/ContentTranslationViewsUITest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/ContentTranslationViewsUITest.php index 5dbe880..4939059 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/ContentTranslationViewsUITest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/ContentTranslationViewsUITest.php @@ -40,7 +40,7 @@ public static function getInfo() { * Tests the views UI. */ public function testViewsUI() { - $this->drupalGet('admin/structure/views/view/test_view/edit'); + $this->drupalGet('admin/structure/views/view/test_view'); $this->assertTitle(t('@label (@table) | @site-name', array('@label' => 'Test view', '@table' => 'Views test data', '@site-name' => $this->container->get('config.factory')->get('system.site')->get('name')))); }