}
$options['body'] = [
- 'userid' => $user,
- 'password' => '123456'
- ];
+ 'userid' => $user,
+ 'password' => '123456'
+ ];
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
if ($this->currentServer === 'LOCAL'){
$options2 = [
'auth' => [$user, '123456'],
];
+ $options2['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$url = $fullUrl.'/'.$user;
$client->send($client->createRequest('GET', $url, $options2));
}
$client = new Client();
$options = [];
$options['auth'] = $this->adminUser;
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true'
+ ];
$this->response = $client->get($fullUrl, $options);
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfGroupsResponded($this->response);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfGroupsResponded($this->response);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$groups = array($group);
}
$options['body'] = [
- 'groupid' => $group,
- ];
+ 'groupid' => $group,
+ ];
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
if ($this->currentServer === 'LOCAL'){
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
+ // TODO: fix hack
+ $options['body'] = [
+ 'foo' => 'bar'
+ ];
$this->response = $client->send($client->createRequest("PUT", $fullUrl, $options));
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->send($client->createRequest("DELETE", $fullUrl, $options));
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->send($client->createRequest("DELETE", $fullUrl, $options));
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$options['body'] = [
- 'groupid' => $group,
- ];
+ 'groupid' => $group,
+ ];
$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
}
$client = new Client();
$options = [];
$options['auth'] = $this->adminUser;
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfSubadminsResponded($this->response);
$options['auth'] = $this->adminUser;
}
$options['body'] = [
- 'groupid' => $group
- ];
+ 'groupid' => $group
+ ];
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode());
}
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfSubadminsResponded($this->response);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfAppsResponded($this->response);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfAppsResponded($this->response);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
PHPUnit_Framework_Assert::assertEquals("false", $this->response->xml()->data[0]->enabled);
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
+ $options['headers'] = [
+ 'OCS-APIREQUEST' => 'true',
+ ];
$this->response = $client->get($fullUrl, $options);
PHPUnit_Framework_Assert::assertEquals("true", $this->response->xml()->data[0]->enabled);