1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | use Illuminate\Database\Eloquent\Collection; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | use ScoutEngines\Solr\SolrEngine; |
||
8 | use Solarium\Client; |
||
9 | use Solarium\QueryType\Update\Query\Query; |
||
10 | |||
11 | class SolrEngineTest extends TestCase |
||
12 | { |
||
13 | public function testUpdateAddsModelsToTheIndex() |
||
14 | { |
||
15 | $solrClient = $this->getMockBuilder(Client::class) |
||
0 ignored issues
–
show
|
|||
16 | ->setMethods(['update']) |
||
17 | ->getMock(); |
||
18 | |||
19 | $query = new Query(); |
||
20 | |||
21 | $solrClient->expects($this->once()) |
||
22 | ->method('update') |
||
23 | ->with($this->equalTo($query)); |
||
24 | |||
25 | $engine = new SolrEngine($solrClient); |
||
26 | |||
27 | $engine->update(Collection::make([new SolrEngineTestModel])); |
||
28 | } |
||
29 | |||
30 | public function testDeleteRemovesUpdatesFromTheIndex() |
||
31 | { |
||
32 | } |
||
33 | |||
34 | public function testSearchSendsCorrectConditionsToSolr() |
||
35 | { |
||
36 | } |
||
37 | |||
38 | public function testResultsGetMappedToTheCorrectModels() |
||
39 | { |
||
40 | } |
||
41 | } |
||
42 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.