public function CommandHelperTest::testResetTrackerCommand in Search API 8
Tests resetTrackerCommand.
@covers ::resetTrackerCommand
File
- tests/
src/ Kernel/ System/ CommandHelperTest.php, line 250
Class
- CommandHelperTest
- Tests Search API functionality that gets executed by console utilities.
Namespace
Drupal\Tests\search_api\Kernel\SystemCode
public function testResetTrackerCommand() {
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load('test_index');
$this
->assertSame(5, $index
->getTrackerInstance()
->getIndexedItemsCount());
$this
->assertSame(5, $index
->getTrackerInstance()
->getTotalItemsCount());
$this->systemUnderTest
->resetTrackerCommand([
'test_index',
]);
$this
->assertSame(0, $index
->getTrackerInstance()
->getIndexedItemsCount());
$this
->assertSame(5, $index
->getTrackerInstance()
->getTotalItemsCount());
}