public function ViewsPropertyExtractionTest::propertyExtractionDataProvider in Search API 8
Provides test data for the property extraction test.
Return value
array[] Array of argument lists for testPropertyExtraction().
See also
\Drupal\Tests\search_api\Kernel\Views\ViewsPropertyExtractionTest::testPropertyExtraction()
File
- tests/
src/ Kernel/ Views/ ViewsPropertyExtractionTest.php, line 223
Class
- ViewsPropertyExtractionTest
- Tests whether Views pages correctly create search display plugins.
Namespace
Drupal\Tests\search_api\Kernel\ViewsCode
public function propertyExtractionDataProvider() {
return [
'extract normal property' => [
'entity:user/name',
'Test user',
],
'use normal property' => [
'entity:user/name',
'Pre-set',
TRUE,
],
'extract processor property' => [
'property1',
'Processor 1',
],
'use processor property' => [
'property1',
'Pre-set',
TRUE,
],
'extract configurable property' => [
'entity:user/property2',
'Override',
],
'use configurable property' => [
'entity:user/property2',
'Pre-set',
TRUE,
],
'use overridden configurable property' => [
'entity:user/property2',
'Processor 2',
FALSE,
FALSE,
],
'highlighted property 1' => [
'entity:user/name',
'<strong>Highlighted</strong> value',
FALSE,
TRUE,
TRUE,
],
'highlighted property 2' => [
'entity:user/name',
'<strong>Highlighted</strong> value',
TRUE,
TRUE,
TRUE,
],
'highlighted processor property 1' => [
'property1',
'<strong>Highlighted</strong> value',
FALSE,
TRUE,
TRUE,
],
'highlighted processor property 2' => [
'property1',
'<strong>Highlighted</strong> value',
TRUE,
TRUE,
TRUE,
],
'highlighted configurable property 1' => [
'entity:user/property2',
'<strong>Highlighted</strong> value',
FALSE,
TRUE,
TRUE,
],
'highlighted configurable property 2' => [
'entity:user/property2',
'<strong>Highlighted</strong> value',
TRUE,
TRUE,
TRUE,
],
'multi-value highlighting 1' => [
'property1',
[
'<strong>Highlighted</strong> value',
'Other value',
],
FALSE,
TRUE,
TRUE,
[
'Highlighted value',
'Other value',
],
],
'multi-value highlighting 2' => [
'property1',
[
'Other value',
'<strong>Highlighted</strong> value',
],
FALSE,
TRUE,
TRUE,
[
'Other value',
'Highlighted value',
],
],
'multi-value highlighting 3' => [
'property1',
[
'Other value',
'<strong>Highlighted</strong> value',
],
FALSE,
TRUE,
TRUE,
[
'Other value',
'Foobar',
],
],
];
}