Loading core/modules/block/tests/src/Functional/BlockAdminThemeTest.php +5 −5 Changes for core/modules/block/tests/src/Functional/BlockAdminThemeTest.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public function testAdminTheme(): void { } /** * Ensure contextual links are disabled in Claro theme. * Ensure contextual links are disabled in Admin theme. */ public function testClaroAdminTheme(): void { public function testAdminAdminTheme(): void { // Create administrative user. $admin_user = $this->drupalCreateUser([ 'access administration pages', Loading @@ -64,14 +64,14 @@ public function testClaroAdminTheme(): void { $this->drupalLogin($admin_user); // Install admin theme and confirm that tab is accessible. \Drupal::service('theme_installer')->install(['claro']); $edit['admin_theme'] = 'claro'; \Drupal::service('theme_installer')->install(['default_admin']); $edit['admin_theme'] = 'default_admin'; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Define our block settings. $settings = [ 'theme' => 'claro', 'theme' => 'default_admin', 'region' => 'header', ]; Loading core/modules/block/tests/src/Functional/BlockDemoTest.php +1 −1 Changes for core/modules/block/tests/src/Functional/BlockDemoTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public function testBlockDemo(): void { // All available themes in core. $available_themes = [ 'claro', 'default_admin', 'stark', ]; Loading core/modules/block/tests/src/Functional/BlockTest.php +5 −5 Changes for core/modules/block/tests/src/Functional/BlockTest.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ public function testBlock(): void { public function testBlockThemeSelector(): void { // Install all themes. $themes = [ 'claro', 'default_admin', 'stark', ]; \Drupal::service('theme_installer')->install($themes); Loading Loading @@ -554,14 +554,14 @@ public function testUninstallTheme(): void { /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ $theme_installer = \Drupal::service('theme_installer'); $theme_installer->install(['claro']); $this->config('system.theme')->set('default', 'claro')->save(); $block = $this->drupalPlaceBlock('system_powered_by_block', ['theme' => 'claro', 'region' => 'help']); $theme_installer->install(['default_admin']); $this->config('system.theme')->set('default', 'default_admin')->save(); $block = $this->drupalPlaceBlock('system_powered_by_block', ['theme' => 'default_admin', 'region' => 'help']); $this->drupalGet('<front>'); $this->assertSession()->pageTextContains('Powered by Drupal'); $this->config('system.theme')->set('default', 'stark')->save(); $theme_installer->uninstall(['claro']); $theme_installer->uninstall(['default_admin']); // Ensure that the block configuration does not exist anymore. $this->assertNull(Block::load($block->id())); Loading core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php +2 −2 Changes for core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class BlockAddTest extends WebDriverTestBase { * Tests the AJAX for the theme selector. */ public function testBlockAddThemeSelector(): void { \Drupal::service('theme_installer')->install(['claro']); \Drupal::service('theme_installer')->install(['default_admin']); $this->drupalLogin($this->drupalCreateUser([ 'administer blocks', Loading @@ -41,7 +41,7 @@ public function testBlockAddThemeSelector(): void { $this->drupalGet('admin/structure/block/add/system_powered_by_block'); $assert_session = $this->assertSession(); // Pick a theme with a region that does not exist in another theme. $assert_session->selectExists('Theme')->selectOption('claro'); $assert_session->selectExists('Theme')->selectOption('default_admin'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->selectExists('Region')->selectOption('pre_content'); // Switch to a theme that doesn't contain the region selected above. Loading core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +2 −2 Changes for core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ public function testsBlockContentAddTypes(): void { ->getStorage('block_content'); // Install all themes. $themes = ['stark', 'claro']; $themes = ['stark', 'default_admin']; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach ($themes as $default_theme) { Loading Loading @@ -262,7 +262,7 @@ public function testsBlockContentAddTypes(): void { 'theme' => $theme, ])); $this->submitForm(['region' => 'content'], 'Save block'); $this->assertSession()->addressEquals(Url::fromRoute('block.admin_display_theme', ['theme' => $theme], ['query' => ['block-placement' => $theme . '-' . Html::getClass($edit['info[0][value]'])]])); $this->assertSession()->addressEquals(Url::fromRoute('block.admin_display_theme', ['theme' => $theme], ['query' => ['block-placement' => Html::getClass($theme . '-' . $edit['info[0][value]'])]])); } else { $this->fail('Could not load created block.'); Loading Loading
core/modules/block/tests/src/Functional/BlockAdminThemeTest.php +5 −5 Changes for core/modules/block/tests/src/Functional/BlockAdminThemeTest.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public function testAdminTheme(): void { } /** * Ensure contextual links are disabled in Claro theme. * Ensure contextual links are disabled in Admin theme. */ public function testClaroAdminTheme(): void { public function testAdminAdminTheme(): void { // Create administrative user. $admin_user = $this->drupalCreateUser([ 'access administration pages', Loading @@ -64,14 +64,14 @@ public function testClaroAdminTheme(): void { $this->drupalLogin($admin_user); // Install admin theme and confirm that tab is accessible. \Drupal::service('theme_installer')->install(['claro']); $edit['admin_theme'] = 'claro'; \Drupal::service('theme_installer')->install(['default_admin']); $edit['admin_theme'] = 'default_admin'; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Define our block settings. $settings = [ 'theme' => 'claro', 'theme' => 'default_admin', 'region' => 'header', ]; Loading
core/modules/block/tests/src/Functional/BlockDemoTest.php +1 −1 Changes for core/modules/block/tests/src/Functional/BlockDemoTest.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public function testBlockDemo(): void { // All available themes in core. $available_themes = [ 'claro', 'default_admin', 'stark', ]; Loading
core/modules/block/tests/src/Functional/BlockTest.php +5 −5 Changes for core/modules/block/tests/src/Functional/BlockTest.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ public function testBlock(): void { public function testBlockThemeSelector(): void { // Install all themes. $themes = [ 'claro', 'default_admin', 'stark', ]; \Drupal::service('theme_installer')->install($themes); Loading Loading @@ -554,14 +554,14 @@ public function testUninstallTheme(): void { /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ $theme_installer = \Drupal::service('theme_installer'); $theme_installer->install(['claro']); $this->config('system.theme')->set('default', 'claro')->save(); $block = $this->drupalPlaceBlock('system_powered_by_block', ['theme' => 'claro', 'region' => 'help']); $theme_installer->install(['default_admin']); $this->config('system.theme')->set('default', 'default_admin')->save(); $block = $this->drupalPlaceBlock('system_powered_by_block', ['theme' => 'default_admin', 'region' => 'help']); $this->drupalGet('<front>'); $this->assertSession()->pageTextContains('Powered by Drupal'); $this->config('system.theme')->set('default', 'stark')->save(); $theme_installer->uninstall(['claro']); $theme_installer->uninstall(['default_admin']); // Ensure that the block configuration does not exist anymore. $this->assertNull(Block::load($block->id())); Loading
core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php +2 −2 Changes for core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class BlockAddTest extends WebDriverTestBase { * Tests the AJAX for the theme selector. */ public function testBlockAddThemeSelector(): void { \Drupal::service('theme_installer')->install(['claro']); \Drupal::service('theme_installer')->install(['default_admin']); $this->drupalLogin($this->drupalCreateUser([ 'administer blocks', Loading @@ -41,7 +41,7 @@ public function testBlockAddThemeSelector(): void { $this->drupalGet('admin/structure/block/add/system_powered_by_block'); $assert_session = $this->assertSession(); // Pick a theme with a region that does not exist in another theme. $assert_session->selectExists('Theme')->selectOption('claro'); $assert_session->selectExists('Theme')->selectOption('default_admin'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->selectExists('Region')->selectOption('pre_content'); // Switch to a theme that doesn't contain the region selected above. Loading
core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +2 −2 Changes for core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ public function testsBlockContentAddTypes(): void { ->getStorage('block_content'); // Install all themes. $themes = ['stark', 'claro']; $themes = ['stark', 'default_admin']; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach ($themes as $default_theme) { Loading Loading @@ -262,7 +262,7 @@ public function testsBlockContentAddTypes(): void { 'theme' => $theme, ])); $this->submitForm(['region' => 'content'], 'Save block'); $this->assertSession()->addressEquals(Url::fromRoute('block.admin_display_theme', ['theme' => $theme], ['query' => ['block-placement' => $theme . '-' . Html::getClass($edit['info[0][value]'])]])); $this->assertSession()->addressEquals(Url::fromRoute('block.admin_display_theme', ['theme' => $theme], ['query' => ['block-placement' => Html::getClass($theme . '-' . $edit['info[0][value]'])]])); } else { $this->fail('Could not load created block.'); Loading