public function CommandHelperTest::testSetIndexServerCommand in Search API 8
Tests setIndexServerCommand.
@covers ::setIndexServerCommand
File
- tests/
src/ Kernel/ System/ CommandHelperTest.php, line 358
Class
- CommandHelperTest
- Tests Search API functionality that gets executed by console utilities.
Namespace
Drupal\Tests\search_api\Kernel\SystemCode
public function testSetIndexServerCommand() {
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load('test_index');
$index
->setServer(NULL);
$index
->save();
$index = Index::load('test_index');
$this
->assertSame(NULL, $index
->getServerId());
$this->systemUnderTest
->setIndexServerCommand('test_index', 'test_server');
$index = Index::load('test_index');
$this
->assertSame('test_server', $index
->getServerId());
}