10 use Psr\Log\LoggerInterface;
42 private $engines = [];
56 $this->scopeConfig = $this->getMockBuilder(\
Magento\Framework\
App\Config\ScopeConfigInterface::class)
57 ->disableOriginalConstructor()
59 $this->loggerMock = $this->getMockBuilder(LoggerInterface::class)
60 ->getMockForAbstractClass();
62 $this->path =
'catalog/search/engine';
63 $this->scopeType =
'default';
64 $this->scopeCode =
null;
82 $engine =
'anotherengine';
84 $this->scopeConfig->expects($this->any())
86 ->willReturn($engine);
88 $this->assertEquals($engine, $this->model->getCurrentSearchEngine());
96 $engine =
'nonexistentengine';
98 $this->scopeConfig->expects($this->any())
100 ->willReturn($engine);
102 $this->loggerMock->expects($this->any())
105 $engine .
' search engine doesn\'t exists. Falling back to '
testGetCurrentSearchEngine()
const CATALOG_SEARCH_MYSQL_ENGINE
testGetCurrentSearchEngineWithoutEngine()