Checks each themed entity for XSS filtering in available themes.
function testThemedEntity() {
// Check paths where various view modes of the entities are rendered.
$paths = array(
'user',
'node',
'node/' . $this->node->nid,
'taxonomy/term/' . $this->term
->id(),
);
// Check each path in all available themes.
foreach ($this->themes as $theme) {
config('system.theme')
->set('default', $theme)
->save();
foreach ($paths as $path) {
$this
->drupalGet($path);
$this
->assertResponse(200);
$this
->assertNoRaw($this->xss_label);
}
}
}