apps/files_trashbin/tests/trashbin.php 1 location
|
@@ 301-315 (lines=15) @@
|
| 298 |
|
* @param bool $create |
| 299 |
|
* @param bool $password |
| 300 |
|
*/ |
| 301 |
|
public static function loginHelper($user, $create = false) { |
| 302 |
|
if ($create) { |
| 303 |
|
try { |
| 304 |
|
\OC_User::createUser($user, $user); |
| 305 |
|
} catch(\Exception $e) { // catch username is already being used from previous aborted runs |
| 306 |
|
|
| 307 |
|
} |
| 308 |
|
} |
| 309 |
|
|
| 310 |
|
\OC_Util::tearDownFS(); |
| 311 |
|
\OC_User::setUserId(''); |
| 312 |
|
\OC\Files\Filesystem::tearDown(); |
| 313 |
|
\OC_User::setUserId($user); |
| 314 |
|
\OC_Util::setupFS($user); |
| 315 |
|
} |
| 316 |
|
} |
| 317 |
|
|
| 318 |
|
|
apps/files_versions/tests/versions.php 1 location
|
@@ 768-779 (lines=12) @@
|
| 765 |
|
* @param bool $create |
| 766 |
|
* @param bool $password |
| 767 |
|
*/ |
| 768 |
|
public static function loginHelper($user, $create = false) { |
| 769 |
|
|
| 770 |
|
if ($create) { |
| 771 |
|
\OC_User::createUser($user, $user); |
| 772 |
|
} |
| 773 |
|
|
| 774 |
|
\OC_Util::tearDownFS(); |
| 775 |
|
\OC_User::setUserId(''); |
| 776 |
|
\OC\Files\Filesystem::tearDown(); |
| 777 |
|
\OC_User::setUserId($user); |
| 778 |
|
\OC_Util::setupFS($user); |
| 779 |
|
} |
| 780 |
|
|
| 781 |
|
} |
| 782 |
|
|