protected function NodeVoteTrait::voteFivestar in Rate 8.2
Same name and namespace in other branches
- 8 tests/src/Traits/NodeVoteTrait.php \Drupal\Tests\rate\Traits\NodeVoteTrait::voteFivestar()
Vote Fivestar for the single node.
Parameters
int $stars: The number of stars vote (from 1 to 5).
File
- tests/
src/ Traits/ NodeVoteTrait.php, line 45
Class
- NodeVoteTrait
- Provides methods to voting on nodes.
Namespace
Drupal\Tests\rate\TraitsCode
protected function voteFivestar($stars) {
$this
->assertSession()
->elementExists('css', '.rate-widget-fivestar');
$this
->click('.rate-fivestar-' . $stars);
}