Loading core/modules/taxonomy/tests/src/Functional/ThemeTest.php +6 −6 Original line number Diff line number Diff line Loading @@ -19,10 +19,10 @@ protected function setUp(): void { // Make sure we are using distinct default and administrative themes for // the duration of these tests. \Drupal::service('theme_installer')->install(['bartik', 'seven']); \Drupal::service('theme_installer')->install(['olivero', 'claro']); $this->config('system.theme') ->set('default', 'bartik') ->set('admin', 'seven') ->set('default', 'olivero') ->set('admin', 'claro') ->save(); // Create and log in as a user who has permission to add and edit taxonomy Loading @@ -44,20 +44,20 @@ public function testTaxonomyTermThemes() { $this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/add'); // Check that the administrative theme's CSS appears on the page for adding // a taxonomy term. $this->assertSession()->responseContains('seven/css/base/elements.css'); $this->assertSession()->responseContains('claro/css/base/elements.css'); // Viewing a taxonomy term should use the default theme. $term = $this->createTerm($vocabulary); $this->drupalGet('taxonomy/term/' . $term->id()); // Check that the default theme's CSS appears on the page for viewing // a taxonomy term. $this->assertSession()->responseContains('bartik/css/base/elements.css'); $this->assertSession()->responseContains('olivero/css/base/base.css'); // Editing a taxonomy term should use the same theme as adding one. $this->drupalGet('taxonomy/term/' . $term->id() . '/edit'); // Check that the administrative theme's CSS appears on the page for editing // a taxonomy term. $this->assertSession()->responseContains('seven/css/base/elements.css'); $this->assertSession()->responseContains('claro/css/base/elements.css'); } } Loading
core/modules/taxonomy/tests/src/Functional/ThemeTest.php +6 −6 Original line number Diff line number Diff line Loading @@ -19,10 +19,10 @@ protected function setUp(): void { // Make sure we are using distinct default and administrative themes for // the duration of these tests. \Drupal::service('theme_installer')->install(['bartik', 'seven']); \Drupal::service('theme_installer')->install(['olivero', 'claro']); $this->config('system.theme') ->set('default', 'bartik') ->set('admin', 'seven') ->set('default', 'olivero') ->set('admin', 'claro') ->save(); // Create and log in as a user who has permission to add and edit taxonomy Loading @@ -44,20 +44,20 @@ public function testTaxonomyTermThemes() { $this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/add'); // Check that the administrative theme's CSS appears on the page for adding // a taxonomy term. $this->assertSession()->responseContains('seven/css/base/elements.css'); $this->assertSession()->responseContains('claro/css/base/elements.css'); // Viewing a taxonomy term should use the default theme. $term = $this->createTerm($vocabulary); $this->drupalGet('taxonomy/term/' . $term->id()); // Check that the default theme's CSS appears on the page for viewing // a taxonomy term. $this->assertSession()->responseContains('bartik/css/base/elements.css'); $this->assertSession()->responseContains('olivero/css/base/base.css'); // Editing a taxonomy term should use the same theme as adding one. $this->drupalGet('taxonomy/term/' . $term->id() . '/edit'); // Check that the administrative theme's CSS appears on the page for editing // a taxonomy term. $this->assertSession()->responseContains('seven/css/base/elements.css'); $this->assertSession()->responseContains('claro/css/base/elements.css'); } }