Пример #1
0
 /**
  * Test save method
  */
 public function testSave()
 {
     $this->setDir();
     $this->getDir();
     $this->directoryMock->freeze();
     $this->filemanagerMock->createFile($this->getCachedFilePath(), self::SERIALIZED_VALUE)->andReturn($this->regularFileMock);
     $this->filemanagerMock->freeze();
     $fileCache = new FileCache(self::PATH, $this->filemanagerMock);
     $this->assertInstanceOf('Hadamcik\\SmartCache\\Utils\\Filemanager\\RegularFile', $fileCache->save(self::KEY, self::VALUE));
     $this->directoryMock->assertExpectations();
     $this->filemanagerMock->assertExpectations();
 }