File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
dev/tests/integration/testsuite/Magento/Elasticsearch/ElasticAdapter/SearchAdapter Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Elasticsearch \ElasticAdapter \SearchAdapter ;
9
9
10
+ use Magento \AdvancedSearch \Model \Client \ClientException ;
10
11
use Magento \TestFramework \Helper \Bootstrap ;
11
12
12
13
/**
@@ -90,9 +91,8 @@ public function testQuery()
90
91
$ exception = new \Exception ('Test Message ' );
91
92
$ this ->loggerMock ->expects ($ this ->once ())->method ('critical ' )->with ($ exception );
92
93
$ this ->clientMock ->expects ($ this ->once ())->method ('query ' )->willThrowException ($ exception );
93
- $ actualResponse = $ this ->adapter ->query ($ queryRequest );
94
- $ this ->assertEmpty ($ actualResponse ->getAggregations ()->getBuckets ());
95
- $ this ->assertEquals (0 , $ actualResponse ->count ());
94
+ $ this ->expectException (ClientException::class);
95
+ $ this ->adapter ->query ($ queryRequest );
96
96
}
97
97
98
98
/**
You can’t perform that action at this time.
0 commit comments