diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-19 17:56:36 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-19 17:56:36 +0100 |
commit | 9116c39a829ef10745acea5f3e9a4d47433ffa47 (patch) | |
tree | 6696dd938a43d73f9dae223b3b17bb4dfe1c3753 /apps/files_external/tests | |
parent | 5b6c36347b63909f09a2738e96cbc0ae23fd4c61 (diff) | |
download | nextcloud-server-9116c39a829ef10745acea5f3e9a4d47433ffa47.tar.gz nextcloud-server-9116c39a829ef10745acea5f3e9a4d47433ffa47.zip |
Fixed ext storage password field order issue
The old password field is now preserved in the JSON structure to make
sure that the order is preserved.
This is a quick fix until the UI is fixed to not rely on the PHP array
key order.
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r-- | apps/files_external/tests/mountconfig.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php index 144aad4f646..bf43bb31c38 100644 --- a/apps/files_external/tests/mountconfig.php +++ b/apps/files_external/tests/mountconfig.php @@ -245,6 +245,8 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { $this->assertEquals('\OC\Files\Storage\SMB', $config['ext']['class']); $savedMountConfig = $config['ext']['configuration']; $this->assertEquals($mountConfig, $savedMountConfig); + // key order needs to be preserved for the UI... + $this->assertEquals(array_keys($mountConfig), array_keys($savedMountConfig)); } /** @@ -281,6 +283,8 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { $this->assertEquals('\OC\Files\Storage\SMB', $config['ext']['class']); $savedMountConfig = $config['ext']['configuration']; $this->assertEquals($mountConfig, $savedMountConfig); + // key order needs to be preserved for the UI... + $this->assertEquals(array_keys($mountConfig), array_keys($savedMountConfig)); } /** @@ -316,8 +320,8 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { $config = $this->readUserConfig(); $savedConfig = $config[$mountType][$applicable]['/' . self::TEST_USER1 . '/files/ext']['options']; - // no more clear text password in file - $this->assertFalse(isset($savedConfig['password'])); + // no more clear text password in file (kept because of key order) + $this->assertEquals('', $savedConfig['password']); // encrypted password is present $this->assertNotEquals($mountConfig['password'], $savedConfig['password_encrypted']); |