Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlloVince authored and weierophinney committed Oct 1, 2012
1 parent fd10926 commit c0d83f1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/ZendTest/Cache/Storage/Adapter/MemcachedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ public function testOptionsSetServers()
$this->assertEquals($memcached->getOptions()->getServers(), $servers);
}

public function testLibOptionsSet()
{
$options = new Cache\Storage\Adapter\MemcachedOptions();

$options->setLibOptions(array(
'COMPRESSION' => false
));

$this->assertEquals($options->getLibOption(\Memcached::OPT_COMPRESSION), false);

$memcached = new Cache\Storage\Adapter\Memcached($options);
$this->assertEquals($memcached->getOptions()->getLibOptions(), array(
\Memcached::OPT_COMPRESSION => false
));
}

public function testNoOptionsSetsDefaultServer()
{
$memcached = new Cache\Storage\Adapter\Memcached();
Expand Down

0 comments on commit c0d83f1

Please sign in to comment.