public function DefaultConfigEntityInstallationTest::testExtensionInstallation in Search API 8
Tests that installing config entities from an extension works correctly.
File
- tests/
src/ Kernel/ ConfigEntity/ DefaultConfigEntityInstallationTest.php, line 46
Class
- DefaultConfigEntityInstallationTest
- Tests that installing config entities from an extension works correctly.
Namespace
Drupal\Tests\search_api\Kernel\ConfigEntityCode
public function testExtensionInstallation() {
$this
->installConfig('search_api_test_inconsistent_config');
$index = Index::load('inconsistent_search_index');
$this
->assertNotNull($index);
$values = $index
->toArray();
// Make sure the index was not processed at all upon saving.
$this
->assertTrue($index
->status());
$this
->assertArrayNotHasKey('rendered_item', $values['processor_settings']);
$this
->assertArrayHasKey('unknown_property', $values['field_settings']);
$methods = $this
->getCalledMethods('processor');
$this
->assertNotContains('preIndexSave', $methods);
}