public function ViewsExposedGroupsExposedOperatorTest::testExposedOperator in Views exposed groups 7.2
Asserts that a filter with an exposed operator behaves correctly.
File
- tests/
views_exposed_groups_op.test, line 64 - Views Exposed Groups Exposed Operator Test.
Class
- ViewsExposedGroupsExposedOperatorTest
- Tests a view with exposed groups that also has exposed operators.
Code
public function testExposedOperator() {
$view_path = $this->defaultView
->get_path();
$this
->drupalLogin($this->unprivilegedUser);
$this
->drupalGet($view_path);
// Asserts that the exposed filter with an exposed operator exists.
$this
->assertFieldByName('title_op');
$this
->assertFieldByName('title');
$fieldset_legend = $this
->xpath('//fieldset/legend/span[text()="Title"]');
$this
->assertEqual(1, count($fieldset_legend), 'Found the exposed filter label as the fieldset legend.');
}