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
2ab4b1ce
Commit
2ab4b1ce
authored
Apr 27, 2016
by
Thomas Müller
Browse files
Merge pull request #23942 from owncloud/fix-behat
Use baseUrl as provided
parents
44709276
68a92d36
Changes
1
Hide whitespace changes
Inline
Side-by-side
build/integration/features/bootstrap/BasicStructure.php
View file @
2ab4b1ce
...
...
@@ -25,7 +25,7 @@ trait BasicStructure {
private
$cookieJar
;
/** @var string */
private
$request
t
oken
;
private
$request
T
oken
;
public
function
__construct
(
$baseUrl
,
$admin
,
$regular_user_password
)
{
...
...
@@ -33,8 +33,8 @@ trait BasicStructure {
$this
->
baseUrl
=
$baseUrl
;
$this
->
adminUser
=
$admin
;
$this
->
regularUser
=
$regular_user_password
;
$this
->
localBaseUrl
=
substr
(
$this
->
baseUrl
,
0
,
-
4
)
;
$this
->
remoteBaseUrl
=
substr
(
$this
->
baseUrl
,
0
,
-
4
)
;
$this
->
localBaseUrl
=
$this
->
baseUrl
;
$this
->
remoteBaseUrl
=
$this
->
baseUrl
;
$this
->
currentServer
=
'LOCAL'
;
$this
->
cookieJar
=
new
\
GuzzleHttp\Cookie\CookieJar
();
...
...
@@ -168,7 +168,7 @@ trait BasicStructure {
* @param ResponseInterface $response
*/
private
function
extracRequestTokenFromResponse
(
ResponseInterface
$response
)
{
$this
->
request
t
oken
=
substr
(
preg_replace
(
'/(.*)data-requesttoken="(.*)">(.*)/sm'
,
'\2'
,
$response
->
getBody
()
->
getContents
()),
0
,
89
);
$this
->
request
T
oken
=
substr
(
preg_replace
(
'/(.*)data-requesttoken="(.*)">(.*)/sm'
,
'\2'
,
$response
->
getBody
()
->
getContents
()),
0
,
89
);
}
/**
...
...
@@ -196,7 +196,7 @@ trait BasicStructure {
'body'
=>
[
'user'
=>
$user
,
'password'
=>
$password
,
'requesttoken'
=>
$this
->
request
t
oken
,
'requesttoken'
=>
$this
->
request
T
oken
,
],
'cookies'
=>
$this
->
cookieJar
,
]
...
...
@@ -220,7 +220,7 @@ trait BasicStructure {
'cookies'
=>
$this
->
cookieJar
,
]
);
$request
->
addHeader
(
'requesttoken'
,
$this
->
request
t
oken
);
$request
->
addHeader
(
'requesttoken'
,
$this
->
request
T
oken
);
try
{
$this
->
response
=
$client
->
send
(
$request
);
}
catch
(
\
GuzzleHttp\Exception\ClientException
$e
)
{
...
...
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