Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
6c539a2e
Commit
6c539a2e
authored
Dec 23, 2016
by
Vincent Petry
Committed by
GitHub
Dec 23, 2016
Browse files
Merge pull request #26865 from owncloud/integration-tests-allowing-md5-home
Integration tests allowing md5 home
parents
4e067909
02ffa619
Changes
3
Hide whitespace changes
Inline
Side-by-side
build/integration/features/bootstrap/BasicStructure.php
View file @
6c539a2e
...
...
@@ -314,7 +314,7 @@ trait BasicStructure {
}
public
function
createFileSpecificSize
(
$name
,
$size
){
$file
=
fopen
(
"
data
/"
.
"
$name
"
,
'w'
);
$file
=
fopen
(
"
work
/"
.
"
$name
"
,
'w'
);
fseek
(
$file
,
$size
-
1
,
SEEK_CUR
);
fwrite
(
$file
,
'a'
);
// write a dummy char at SIZE position
fclose
(
$file
);
...
...
build/integration/features/bootstrap/Provisioning.php
View file @
6c539a2e
...
...
@@ -637,6 +637,19 @@ trait Provisioning {
$this
->
userHasAQuotaOf
(
$user
,
'none'
);
}
/**
* Returns home path of the given user
* @param string $user
*/
public
function
getUserHome
(
$user
)
{
$fullUrl
=
$this
->
baseUrl
.
"v
{
$this
->
apiVersion
}
.php/cloud/users/
$user
"
;
$client
=
new
Client
();
$options
=
[];
$options
[
'auth'
]
=
$this
->
adminUser
;
$this
->
response
=
$client
->
get
(
$fullUrl
,
$options
);
return
$this
->
response
->
xml
()
->
data
[
0
]
->
home
;
}
/**
* @BeforeScenario
* @AfterScenario
...
...
build/integration/features/bootstrap/WebDav.php
View file @
6c539a2e
...
...
@@ -464,10 +464,11 @@ trait WebDav {
public
function
userAddsAFileTo
(
$user
,
$bytes
,
$destination
){
$filename
=
"filespecificSize.txt"
;
$this
->
createFileSpecificSize
(
$filename
,
$bytes
);
PHPUnit_Framework_Assert
::
assertEquals
(
1
,
file_exists
(
"data/
$filename
"
));
$this
->
userUploadsAFileTo
(
$user
,
"data/
$filename
"
,
$destination
);
$this
->
removeFile
(
"data/"
,
$filename
);
PHPUnit_Framework_Assert
::
assertEquals
(
1
,
file_exists
(
"../../data/
$user
/files
$destination
"
));
PHPUnit_Framework_Assert
::
assertEquals
(
1
,
file_exists
(
"work/
$filename
"
));
$this
->
userUploadsAFileTo
(
$user
,
"work/
$filename
"
,
$destination
);
$this
->
removeFile
(
"work/"
,
$filename
);
$expectedElements
=
new
\
Behat\Gherkin\Node\TableNode
([[
"
$destination
"
]]);
$this
->
checkElementList
(
$user
,
$expectedElements
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment