Exemplo n.º 1
0
 /**
  * Tests the Joomla\Cache\Cache::__construct method.
  *
  * @return  void
  *
  * @covers  Joomla\Cache\Cache::__construct
  * @covers  Joomla\Cache\Apc::__construct
  * @covers  Joomla\Cache\Memcached::__construct
  * @expectedException  \RuntimeException
  * @since   1.0
  */
 public function test__construct()
 {
     // This checks the default ttl and also that the options registry was initialised.
     $this->assertEquals('900', $this->instance->getOption('ttl'));
     // Throws exception, options is null
     $className = $this->cacheClass;
     new $className(null);
 }
Exemplo n.º 2
0
 /**
  * Tests the Joomla\Cache\Cache::__construct method.
  *
  * @return  void
  *
  * @covers  Joomla\Cache\Cache::__construct
  * @since   1.0
  */
 public function test__construct()
 {
     // This checks the default ttl and also that the options registry was initialised.
     $this->assertEquals('900', $this->instance->getOption('ttl'));
 }