public function testDelayedFlush() { $mock = new MemcachedMock(); $this->assertFalse($mock->flush()); $this->assertFalse($mock->flush(10)); $testKey = 'flush123'; $testValue = 4455; $mock = $this->getMemcachedMock(); $mock->setThrowExceptionsOnFailure(false); $this->assertFalse($mock->flush('_invalid_')); $mock->setThrowExceptionsOnFailure(true); $mock->set($testKey, $testValue); $this->assertSame($testValue, $mock->get($testKey)); $this->assertTrue($mock->flush(1)); $this->assertSame($testValue, $mock->get($testKey)); sleep(1); $this->assertFalse($mock->get($testKey)); }