diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 7613e23..c65ba3b 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2417,8 +2417,6 @@ function template_preprocess_maintenance_page(&$variables) { // These are usually added from system_page_build() except maintenance.css. // When the database is inactive it's not called so we add it here. $default_css['library'][] = array('core', 'normalize'); - $default_css['library'][] = array('system', 'base'); - $default_css['library'][] = array('system', 'admin'); $default_css['library'][] = array('system', 'maintenance'); $attached = array('#attached' => $default_css); drupal_render($attached); diff --git a/core/modules/block/block.libraries.yml b/core/modules/block/block.libraries.yml index 20a5ce9..e0ef44c 100644 --- a/core/modules/block/block.libraries.yml +++ b/core/modules/block/block.libraries.yml @@ -16,3 +16,4 @@ drupal.block.admin: dependencies: - core/jquery - core/drupal + - core/drupal.ajax diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderElementTypesTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderElementTypesTest.php index 4b22a29..56b8aee 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderElementTypesTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderElementTypesTest.php @@ -12,12 +12,20 @@ use Drupal\Component\Utility\Xss; use Drupal\Core\Language\Language; use Drupal\Core\Template\Attribute; -use Drupal\simpletest\WebTestBase; +use Drupal\simpletest\DrupalUnitTestBase; /** * Tests the markup of core render element types passed to drupal_render(). */ -class RenderElementTypesTest extends WebTestBase { +class RenderElementTypesTest extends DrupalUnitTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('system'); + public static function getInfo() { return array( 'name' => 'Render element types', @@ -26,6 +34,12 @@ public static function getInfo() { ); } + protected function setUp() { + parent::setUp(); + $this->installConfig(array('system')); + $this->container->get('theme_handler')->enable(array('stark')); + } + /** * Asserts that an array of elements is rendered properly. * @@ -173,11 +187,9 @@ function testMaintenancePage() { $path = drupal_get_path('module', 'system'); $default_css = array( '#attached' => array( - 'css' => array( - $path . '/css/system.module.css', - $path . '/css/system.admin.css', - $path . '/css/system.maintenance.css', - $path . '/css/system.theme.css', + 'library' => array( + array('core', 'normalize'), + array('system', 'maintenance'), ), ), ); @@ -230,7 +242,7 @@ function testMaintenancePage() { ); // We have to reset drupal_add_css between each test. - drupal_static_reset('_drupal_add_css'); + drupal_static_reset(); // Test basic string for maintenance page content. $elements = array( @@ -248,7 +260,7 @@ function testMaintenancePage() { $this->assertElements($elements); // Test render array for maintenance page content. - drupal_static_reset('_drupal_add_css'); + drupal_static_reset(); $elements[0]['name'] = "#theme 'maintenance_page' with content as a render array"; $elements[0]['value']['#content'] = array('#markup' => 'foo'); $this->assertElements($elements);