protected function FivestarAjaxTestBase::setUp in Fivestar 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ FunctionalJavascript/ FivestarAjaxTestBase.php, line 50
Class
- FivestarAjaxTestBase
- Test base for the Fivestar module.
Namespace
Drupal\Tests\fivestar\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
// Create content type for testing.
$this
->drupalCreateContentType([
'type' => 'test_node_type',
'name' => 'Rated content type',
]);
/** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $displayRepository */
$this->displayRepository = \Drupal::service('entity_display.repository');
// Create users with different permissions.
$this->adminUser = $this
->createUser([
'create test_node_type content',
'rate content',
]);
$this->voterUser = $this
->createUser([
'rate content',
]);
}