diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /tests/lib/UtilCheckServerTest.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/UtilCheckServerTest.php')
-rw-r--r-- | tests/lib/UtilCheckServerTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php index 9cba59beb47..e822c394930 100644 --- a/tests/lib/UtilCheckServerTest.php +++ b/tests/lib/UtilCheckServerTest.php @@ -55,9 +55,9 @@ class UtilCheckServerTest extends \Test\TestCase { * Test that checkServer() returns no errors in the regular case. */ public function testCheckServer() { - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => true - ))); + ])); $this->assertEmpty($result); } @@ -72,9 +72,9 @@ class UtilCheckServerTest extends \Test\TestCase { // even though ".ocdata" is missing, the error isn't // triggered to allow setup to run - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => false - ))); + ])); $this->assertEmpty($result); } @@ -91,14 +91,14 @@ class UtilCheckServerTest extends \Test\TestCase { $oldCurrentVersion = $session->get('OC_Version'); // upgrade condition to simulate needUpgrade() === true - $session->set('OC_Version', array(6, 0, 0, 2)); + $session->set('OC_Version', [6, 0, 0, 2]); // even though ".ocdata" is missing, the error isn't // triggered to allow for upgrade - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => true, 'version' => '6.0.0.1' - ))); + ])); $this->assertEmpty($result); // restore versions @@ -123,10 +123,10 @@ class UtilCheckServerTest extends \Test\TestCase { $result = \OC_Util::checkDataDirectoryValidity($this->datadir); $this->assertEquals(1, count($result)); - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => true, 'version' => implode('.', \OCP\Util::getVersion()) - ))); + ])); $this->assertCount(1, $result); } @@ -134,10 +134,10 @@ class UtilCheckServerTest extends \Test\TestCase { * Tests that no error is given when the datadir is writable */ public function testDataDirWritable() { - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => true, 'version' => implode('.', \OCP\Util::getVersion()) - ))); + ])); $this->assertEmpty($result); } @@ -148,10 +148,10 @@ class UtilCheckServerTest extends \Test\TestCase { $this->markTestSkipped('TODO: Disable because fails on drone'); chmod($this->datadir, 0300); - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => true, 'version' => implode('.', \OCP\Util::getVersion()) - ))); + ])); $this->assertCount(1, $result); } @@ -160,10 +160,10 @@ class UtilCheckServerTest extends \Test\TestCase { */ public function testDataDirNotWritableSetup() { chmod($this->datadir, 0300); - $result = \OC_Util::checkServer($this->getConfig(array( + $result = \OC_Util::checkServer($this->getConfig([ 'installed' => false, 'version' => implode('.', \OCP\Util::getVersion()) - ))); + ])); chmod($this->datadir, 0700); //needed for cleanup $this->assertEmpty($result); } |