read() public method

public read ( )
Beispiel #1
0
 public function testReadReturnsCache()
 {
     $file = $this->getFile();
     $signature = new Signature(PHP_VERSION, '2.0', true, array('foo', 'bar'));
     $cache = new Cache($signature);
     file_put_contents($file, $cache->toJson());
     $handler = new FileHandler($file);
     $cached = $handler->read();
     $this->assertInstanceOf('PhpCsFixer\\Cache\\CacheInterface', $cached);
     $this->assertTrue($cached->getSignature()->equals($signature));
 }