public function CommentFieldFilterTest::testFilters in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/comment/src/Tests/Views/CommentFieldFilterTest.php \Drupal\comment\Tests\Views\CommentFieldFilterTest::testFilters()
Tests body and title filters.
File
- core/
modules/ comment/ src/ Tests/ Views/ CommentFieldFilterTest.php, line 82 - Contains \Drupal\comment\Tests\Views\CommentFieldFilterTest.
Class
- CommentFieldFilterTest
- Tests comment field filters with translations.
Namespace
Drupal\comment\Tests\ViewsCode
public function testFilters() {
// Test the title filter page, which filters for title contains 'Comida'.
// Should show just the Spanish translation, once.
$this
->assertPageCounts('test-title-filter', array(
'es' => 1,
'fr' => 0,
'en' => 0,
), 'Comida title filter');
// Test the body filter page, which filters for body contains 'Comida'.
// Should show just the Spanish translation, once.
$this
->assertPageCounts('test-body-filter', array(
'es' => 1,
'fr' => 0,
'en' => 0,
), 'Comida body filter');
// Test the title Paris filter page, which filters for title contains
// 'Paris'. Should show each translation once.
$this
->assertPageCounts('test-title-paris', array(
'es' => 1,
'fr' => 1,
'en' => 1,
), 'Paris title filter');
// Test the body Paris filter page, which filters for body contains
// 'Paris'. Should show each translation once.
$this
->assertPageCounts('test-body-paris', array(
'es' => 1,
'fr' => 1,
'en' => 1,
), 'Paris body filter');
}