FivestarAjaxTestBase.php in Fivestar 8
File
tests/src/FunctionalJavascript/FivestarAjaxTestBase.php
View source
<?php
namespace Drupal\Tests\fivestar\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\Tests\fivestar\Traits\FivestarTestTrait;
abstract class FivestarAjaxTestBase extends WebDriverTestBase {
use FivestarTestTrait;
protected static $modules = [
'node',
'fivestar',
'votingapi',
];
protected $defaultTheme = 'classy';
protected $displayRepository;
protected $adminUser;
protected $voterUser;
protected function setUp() {
parent::setUp();
$this
->drupalCreateContentType([
'type' => 'test_node_type',
'name' => 'Rated content type',
]);
$this->displayRepository = \Drupal::service('entity_display.repository');
$this->adminUser = $this
->createUser([
'create test_node_type content',
'rate content',
]);
$this->voterUser = $this
->createUser([
'rate content',
]);
}
}