public function cacheValue(string $key, $value) { $this->cache[$key] = $value; }
public function testCanSetAnRetrieveAValueFromTheCache() { $context = new GenerationContext(); $context->cacheValue('foo', $foo = new \stdClass()); $this->assertSame($foo, $context->getCachedValue('foo')); }