Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a3fd6a1f
authored
Apr 24, 2019
by
Jacob Baker-Kretzmar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retrieve props from inside page object
1 parent
732a62e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
tests/TestCase.php
tests/TestCase.php
View file @
a3fd6a1
...
@@ -16,7 +16,7 @@ abstract class TestCase extends BaseTestCase
...
@@ -16,7 +16,7 @@ abstract class TestCase extends BaseTestCase
parent
::
setUp
();
parent
::
setUp
();
TestResponse
::
macro
(
'props'
,
function
(
$key
=
null
)
{
TestResponse
::
macro
(
'props'
,
function
(
$key
=
null
)
{
$props
=
json_decode
(
json_encode
(
$this
->
original
->
getData
()[
'props'
]),
JSON_OBJECT_AS_ARRAY
);
$props
=
json_decode
(
json_encode
(
$this
->
original
->
getData
()[
'p
age'
][
'p
rops'
]),
JSON_OBJECT_AS_ARRAY
);
if
(
$key
)
{
if
(
$key
)
{
return
Arr
::
get
(
$props
,
$key
);
return
Arr
::
get
(
$props
,
$key
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment