コード例 #1
0
ファイル: FulltextTest.php プロジェクト: nja78/magento2
 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();
 }