| Conditions | 5 |
| Paths | 9 |
| Total Lines | 35 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function setUp() |
||
| 26 | { |
||
| 27 | if (!class_exists('Memcached')) |
||
| 28 | { |
||
| 29 | $this->markTestSkipped( |
||
| 30 | 'The Memcached class does not exist.' |
||
| 31 | ); |
||
| 32 | |||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | $options = $this->cacheOptions; |
||
| 37 | |||
| 38 | if (!$options) |
||
| 39 | { |
||
| 40 | $options = array(); |
||
| 41 | } |
||
| 42 | |||
| 43 | if (!is_array($options)) |
||
| 44 | { |
||
| 45 | $options = array($options); |
||
| 46 | } |
||
| 47 | |||
| 48 | if (!isset($options['memcache.servers'])) |
||
| 49 | { |
||
| 50 | $server = new \stdClass; |
||
| 51 | $server->host = 'localhost'; |
||
| 52 | $server->port = '11211'; |
||
| 53 | $options['memcache.servers'] = array($server); |
||
| 54 | } |
||
| 55 | |||
| 56 | $this->cacheOptions = $options; |
||
| 57 | $this->cacheClass = 'Joomla\\Cache\\Memcached'; |
||
| 58 | parent::setUp(); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |