Пример #1
0
 public function testOptionsSetServers()
 {
     $options = new Cache\Storage\Adapter\MemcachedOptions();
     $servers = array(array('127.0.0.1', 12345), array('localhost', 54321), array('domain.com'));
     $options->setServers($servers);
     $servers[2][1] = 11211;
     $this->assertEquals($options->getServers(), $servers);
     $memcached = new Cache\Storage\Adapter\Memcached($options);
     $this->assertEquals($memcached->getOptions()->getServers(), $servers);
 }
Пример #2
0
 /**
  * @dataProvider getServersDefinitions
  */
 public function testOptionSetServers($servers, $expectedServers)
 {
     $options = new Cache\Storage\Adapter\MemcachedOptions();
     $options->setServers($servers);
     $this->assertEquals($expectedServers, $options->getServers());
 }