Same filename in this branch
- 10 core/modules/taxonomy/tests/src/Functional/ThemeTest.php
- 10 core/modules/system/tests/src/Functional/System/ThemeTest.php
- 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php
- 10 core/modules/system/tests/src/Kernel/Theme/ThemeTest.php
Same filename and directory in other branches
- 8.9.x core/modules/taxonomy/tests/src/Functional/ThemeTest.php
- 9 core/modules/taxonomy/tests/src/Functional/ThemeTest.php
Namespace
Drupal\Tests\taxonomy\Functional
File
core/modules/taxonomy/tests/src/Functional/ThemeTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\taxonomy\Functional;
class ThemeTest extends TaxonomyTestBase {
protected $defaultTheme = 'stark';
protected function setUp() : void {
parent::setUp();
\Drupal::service('theme_installer')
->install([
'olivero',
'claro',
]);
$this
->config('system.theme')
->set('default', 'olivero')
->set('admin', 'claro')
->save();
$admin_user = $this
->drupalCreateUser([
'administer taxonomy',
'view the administration theme',
]);
$this
->drupalLogin($admin_user);
}
public function testTaxonomyTermThemes() {
$vocabulary = $this
->createVocabulary();
$this
->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary
->id() . '/add');
$this
->assertSession()
->responseContains('claro/css/base/elements.css');
$term = $this
->createTerm($vocabulary);
$this
->drupalGet('taxonomy/term/' . $term
->id());
$this
->assertSession()
->responseContains('olivero/css/base/base.css');
$this
->drupalGet('taxonomy/term/' . $term
->id() . '/edit');
$this
->assertSession()
->responseContains('claro/css/base/elements.css');
}
}
Classes
Name |
Description |
ThemeTest |
Verifies that various taxonomy pages use the expected theme. |