/** * @throws \Synapse\File\FileException * @expectedException \Synapse\File\FileException */ public function testSaveWithS3ThrowingExceptionThrowsFileException() { $this->setupFileService(); $this->withPutObjectThrowingException(); $data = self::TEST_BASE_PATH; $path = 'test'; $fileName = 'test.txt'; $this->fs->save($path, $fileName, $data); }
public function testGetFileSize() { $this->setupFileService($this->cfg); $data = self::TEST_BASE_PATH; $path = 'test'; $fileName = 'test.txt'; $this->fs->save($path, $fileName, $data); $size = $this->fs->getFileSize($path . DIRECTORY_SEPARATOR . $fileName); $this->assertEquals(strlen(self::TEST_BASE_PATH), $size, 'Did not return expected file size'); }