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