
| Current Path : /var/www/html/rocksensor1/web/core/modules/system/tests/src/Functional/Theme/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\system\Functional\Theme;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the multi theme engine support.
*
* @group Theme
*/
class EngineNyanCatTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['theme_test'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
\Drupal::service('theme_installer')->install(['test_theme_nyan_cat_engine']);
}
/**
* Ensures a theme's template is overridable based on the 'template' filename.
*/
public function testTemplateOverride(): void {
$this->config('system.theme')
->set('default', 'test_theme_nyan_cat_engine')
->save();
$this->drupalGet('theme-test/template-test');
$this->assertSession()->pageTextContains('Success: Template overridden with Nyan Cat theme. All of them');
}
}