/**
* Tests libraries-override.
*/
public function testStylesheets() { $this->themeInstaller->
install(['test_basetheme', 'test_subtheme'
]);
$this->
config('system.theme'
) ->
set('default', 'test_subtheme'
) ->
save();
$base =
$this->
getThemePath('test_basetheme'
);
$sub =
$this->
getThemePath('test_subtheme'
) . '/css';
// All removals are expected to be based on a file's path and name and
// should work nevertheless.
$this->
drupalGet('theme-test/info/stylesheets'
);
$this->
assertSession()->
elementsCount('xpath', '//link[contains(@href, "' .
$base . '/base-add.css")]', 1
);
$this->
assertSession()->
elementNotExists('xpath', '//link[contains(@href, "base-remove.css")]'
);
$this->
assertSession()->
elementsCount('xpath', '//link[contains(@href, "' .
$sub . '/sub-add.css")]', 1
);
$this->
assertSession()->
elementNotExists('xpath', '//link[contains(@href, "sub-remove.css")]'
);