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