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