Skip to content

Commit

Permalink
removed addServers method
Browse files Browse the repository at this point in the history
  • Loading branch information
ytake committed Jun 26, 2020
1 parent da3f90b commit 4a2b3ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions .hhconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ disallow_assign_by_ref = false
unsafe_rx = false
disable_static_local_variables = true
disable_instanceof_refinement = true
disallow_array_literal = true
disable_lval_as_an_expression = true
new_inference_lambda = true
error_php_lambdas = true
Expand Down
9 changes: 2 additions & 7 deletions tests/Driver/MemcachedCacheTest.hack
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ class MemcachedCacheTest extends HackTest {
expect(() ==> {
$cache = new MemcachedCache();
$mc = new Memcached('mc');
$mc->addServers(darray(
array('memcached', 11211)
));
$mc->addServer('memcached', 11211);
expect($cache->fetch("qwerty"))->toBeNull();
})->toThrow(InvariantException::class);
}

public function testFetchShouldReturnNull2(): void {
$cache = new MemcachedCache();
$mc = new Memcached('mc');
$mc->addServers(darray(
array('memcached', 11211)
));
$mc->addServer('memcached', 11211);
$cache->setMemcached($mc);
expect($cache->fetch("qwerty"))->toBeNull();
$cache->save("qwerty", new Element('testing:cache', 5));
expect($cache->fetch("qwerty"))->toBeSame('testing:cache');
expect($cache->fetch("qwerty"))->toBeSame('testing:cache');
$cache->delete("qwerty");
expect($cache->fetch("qwerty"))->toBeNull();
$cache->save("qwerty", new Element('testing:cache', 5));
Expand Down

0 comments on commit 4a2b3ae

Please sign in to comment.