public function testExecuteFull() { $stores = [0 => 'Store 1', 1 => 'Store 2']; $indexData = new \ArrayObject([]); $this->storeManager->expects($this->once())->method('getStores')->willReturn($stores); $this->saveHandler->expects($this->exactly(count($stores)))->method('cleanIndex'); $this->saveHandler->expects($this->exactly(count($stores)))->method('saveIndex'); $this->fullAction->expects($this->exactly(count($stores)))->method('rebuildStoreIndex')->willReturn($indexData); $this->fulltextResource->expects($this->once())->method('resetSearchResults'); $this->searchRequestConfig->expects($this->once())->method('reset'); $this->model->executeFull(); }