File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
lib/internal/Magento/Framework/Search/Test/Unit/Adapter/Mysql/Query Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,6 @@ protected function setUp()
32
32
->disableOriginalConstructor ()
33
33
->getMock ();
34
34
35
- $ this ->scoreBuilder = $ this ->getMockBuilder ('Magento\Framework\Search\Adapter\Mysql\ScoreBuilder ' )
36
- ->disableOriginalConstructor ()
37
- ->getMock ();
38
35
$ this ->matchContainerFactory = $ this ->getMockBuilder (
39
36
'Magento\Framework\Search\Adapter\Mysql\Query\MatchContainerFactory '
40
37
)
@@ -65,7 +62,12 @@ public function testBuild()
65
62
66
63
public function testGetDerivedQueries ()
67
64
{
68
- $ this ->testBuild ();
65
+ $ this ->matchContainerFactory ->expects ($ this ->once ())->method ('create ' )
66
+ ->willReturn ('asdf ' );
67
+
68
+ $ result = $ this ->queryContainer ->addMatchQuery ($ this ->select , $ this ->requestQuery , Bool::QUERY_CONDITION_MUST );
69
+ $ this ->assertEquals ($ this ->select , $ result );
70
+
69
71
$ queries = $ this ->queryContainer ->getDerivedQueries ();
70
72
$ this ->assertCount (1 , $ queries );
71
73
$ this ->assertEquals ('asdf ' , reset ($ queries ));
You can’t perform that action at this time.
0 commit comments