Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testConfigureServer() |
||
13 | { |
||
14 | $config = [ |
||
15 | 'host' => 'localhost', |
||
16 | 'port' => 1234, |
||
17 | 'indexstore' => [ |
||
18 | 'mode' => 'post' |
||
19 | ] |
||
20 | ]; |
||
21 | Solr::configure_server($config); |
||
22 | |||
23 | $expected = [ |
||
24 | 'endpoint' => |
||
25 | [ |
||
26 | 'localhost' => |
||
27 | [ |
||
28 | 'host' => 'localhost', |
||
29 | 'port' => 1234, |
||
30 | ], |
||
31 | ], |
||
32 | ]; |
||
33 | $this->assertEquals($expected, SolrCoreService::config()->get('config')); |
||
34 | $mode = [ |
||
35 | 'mode' => 'post', |
||
36 | 'path' => '.solr' |
||
37 | ]; |
||
38 | $this->assertEquals($mode, SolrCoreService::config()->get('mode')); |
||
39 | $this->assertEquals(1, SolrCoreService::config()->get('cpucores')); |
||
40 | } |
||
42 |