You are here

public function EvaTest::testEvaOnPage in EVA: Entity Views Attachment 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/EvaTest.php \Drupal\Tests\eva\Functional\EvaTest::testEvaOnPage()

Assert that the Eva of Articles appears on a Page.

File

tests/src/Functional/EvaTest.php, line 15

Class

EvaTest
Preliminary tests for Eva.

Namespace

Drupal\Tests\eva\Functional

Code

public function testEvaOnPage() {
  $assert = $this
    ->assertSession();
  $this
    ->drupalGet('/node/' . $this->nids['just_eva']);
  $assert
    ->statusCodeEquals(200);
  $this
    ->assertEquals($this->articleCount, \count($this
    ->xpath('//div[contains(@class, "view-eva")]//div[contains(@class, "views-row")]')), sprintf('Found %d articles in Eva.', $this->articleCount));
}