50 lines
931 B
PHP
50 lines
931 B
PHP
<?php
|
|
/**
|
|
* Nextcloud - Gallery
|
|
*
|
|
*
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
* later. See the COPYING file.
|
|
*
|
|
* @author Olivier Paroz <galleryapps@oparoz.com>
|
|
*
|
|
* @copyright Olivier Paroz 2017
|
|
*/
|
|
|
|
namespace Step\Api;
|
|
|
|
class User extends \ApiTester {
|
|
|
|
/**
|
|
* Adds the authorisation headers
|
|
*
|
|
* We use custom methods defined in _support/Helper/Api
|
|
*/
|
|
public function getUserCredentialsAndUseHttpAuthentication() {
|
|
$I = $this;
|
|
list ($userId, $password) = $I->getUserCredentials();
|
|
$I->amHttpAuthenticated($userId, $password);
|
|
}
|
|
|
|
public function breakMyConfigFile() {
|
|
$I = $this;
|
|
$I->createBrokenConfig();
|
|
}
|
|
|
|
public function createMyConfigFileWithABom() {
|
|
$I = $this;
|
|
$I->createConfigWithBom();
|
|
}
|
|
|
|
public function emptyMyConfigFile() {
|
|
$I = $this;
|
|
$I->emptyConfig();
|
|
}
|
|
|
|
public function fixMyConfigFile() {
|
|
$I = $this;
|
|
$I->restoreValidConfig();
|
|
}
|
|
|
|
}
|