]> source.dussan.org Git - nextcloud-server.git/commit
Replace originalStorage in tests with a proper teardown
authorVincent Petry <pvince81@owncloud.com>
Wed, 8 Apr 2015 10:03:55 +0000 (12:03 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 8 Apr 2015 10:45:38 +0000 (12:45 +0200)
commitf8cfc03f36e438f1874e9840ce69811112e15475
tree4b09a8e57c2c1492ee023e2adf9efa2a9acc709e
parent6c327f8331617652ef0b268d51edc6a23624e33c
Replace originalStorage in tests with a proper teardown

The purpose of $originalStorage in unit tests was to remount the old
root.
However that storage itself is already wrapped by storage wrapper, so
remounting it would rewrap the storage several times.

This fix makes use of "loginAsUser()" and "logout()" from the TestCase
class to properly initialize and cleanup the FS as expected.
13 files changed:
apps/files/tests/ajax_rename.php
apps/files_trashbin/tests/storage.php
tests/lib/files/cache/updater.php
tests/lib/files/cache/updaterlegacy.php
tests/lib/files/cache/watcher.php
tests/lib/files/etagtest.php
tests/lib/files/filesystem.php
tests/lib/files/node/integration.php
tests/lib/files/utils/scanner.php
tests/lib/files/view.php
tests/lib/preview.php
tests/lib/streamwrappers.php
tests/lib/testcase.php