Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romainruaud committed Feb 21, 2023
1 parent 05e58b4 commit ea5d3e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function setUp(): void
{
$xml = new \DOMDocument();
$xml->load(__DIR__ . '/elasticsuite_analysis.xml');
$converter = new Converter(new \Magento\Framework\Json\Decoder());
$converter = new Converter(new \Magento\Framework\Json\Decoder(new \Magento\Framework\Serialize\Serializer\Json()));
$this->parsedData = $converter->convert($xml);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testSearch($documents, $docCount)

$searchApi = new \Smile\ElasticsuiteCore\Model\Search($searchEngine, $searchRequestBuilder, $searchResponseBuilder);

$searchCriteria = $this->createMock(\Magento\Framework\Api\Search\SearchCriteriaInterface::class);
$searchCriteria = $this->createMock(\Smile\ElasticsuiteCore\Api\Search\SearchCriteriaInterface::class);
$searchResponse = $searchApi->search($searchCriteria);

$this->assertEquals($docCount, $searchResponse->getTotalCount());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private function getMapping()
*/
private function getMetricFactory()
{
return $this->getMockBuilder(MetricFactory::class)->getMock();
return $this->createMock(MetricFactory::class);
}

/**
Expand Down

0 comments on commit ea5d3e1

Please sign in to comment.