protected function setUp() { parent::setUp(); $this->mockStandardInstall(); ViewTestData::createTestViews(get_class($this), array('taxonomy_test_views')); $this->term1 = $this->createTerm(); $this->term2 = $this->createTerm(); $node = array(); $node['type'] = 'article'; $node['field_views_testing_tags'][]['target_id'] = $this->term1->id(); $node['field_views_testing_tags'][]['target_id'] = $this->term2->id(); $this->nodes[] = $this->drupalCreateNode($node); $this->nodes[] = $this->drupalCreateNode($node); }
/** * 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->id(), 'taxonomy/term/' . $this->term->id()); // Check each path in all available themes. foreach ($this->themes as $name => $theme) { $this->config('system.theme')->set('default', $name)->save(); foreach ($paths as $path) { $this->drupalGet($path); $this->assertResponse(200); $this->assertNoRaw($this->xssLabel); } } }