public function ViewModeTest::hasOverridesTestDataProvider in Search API Pages 8
Data provider for the hasOverrides tests.
Return value
array The test data.
File
- tests/
src/ Unit/ ViewModeTest.php, line 173
Class
- ViewModeTest
- Class ViewModeTest.
Namespace
Drupal\Tests\search_api_page\UnitCode
public function hasOverridesTestDataProvider() {
$testData = [];
$testData['No configuration'] = [
'input' => [],
'dataSourceId' => 'entity:node',
'expected' => FALSE,
];
$testData['Unknown data source'] = [
'input' => [
'entity:taxonomy_term' => [
'overrides' => [
'tags' => 'full',
],
],
],
'dataSourceId' => 'entity:node',
'expected' => FALSE,
];
$testData['No overrides configured'] = [
'input' => [
'entity:node' => [
'overrides' => [],
],
],
'dataSourceId' => 'entity:node',
'expected' => FALSE,
];
$testData['No overrides'] = [
'input' => [
'entity:node' => [
'overrides' => [
'article' => '',
'page' => '',
],
],
],
'dataSourceId' => 'entity:node',
'expected' => FALSE,
];
$testData['Override present'] = [
'input' => [
'entity:node' => [
'overrides' => [
'article' => 'full',
'page' => '',
],
],
],
'dataSourceId' => 'entity:node',
'expected' => TRUE,
];
return $testData;
}