function LegacyStyleSheetsRemoveTest::testStyleSheetsRemove
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Theme/LegacyStyleSheetsRemoveTest.php \Drupal\Tests\system\Functional\Theme\LegacyStyleSheetsRemoveTest::testStyleSheetsRemove()
Tests the stylesheets-remove key.
@expectedDeprecation The theme info key stylesheets-remove implemented by theme test_legacy_stylesheets_remove is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/2497313
Throws
\Behat\Mink\Exception\ExpectationException
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ LegacyStyleSheetsRemoveTest.php, line 30
Class
- LegacyStyleSheetsRemoveTest
- Tests the legacy stylesheets-remove key.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testStyleSheetsRemove() {
\Drupal::configFactory()->getEditable('system.theme')
->set('default', 'classy')
->save();
$this->drupalGet('<front>');
$this->assertSession()
->responseContains('css/components/action-links.css?');
$this->assertSession()
->responseContains('css/components/breadcrumb.css?');
\Drupal::configFactory()->getEditable('system.theme')
->set('default', 'test_legacy_stylesheets_remove')
->save();
$this->drupalGet('<front>');
$this->assertSession()
->responseNotContains('css/components/action-links.css?');
$this->assertSession()
->responseContains('css/components/breadcrumb.css?');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.