You are here

public function CommandHelperTest::testSearchIndexCommand in Search API 8

Tests searchIndexCommand.

@covers ::searchIndexCommand

File

tests/src/Kernel/System/CommandHelperTest.php, line 265

Class

CommandHelperTest
Tests Search API functionality that gets executed by console utilities.

Namespace

Drupal\Tests\search_api\Kernel\System

Code

public function testSearchIndexCommand() {
  $results = $this->systemUnderTest
    ->searchIndexCommand('test_index');
  $this
    ->assertNotEmpty($results);
  $this
    ->assertCount(2, $results);
  $results = $this->systemUnderTest
    ->searchIndexCommand('test_index', 'test');
  $this
    ->assertNotEmpty($results);
  $this
    ->assertCount(1, $results);
}