summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-07-10 14:27:47 +0200
committerJulius Härtl <jus@bitgrid.net>2018-07-11 12:08:37 +0200
commit6da2b7c4f6744baa5a14a2919790d034de4229bf (patch)
tree1b2d9a5fbf99b528878da366928fae6ef8e4f099 /tests
parentf1469e34aa8f29a8dbec8e1ae9260fb09777f82f (diff)
downloadnextcloud-server-6da2b7c4f6744baa5a14a2919790d034de4229bf.tar.gz
nextcloud-server-6da2b7c4f6744baa5a14a2919790d034de4229bf.zip
Separate fopen into read and write methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/SimpleFS/SimpleFileTest.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php
index aec5052cb4b..c1c53b15ecf 100644
--- a/tests/lib/Files/SimpleFS/SimpleFileTest.php
+++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php
@@ -124,11 +124,19 @@ class SimpleFileTest extends \Test\TestCase {
$this->simpleFile->getContent();
}
- public function testFopen() {
+ public function testRead() {
$this->file->expects($this->once())
->method('fopen')
- ->with('r+');
+ ->with('r');
- $this->simpleFile->fopen('r+');
+ $this->simpleFile->read();
+ }
+
+ public function testWrite() {
+ $this->file->expects($this->once())
+ ->method('fopen')
+ ->with('w');
+
+ $this->simpleFile->write();
}
}