Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FileSystemReaderTest.php
Go to the documentation of this file.
1 <?php
7 
8 class FileSystemReaderTest extends \PHPUnit\Framework\TestCase
9 {
11  protected $object;
12 
13  protected function setUp()
14  {
16  \Magento\Framework\Search\Request\Config\FileResolverStub::class
17  );
19  \Magento\Framework\Search\Request\Config\FilesystemReader::class,
20  ['fileResolver' => $fileResolver]
21  );
22  }
23 
24  public function testRead()
25  {
26  $result = $this->object->read();
27  // Filter values added by \Magento\CatalogSearch\Model\Search\ReaderPlugin
28  $result = array_intersect_key($result, array_flip(['bool_query', 'filter_query', 'new_match_query']));
29  $expected = include __DIR__ . '/../../_files/search_request_merged.php';
30  $this->assertEquals($expected, $result);
31  }
32 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60