public function CommandHelperTest::testDisableIndexCommand in Search API 8
Tests the disable index command.
@covers ::disableIndexCommand
File
- tests/
src/ Kernel/ System/ CommandHelperTest.php, line 217
Class
- CommandHelperTest
- Tests Search API functionality that gets executed by console utilities.
Namespace
Drupal\Tests\search_api\Kernel\SystemCode
public function testDisableIndexCommand() {
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load('test_index');
$this
->assertTrue($index
->status());
$this->systemUnderTest
->disableIndexCommand([
'test_index',
]);
$index = Index::load('test_index');
$this
->assertFalse($index
->status());
$this
->expectException(ConsoleException::class);
$this->systemUnderTest
->disableIndexCommand([
'foo',
]);
}