diff options
Diffstat (limited to 'tests/lib/Files/Storage/Storage.php')
-rw-r--r-- | tests/lib/Files/Storage/Storage.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php index a25a3f74f9e..736cbfff4f0 100644 --- a/tests/lib/Files/Storage/Storage.php +++ b/tests/lib/Files/Storage/Storage.php @@ -80,13 +80,13 @@ abstract class Storage extends \Test\TestCase { $this->assertTrue($this->instance->isUpdatable('/' . $directory)); $dh = $this->instance->opendir('/'); - $content = array(); + $content = []; while ($file = readdir($dh)) { if ($file != '.' and $file != '..') { $content[] = $file; } } - $this->assertEquals(array($directory), $content); + $this->assertEquals([$directory], $content); $this->assertFalse($this->instance->mkdir('/' . $directory)); //can't create existing folders $this->assertTrue($this->instance->rmdir('/' . $directory)); @@ -97,13 +97,13 @@ abstract class Storage extends \Test\TestCase { $this->assertFalse($this->instance->rmdir('/' . $directory)); //can't remove non existing folders $dh = $this->instance->opendir('/'); - $content = array(); + $content = []; while ($file = readdir($dh)) { if ($file != '.' and $file != '..') { $content[] = $file; } } - $this->assertEquals(array(), $content); + $this->assertEquals([], $content); } public function fileNameProvider() { @@ -130,12 +130,12 @@ abstract class Storage extends \Test\TestCase { function loremFileProvider() { $root = \OC::$SERVERROOT . '/tests/data/'; - return array( + return [ // small file - array($root . 'lorem.txt'), + [$root . 'lorem.txt'], // bigger file (> 8 KB which is the standard PHP block size) - array($root . 'lorem-big.txt') - ); + [$root . 'lorem-big.txt'] + ]; } /** @@ -413,11 +413,11 @@ abstract class Storage extends \Test\TestCase { } public function hashProvider() { - return array( - array('Foobar', 'md5'), - array('Foobar', 'sha1'), - array('Foobar', 'sha256'), - ); + return [ + ['Foobar', 'md5'], + ['Foobar', 'sha1'], + ['Foobar', 'sha256'], + ]; } /** @@ -438,14 +438,14 @@ abstract class Storage extends \Test\TestCase { $this->assertEquals('data', $this->instance->file_get_contents('#foo/test.txt')); $dh = $this->instance->opendir('#foo'); - $content = array(); + $content = []; while ($file = readdir($dh)) { if ($file != '.' and $file != '..') { $content[] = $file; } } - $this->assertEquals(array('test.txt'), $content); + $this->assertEquals(['test.txt'], $content); } public function testCopyOverWriteFile() { |