public function testWriteWritesCache() { $file = $this->getFile(); $cache = new Cache(new Signature(PHP_VERSION, '2.0', true, array('foo', 'bar'))); $handler = new FileHandler($file); $handler->write($cache); $this->assertFileExists($file); $this->assertSame($cache->toJson(), file_get_contents($file)); }