function SearchMatchTest::getText2
Same name in other branches
- 8.9.x core/modules/search/tests/src/Kernel/SearchMatchTest.php \Drupal\Tests\search\Kernel\SearchMatchTest::getText2()
- 10 core/modules/search/tests/src/Kernel/SearchMatchTest.php \Drupal\Tests\search\Kernel\SearchMatchTest::getText2()
- 11.x core/modules/search/tests/src/Kernel/SearchMatchTest.php \Drupal\Tests\search\Kernel\SearchMatchTest::getText2()
_test2_: Helper method for generating snippets of content.
Generated items to test against: 8 dear 9 king philip 10 philip came over 11 came over from germany 12 over from germany swimming
1 call to SearchMatchTest::getText2()
- SearchMatchTest::_setup in core/
modules/ search/ tests/ src/ Kernel/ SearchMatchTest.php - Set up a small index of items to test against.
File
-
core/
modules/ search/ tests/ src/ Kernel/ SearchMatchTest.php, line 99
Class
- SearchMatchTest
- Indexes content and queries it.
Namespace
Drupal\Tests\search\KernelCode
public function getText2($n) {
$words = explode(' ', "Dear King Philip came over from Germany swimming.");
return implode(' ', array_slice($words, $n - 1, $n));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.