From 4a2b3ae3ac34af5470f0947fd4999df51cb834e2 Mon Sep 17 00:00:00 2001 From: ytake Date: Fri, 26 Jun 2020 15:58:29 +0900 Subject: [PATCH] removed addServers method --- .hhconfig | 1 + tests/Driver/MemcachedCacheTest.hack | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.hhconfig b/.hhconfig index a765de1..4c1296a 100644 --- a/.hhconfig +++ b/.hhconfig @@ -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 diff --git a/tests/Driver/MemcachedCacheTest.hack b/tests/Driver/MemcachedCacheTest.hack index e46b741..79d0766 100644 --- a/tests/Driver/MemcachedCacheTest.hack +++ b/tests/Driver/MemcachedCacheTest.hack @@ -9,9 +9,7 @@ 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); } @@ -19,14 +17,11 @@ class MemcachedCacheTest extends HackTest { 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));