public function ViewsExposedGroupsTestBase::assertViewsTableResultCount in Views exposed groups 3.0.x
Asserts the number of table rows in the rendered view.
Parameters
int $expected: The expected number of rows.
string $message: A message to use.
string $group: The assertion group.
1 call to ViewsExposedGroupsTestBase::assertViewsTableResultCount()
- ViewsExposedGroupsUiTest::testViewsUi in tests/
src/ Functional/ ViewsExposedGroupsUiTest.php - Asserts that the a user can group exposed forms.
File
- tests/
src/ Functional/ ViewsExposedGroupsTestBase.php, line 109
Class
- ViewsExposedGroupsTestBase
- Base test class for views_exposed_groups module tests.
Namespace
Drupal\Tests\views_exposed_groups\FunctionalCode
public function assertViewsTableResultCount($expected = 0, $message = '', $group = 'Browser') {
$message = $message ? $message : 'Found the correct number of views results in the table display.';
$rows = $this
->xpath('//table[contains(@class, :class)]/tbody/tr', [
':class' => 'views-table',
]);
$this
->assertEquals($expected, count($rows), $message, $group);
}