|
|
@@ -229,7 +229,7 @@ class LocalStorageTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see LocalStorage::writeFile()
|
|
|
+ * @see LocalStorage::write()
|
|
|
*/
|
|
|
public function testWriteFileNewFile(): void {
|
|
|
$fileStorage = $this->getMockBuilder(TestableLocalStorage::class)
|
|
|
@@ -277,13 +277,13 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->entityManager->expects(self::once())->method('flush');
|
|
|
|
|
|
- $returned = $fileStorage->writeFile($file, $content, $author);
|
|
|
+ $returned = $fileStorage->write($file, $content, $author);
|
|
|
|
|
|
$this->assertEquals($file, $returned);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see LocalStorage::writeFile()
|
|
|
+ * @see LocalStorage::write()
|
|
|
*/
|
|
|
public function testWriteFileExistingFile(): void {
|
|
|
$fileStorage = $this->getMockBuilder(TestableLocalStorage::class)
|
|
|
@@ -329,13 +329,13 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$this->entityManager->expects(self::once())->method('flush');
|
|
|
|
|
|
- $returned = $fileStorage->writeFile($file, $content, $author);
|
|
|
+ $returned = $fileStorage->write($file, $content, $author);
|
|
|
|
|
|
$this->assertEquals($file, $returned);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see LocalStorage::writeFile()
|
|
|
+ * @see LocalStorage::write()
|
|
|
*/
|
|
|
public function testWriteFileExistingButMissingFile(): void
|
|
|
{
|
|
|
@@ -365,11 +365,11 @@ class LocalStorageTest extends TestCase
|
|
|
$this->expectException(RuntimeException::class);
|
|
|
$this->expectDeprecationMessage('The file `' . $key . '` does not exist in the file storage');
|
|
|
|
|
|
- $fileStorage->writeFile($file, '12346', $author);
|
|
|
+ $fileStorage->write($file, '12346', $author);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see LocalStorage::writeFile()
|
|
|
+ * @see LocalStorage::write()
|
|
|
*/
|
|
|
public function testWriteFileWithAccessOwner(): void {
|
|
|
$fileStorage = $this->getMockBuilder(TestableLocalStorage::class)
|
|
|
@@ -407,11 +407,11 @@ class LocalStorageTest extends TestCase
|
|
|
$content = '1';
|
|
|
$this->filesystem->method('write')->willReturn(1);
|
|
|
|
|
|
- $fileStorage->writeFile($file, $content, $author);
|
|
|
+ $fileStorage->write($file, $content, $author);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see LocalStorage::writeFile()
|
|
|
+ * @see LocalStorage::write()
|
|
|
*/
|
|
|
public function testWriteFileWithNoName(): void
|
|
|
{
|
|
|
@@ -428,7 +428,7 @@ class LocalStorageTest extends TestCase
|
|
|
$this->expectException(RuntimeException::class);
|
|
|
$this->expectExceptionMessage('File has no filename');
|
|
|
|
|
|
- $fileStorage->writeFile($file, '...', $author);
|
|
|
+ $fileStorage->write($file, '...', $author);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -452,7 +452,7 @@ class LocalStorageTest extends TestCase
|
|
|
|
|
|
$fileStorage
|
|
|
->expects(self::once())
|
|
|
- ->method('writeFile')
|
|
|
+ ->method('write')
|
|
|
->with($file, '...', $author)
|
|
|
->willReturn($file);
|
|
|
|