/** * test using authentication without memcached installed with SASL support * throw an exception * * @return void */ public function testSaslAuthException() { $Memcached = new TestMemcachedEngine(); $settings = array('engine' => 'Memcached', 'servers' => array('127.0.0.1:11211'), 'persistent' => FALSE, 'login' => 'test', 'password' => 'password'); $this->setExpectedException('PHPUnit_Framework_Error_Warning'); $Memcached->init($settings); }
/** * test using authentication without memcached installed with SASL support * throw an exception * * @return void */ public function testSaslAuthException() { $this->skipIf(version_compare(PHP_VERSION, '7.0.0', '>=')); $Memcached = new TestMemcachedEngine(); $settings = array('engine' => 'Memcached', 'servers' => array('127.0.0.1:11211'), 'persistent' => false, 'login' => 'test', 'password' => 'password'); $this->setExpectedException('PHPUnit_Framework_Error_Warning'); $Memcached->init($settings); }
/** * test using authentication without memcached installed with SASL support * throw an exception * * @return void */ public function testSaslAuthException() { $Memcached = new TestMemcachedEngine(); $settings = array('engine' => 'Memcached', 'servers' => array('127.0.0.1:11211'), 'persistent' => false, 'login' => 'test', 'password' => 'password'); $this->skipIf(method_exists($Memcached->getMemcached(), 'setSaslAuthData'), 'Memcached extension is installed with SASL support'); $this->setExpectedException('CacheException', 'Memcached extension is not build with SASL support'); $Memcached->init($settings); }