return $this->isExpectedUrl((string)$element->$field, "index.php/s/");
}
elseif ((string)$element->$field == $contentExpected){
- return True;
+ return true;
}
else{
print($element->$field);
}
}
- return False;
+ return false;
} else {
if ($contentExpected == "A_TOKEN"){
return (strlen((string)$data->$field) == 15);
return $this->isExpectedUrl((string)$data->$field, "index.php/s/");
}
elseif ($data->$field == $contentExpected){
- return True;
+ return true;
}
- return False;
+ return false;
}
}
* @param string $filename
*/
public function checkSharedFileInResponse($filename){
- Assert::assertEquals(True, $this->isFieldInResponse('file_target', "/$filename"));
+ Assert::assertEquals(true, $this->isFieldInResponse('file_target', "/$filename"));
}
/**
* @param string $filename
*/
public function checkSharedFileNotInResponse($filename){
- Assert::assertEquals(False, $this->isFieldInResponse('file_target', "/$filename"));
+ Assert::assertEquals(false, $this->isFieldInResponse('file_target', "/$filename"));
}
/**
* @param string $user
*/
public function checkSharedUserInResponse($user){
- Assert::assertEquals(True, $this->isFieldInResponse('share_with', "$user"));
+ Assert::assertEquals(true, $this->isFieldInResponse('share_with', "$user"));
}
/**
* @param string $user
*/
public function checkSharedUserNotInResponse($user){
- Assert::assertEquals(False, $this->isFieldInResponse('share_with', "$user"));
+ Assert::assertEquals(false, $this->isFieldInResponse('share_with', "$user"));
}
public function isUserOrGroupInSharedData($userOrGroup, $permissions = null){
$data = simplexml_load_string($this->response->getBody())->data[0];
foreach($data as $element) {
if ($element->share_with == $userOrGroup && ($permissions === null || $permissions == $element->permissions)){
- return True;
+ return true;
}
}
- return False;
+ return false;
}
/**
$this->createShare($user1, $filepath, 0, $user2, null, null, $permissions);
}
$this->response = $client->get($fullUrl, $options);
- Assert::assertEquals(True, $this->isUserOrGroupInSharedData($user2, $permissions));
+ Assert::assertEquals(true, $this->isUserOrGroupInSharedData($user2, $permissions));
}
/**
$this->createShare($user, $filepath, 1, $group, null, null, $permissions);
}
$this->response = $client->get($fullUrl, $options);
- Assert::assertEquals(True, $this->isUserOrGroupInSharedData($group, $permissions));
+ Assert::assertEquals(true, $this->isUserOrGroupInSharedData($group, $permissions));
}
/**
// is_writable doesn't work for NFS mounts, so try to write a file and check if it exists.
$testFile = sprintf('%s/%s.tmp', $CONFIG_DATADIRECTORY, uniqid('data_dir_writability_test_'));
$handle = fopen($testFile, 'w');
- if (!$handle || fwrite($handle, 'Test write operation') === FALSE) {
+ if (!$handle || fwrite($handle, 'Test write operation') === false) {
$permissionsHint = $l->t('Permissions can usually be fixed by giving the webserver write access to the root directory. See %s.',
[$urlGenerator->linkToDocs('admin-dir_permissions')]);
$errors[] = [
$fileName = tempnam("/tmp", "FOO");
$stream = $this->getStream($fileName, 'w+', 0);
$this->assertEquals(6, fwrite($stream, 'foobar'));
- $this->assertEquals(TRUE, rewind($stream));
+ $this->assertEquals(true, rewind($stream));
$this->assertEquals('foobar', fread($stream, 100));
- $this->assertEquals(TRUE, rewind($stream));
+ $this->assertEquals(true, rewind($stream));
$this->assertEquals(3, fwrite($stream, 'bar'));
fclose($stream);