public function EntityReferenceFilterViewsResultTest::testFilterOptionsWithoutArguments in Views Reference Filter 8
Tests filter options with no arguments.
File
- tests/
src/ Functional/ Views/ EntityReferenceFilterViewsResultTest.php, line 17
Class
- EntityReferenceFilterViewsResultTest
- Tests entityreference filter behavior in views.
Namespace
Drupal\Tests\entityreference_filter\Functional\ViewsCode
public function testFilterOptionsWithoutArguments() {
$web_assert = $this
->assertSession();
$this
->drupalGet('test-view-no-args');
$web_assert
->statusCodeEquals('200');
$field_id = 'edit-field-taxonomy-reference-target-id-entityreference-filter';
$web_assert = $this
->assertSession();
$web_assert
->selectExists($field_id);
$web_assert
->optionExists($field_id, 'All');
$web_assert
->optionExists($field_id, '1');
$web_assert
->optionExists($field_id, '2');
$web_assert
->optionExists($field_id, '3');
$web_assert
->optionExists($field_id, '4');
$web_assert
->optionNotExists($field_id, '5');
$options = $this
->getOptions($field_id);
$this
->assertCount(5, $options);
}