Loading core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Drupal\Tests\block\Traits\BlockCreationTrait; /** * Tests that the new default theme gets blocks. * Tests that a new default theme gets blocks. * * @group block */ Loading @@ -23,7 +23,7 @@ class NewDefaultThemeBlocksTest extends KernelTestBase { ]; /** * Check the enabled Bartik blocks are correctly copied over. * Check the blocks are correctly copied by block_themes_installed(). */ public function testNewDefaultThemeBlocks() { $this->installConfig(['system']); Loading @@ -44,8 +44,8 @@ public function testNewDefaultThemeBlocks() { 'id' => $default_theme . '_' . strtolower($this->randomMachineName(8)), ]); // Install a different theme. $new_theme = 'bartik'; // Install a different theme that does not have blocks. $new_theme = 'test_theme'; // The new theme is different from the previous default theme. $this->assertNotEquals($new_theme, $default_theme); Loading @@ -69,7 +69,7 @@ public function testNewDefaultThemeBlocks() { foreach ($default_block_names as $default_block_name) { // Remove the matching block from the list of blocks in the new theme. // E.g., if the old theme has block.block.stark_admin, // unset block.block.bartik_admin. // unset block.block.olivero_admin. unset($new_blocks[str_replace($default_theme . '_', $new_theme . '_', $default_block_name)]); } $this->assertEmpty($new_blocks); Loading core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public function testImageAltFunctionality() { // Test using alt directly with alt attribute. $image_with_alt_property = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Regular alt', '#title' => 'Test title', '#width' => '50%', Loading @@ -202,7 +202,7 @@ public function testImageAltFunctionality() { // Test using alt attribute inside attributes. $image_with_alt_attribute_alt_attribute = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#width' => '50%', '#height' => '50%', '#attributes' => [ Loading @@ -220,7 +220,7 @@ public function testImageAltFunctionality() { // Test using alt attribute as property and inside attributes. $image_with_alt_attribute_both = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#width' => '50%', '#height' => '50%', '#alt' => 'Kitten sustainable', Loading core/modules/system/tests/modules/common_test/common_test.module +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { * Same as common_test_drupal_alter_alter(), but here, we verify that themes * can also alter and come last. */ function bartik_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { function olivero_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { // Alter first argument. if (is_array($data)) { $data['foo'] .= ' theme'; Loading core/modules/system/tests/src/Functional/Batch/PageTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -29,10 +29,10 @@ class PageTest extends BrowserTestBase { public function testBatchProgressPageTheme() { // Make sure that the page which starts the batch (an administrative page) // is using a different theme than would normally be used by the batch API. $this->container->get('theme_installer')->install(['seven', 'bartik']); $this->container->get('theme_installer')->install(['claro', 'olivero']); $this->config('system.theme') ->set('default', 'bartik') ->set('admin', 'seven') ->set('default', 'olivero') ->set('admin', 'claro') ->save(); // Log in as an administrator who can see the administrative theme. Loading @@ -45,7 +45,7 @@ public function testBatchProgressPageTheme() { $this->drupalGet('admin/batch-test/test-theme'); // The stack should contain the name of the theme used on the progress // page. $this->assertEquals(['seven'], batch_test_stack(), 'A progressive batch correctly uses the theme of the page that started the batch.'); $this->assertEquals(['claro'], batch_test_stack(), 'A progressive batch correctly uses the theme of the page that started the batch.'); } /** Loading core/modules/system/tests/src/Functional/Common/AlterTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -27,10 +27,10 @@ class AlterTest extends BrowserTestBase { * Tests if the theme has been altered. */ public function testDrupalAlter() { // This test depends on Bartik, so make sure that it is always the current // This test depends on Olivero, so make sure that it is always the current // active theme. \Drupal::service('theme_installer')->install(['bartik']); \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('bartik')); \Drupal::service('theme_installer')->install(['olivero']); \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('olivero')); $array = ['foo' => 'bar']; $entity = new \stdClass(); Loading Loading
core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Drupal\Tests\block\Traits\BlockCreationTrait; /** * Tests that the new default theme gets blocks. * Tests that a new default theme gets blocks. * * @group block */ Loading @@ -23,7 +23,7 @@ class NewDefaultThemeBlocksTest extends KernelTestBase { ]; /** * Check the enabled Bartik blocks are correctly copied over. * Check the blocks are correctly copied by block_themes_installed(). */ public function testNewDefaultThemeBlocks() { $this->installConfig(['system']); Loading @@ -44,8 +44,8 @@ public function testNewDefaultThemeBlocks() { 'id' => $default_theme . '_' . strtolower($this->randomMachineName(8)), ]); // Install a different theme. $new_theme = 'bartik'; // Install a different theme that does not have blocks. $new_theme = 'test_theme'; // The new theme is different from the previous default theme. $this->assertNotEquals($new_theme, $default_theme); Loading @@ -69,7 +69,7 @@ public function testNewDefaultThemeBlocks() { foreach ($default_block_names as $default_block_name) { // Remove the matching block from the list of blocks in the new theme. // E.g., if the old theme has block.block.stark_admin, // unset block.block.bartik_admin. // unset block.block.olivero_admin. unset($new_blocks[str_replace($default_theme . '_', $new_theme . '_', $default_block_name)]); } $this->assertEmpty($new_blocks); Loading
core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public function testImageAltFunctionality() { // Test using alt directly with alt attribute. $image_with_alt_property = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Regular alt', '#title' => 'Test title', '#width' => '50%', Loading @@ -202,7 +202,7 @@ public function testImageAltFunctionality() { // Test using alt attribute inside attributes. $image_with_alt_attribute_alt_attribute = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#width' => '50%', '#height' => '50%', '#attributes' => [ Loading @@ -220,7 +220,7 @@ public function testImageAltFunctionality() { // Test using alt attribute as property and inside attributes. $image_with_alt_attribute_both = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#width' => '50%', '#height' => '50%', '#alt' => 'Kitten sustainable', Loading
core/modules/system/tests/modules/common_test/common_test.module +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { * Same as common_test_drupal_alter_alter(), but here, we verify that themes * can also alter and come last. */ function bartik_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { function olivero_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { // Alter first argument. if (is_array($data)) { $data['foo'] .= ' theme'; Loading
core/modules/system/tests/src/Functional/Batch/PageTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -29,10 +29,10 @@ class PageTest extends BrowserTestBase { public function testBatchProgressPageTheme() { // Make sure that the page which starts the batch (an administrative page) // is using a different theme than would normally be used by the batch API. $this->container->get('theme_installer')->install(['seven', 'bartik']); $this->container->get('theme_installer')->install(['claro', 'olivero']); $this->config('system.theme') ->set('default', 'bartik') ->set('admin', 'seven') ->set('default', 'olivero') ->set('admin', 'claro') ->save(); // Log in as an administrator who can see the administrative theme. Loading @@ -45,7 +45,7 @@ public function testBatchProgressPageTheme() { $this->drupalGet('admin/batch-test/test-theme'); // The stack should contain the name of the theme used on the progress // page. $this->assertEquals(['seven'], batch_test_stack(), 'A progressive batch correctly uses the theme of the page that started the batch.'); $this->assertEquals(['claro'], batch_test_stack(), 'A progressive batch correctly uses the theme of the page that started the batch.'); } /** Loading
core/modules/system/tests/src/Functional/Common/AlterTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -27,10 +27,10 @@ class AlterTest extends BrowserTestBase { * Tests if the theme has been altered. */ public function testDrupalAlter() { // This test depends on Bartik, so make sure that it is always the current // This test depends on Olivero, so make sure that it is always the current // active theme. \Drupal::service('theme_installer')->install(['bartik']); \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('bartik')); \Drupal::service('theme_installer')->install(['olivero']); \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('olivero')); $array = ['foo' => 'bar']; $entity = new \stdClass(); Loading