fix autocomplete search no full-text

This commit is contained in:
Yuri Kuznetsov
2022-05-09 16:03:54 +03:00
parent 7758e20224
commit ba3bbfc097
2 changed files with 34 additions and 14 deletions
@@ -33,10 +33,10 @@ use Espo\Core\Record\SearchParamsFetcher;
use Espo\Core\Api\RequestWrapper;
use Espo\Core\Utils\Config;
use Espo\Core\Select\Text\MetadataProvider as TextMetadataProvider;
use Slim\Psr7\Factory\RequestFactory;
class SearchParamsFetcherTest extends \PHPUnit\Framework\TestCase
{
private $config;
@@ -44,6 +44,7 @@ class SearchParamsFetcherTest extends \PHPUnit\Framework\TestCase
protected function setUp(): void
{
$this->config = $this->createMocK(Config::class);
$this->textMetadataProvider = $this->createMocK(TextMetadataProvider::class);
$this->config
->method('get')
@@ -62,7 +63,7 @@ class SearchParamsFetcherTest extends \PHPUnit\Framework\TestCase
$request = (new RequestFactory)->createRequest('GET', 'http://localhost/?' . $q);
$fetcher = new SearchParamsFetcher($this->config);
$fetcher = new SearchParamsFetcher($this->config, $this->textMetadataProvider);
$params = $fetcher->fetch(new RequestWrapper($request));