public function testFailsSetToCacheWithoutKey() { $this->mockFetcher->expects($this->once())->method('getCacheKey')->will($this->returnValue(null)); $implementation = new CacheTraitImplementation(['cache' => $this->mockCache, 'fetcher' => $this->mockFetcher]); $cachedValue = $implementation->sCachedValue('1234'); }
public function testFailsSetToCacheWithoutKey() { $implementation = new CacheTraitImplementation(['cache' => $this->mockCache, 'key' => null]); $cachedValue = $implementation->sCachedValue('1234'); $this->assertNull($cachedValue); }