public function testPostPopulate() { $indexConfig = new IndexConfig('index', array(), array('useAlias' => true)); $index = $this->mockIndex('index', $indexConfig); $this->aliasProcessor->expects($this->once())->method('switchIndexAlias')->with($indexConfig, $index); $this->resetter->postPopulate('index'); }
/** * Refreshes an index. * * @param OutputInterface $output * @param string $index * @param bool $postPopulate */ private function refreshIndex(OutputInterface $output, $index, $postPopulate = true) { if ($postPopulate) { $this->resetter->postPopulate($index); } $output->writeln(sprintf('<info>Refreshing</info> <comment>%s</comment>', $index)); $this->indexManager->getIndex($index)->refresh(); }