private function getMemcacheMock()
 {
     $mock = new MemcachedMock();
     $mock->setThrowExceptionsOnFailure(true);
     $mock->addServer('127.0.0.1', 11211);
     $mock->setLogger(new MemcachedLogger(new TestLogger()));
     return $mock;
 }
コード例 #2
0
 public function testAssertHasNotInDeleteQueue()
 {
     $mock = new MemcachedMock();
     $mock->setThrowExceptionsOnFailure(true);
     $mock->addServer('127.0.0.1', 11211);
     $mock->set('a', 'b');
     $mock->delete('a', 100);
     $mock->setThrowExceptionsOnFailure(false);
     $mockReflection = new \ReflectionClass($mock);
     $method = $mockReflection->getMethod('assertHasNotInDeleteQueue');
     $method->setAccessible(true);
     $this->assertFalse($method->invokeArgs($mock, ['a']));
 }