summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-01-08 12:05:54 +0100
committerLukas Reschke <lukas@owncloud.com>2015-01-08 12:49:02 +0100
commit7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3 (patch)
treef3d82bd3c36d0cb3ddf6493702afedcefd951070 /tests
parent14e534e93322d3ce3275f04657de40fcf34d61d9 (diff)
downloadnextcloud-server-7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3.tar.gz
nextcloud-server-7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3.zip
Add version to .htaccess
Currently if a user does not replace the .htaccess file with the new update this can lead to serious problems in case Apache is used as webserver. This commit adds the version to the .htaccess file and the update routine fails in case not the newest version is specified in there. This obviously means that every release has to update the version specified in .htaccess as well. But I see no better solution for it. Conflicts: lib/private/updater.php
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/setup.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/lib/setup.php b/tests/lib/setup.php
index 8373ba316d6..a221943c016 100644
--- a/tests/lib/setup.php
+++ b/tests/lib/setup.php
@@ -19,7 +19,7 @@ class Test_OC_Setup extends \Test\TestCase {
parent::setUp();
$this->config = $this->getMock('\OCP\IConfig');
- $this->setupClass = $this->getMock('\OC_Setup', array('class_exists', 'is_callable'), array($this->config));
+ $this->setupClass = $this->getMock('\OC_Setup', ['class_exists', 'is_callable'], [$this->config]);
}
public function testGetSupportedDatabasesWithOneWorking() {
@@ -102,4 +102,17 @@ class Test_OC_Setup extends \Test\TestCase {
->will($this->returnValue('NotAnArray'));
$this->setupClass->getSupportedDatabases();
}
+
+ /**
+ * This is actual more an integration test whether the version parameter in the .htaccess
+ * was updated as well when the version has been incremented.
+ * If it hasn't this test will fail.
+ */
+ public function testHtaccessIsCurrent() {
+ $result = Test_Helper::invokePrivate(
+ $this->setupClass,
+ 'isCurrentHtaccess'
+ );
+ $this->assertTrue($result);
+ }
} \ No newline at end of file