public function BetterExposedFiltersHelperUnitTest::providerTestSortNestedOptions in Better Exposed Filters 8.4
Same name and namespace in other branches
- 8.5 tests/src/Unit/BetterExposedFiltersHelperUnitTest.php \Drupal\Tests\better_exposed_filters\Unit\BetterExposedFiltersHelperUnitTest::providerTestSortNestedOptions()
Data provider for ::testSortNestedOptions.
File
- tests/
src/ Unit/ BetterExposedFiltersHelperUnitTest.php, line 295
Class
- BetterExposedFiltersHelperUnitTest
- Tests the helper functions for better exposed filters.
Namespace
Drupal\Tests\better_exposed_filters\UnitCode
public function providerTestSortNestedOptions() {
// Data providers run before ::setUp. We rely on the stringTranslationTrait
// for some of our option values so call it here instead.
$this->stringTranslation = $this
->getStringTranslationStub();
$data = [];
// List of nested taxonomy terms.
$data[] = [
[
(object) [
'option' => [
2303 => 'United States',
],
],
(object) [
'option' => [
2311 => '-Washington',
],
],
(object) [
'option' => [
2312 => '--Seattle',
],
],
(object) [
'option' => [
2313 => '--Spokane',
],
],
(object) [
'option' => [
2314 => '--Walla Walla',
],
],
(object) [
'option' => [
2304 => '-California',
],
],
(object) [
'option' => [
2307 => '--Santa Barbara',
],
],
(object) [
'option' => [
2306 => '--San Diego',
],
],
(object) [
'option' => [
2305 => '--San Francisco',
],
],
(object) [
'option' => [
2308 => '-Oregon',
],
],
(object) [
'option' => [
2310 => '--Eugene',
],
],
(object) [
'option' => [
2309 => '--Portland',
],
],
(object) [
'option' => [
2324 => 'Mexico',
],
],
(object) [
'option' => [
2315 => 'Canada',
],
],
(object) [
'option' => [
2316 => '-British Columbia',
],
],
(object) [
'option' => [
2319 => '--Whistler',
],
],
(object) [
'option' => [
2317 => '--Vancouver',
],
],
(object) [
'option' => [
2318 => '--Victoria',
],
],
(object) [
'option' => [
2320 => '-Alberta',
],
],
(object) [
'option' => [
2321 => '--Calgary',
],
],
(object) [
'option' => [
2323 => '--Lake Louise',
],
],
(object) [
'option' => [
2322 => '--Edmonton',
],
],
],
[
(object) [
'option' => [
2315 => 'Canada',
],
],
(object) [
'option' => [
2320 => '-Alberta',
],
],
(object) [
'option' => [
2321 => '--Calgary',
],
],
(object) [
'option' => [
2322 => '--Edmonton',
],
],
(object) [
'option' => [
2323 => '--Lake Louise',
],
],
(object) [
'option' => [
2316 => '-British Columbia',
],
],
(object) [
'option' => [
2317 => '--Vancouver',
],
],
(object) [
'option' => [
2318 => '--Victoria',
],
],
(object) [
'option' => [
2319 => '--Whistler',
],
],
(object) [
'option' => [
2324 => 'Mexico',
],
],
(object) [
'option' => [
2303 => 'United States',
],
],
(object) [
'option' => [
2304 => '-California',
],
],
(object) [
'option' => [
2306 => '--San Diego',
],
],
(object) [
'option' => [
2305 => '--San Francisco',
],
],
(object) [
'option' => [
2307 => '--Santa Barbara',
],
],
(object) [
'option' => [
2308 => '-Oregon',
],
],
(object) [
'option' => [
2310 => '--Eugene',
],
],
(object) [
'option' => [
2309 => '--Portland',
],
],
(object) [
'option' => [
2311 => '-Washington',
],
],
(object) [
'option' => [
2312 => '--Seattle',
],
],
(object) [
'option' => [
2313 => '--Spokane',
],
],
(object) [
'option' => [
2314 => '--Walla Walla',
],
],
],
];
return $data;
}