You are here

public function DependencyRemovalTest::dependencyTestDataProvider in Search API 8

Data provider for this class's test methods.

If $remove_dependency is TRUE, in Plugin::onDependencyRemoval() it clears its configuration (and thus its dependency, in those test plugins) and returns TRUE, which the index will take as "all OK, dependency removed" and leave the plugin where it is, only with updated configuration.

If $remove_dependency is FALSE, Plugin::onDependencyRemoval() will do nothing and just return FALSE, the index says "oh, that plugin still has that removed dependency, so I should better remove the plugin" and the plugin gets removed.

Return value

array An array of argument arrays for this class's test methods.

File

tests/src/Kernel/ConfigEntity/DependencyRemovalTest.php, line 460

Class

DependencyRemovalTest
Tests what happens when an index's or a server's dependencies are removed.

Namespace

Drupal\Tests\search_api\Kernel\ConfigEntity

Code

public function dependencyTestDataProvider() {
  return [
    'Remove dependency' => [
      TRUE,
    ],
    'Keep dependency' => [
      FALSE,
    ],
  ];
}