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
5f6d5229
Unverified
Commit
5f6d5229
authored
Oct 04, 2016
by
Thomas Müller
Browse files
Fixing php 7.1 error where comparing encoded json is not asserting properly
parent
b129d5d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/lib/IntegrityCheck/CheckerTest.php
View file @
5f6d5229
...
...
@@ -103,7 +103,13 @@ class CheckerTest extends TestCase {
->
method
(
'file_put_contents'
)
->
with
(
\
OC
::
$SERVERROOT
.
'/tests/data/integritycheck/app//appinfo/signature.json'
,
$expectedSignatureFileData
$this
->
callback
(
function
(
$arg
)
use
(
$expectedSignatureFileData
)
{
$this
->
assertEquals
(
json_decode
(
$expectedSignatureFileData
,
true
),
json_decode
(
$arg
,
true
)
);
return
true
;
})
);
$keyBundle
=
file_get_contents
(
__DIR__
.
'/../../data/integritycheck/SomeApp.crt'
);
...
...
@@ -456,7 +462,13 @@ class CheckerTest extends TestCase {
->
method
(
'file_put_contents'
)
->
with
(
\
OC
::
$SERVERROOT
.
'/tests/data/integritycheck/app//core/signature.json'
,
$expectedSignatureFileData
$this
->
callback
(
function
(
$arg
)
use
(
$expectedSignatureFileData
)
{
$this
->
assertEquals
(
json_decode
(
$expectedSignatureFileData
,
true
),
json_decode
(
$arg
,
true
)
);
return
true
;
})
);
$keyBundle
=
file_get_contents
(
__DIR__
.
'/../../data/integritycheck/core.crt'
);
...
...
@@ -486,7 +498,13 @@ class CheckerTest extends TestCase {
->
method
(
'file_put_contents'
)
->
with
(
\
OC
::
$SERVERROOT
.
'/tests/data/integritycheck/htaccessUnmodified//core/signature.json'
,
$expectedSignatureFileData
$this
->
callback
(
function
(
$arg
)
use
(
$expectedSignatureFileData
)
{
$this
->
assertEquals
(
json_decode
(
$expectedSignatureFileData
,
true
),
json_decode
(
$arg
,
true
)
);
return
true
;
})
);
$keyBundle
=
file_get_contents
(
__DIR__
.
'/../../data/integritycheck/core.crt'
);
...
...
@@ -511,7 +529,13 @@ class CheckerTest extends TestCase {
->
method
(
'file_put_contents'
)
->
with
(
\
OC
::
$SERVERROOT
.
'/tests/data/integritycheck/htaccessWithInvalidModifiedContent//core/signature.json'
,
$expectedSignatureFileData
$this
->
callback
(
function
(
$arg
)
use
(
$expectedSignatureFileData
)
{
$this
->
assertEquals
(
json_decode
(
$expectedSignatureFileData
,
true
),
json_decode
(
$arg
,
true
)
);
return
true
;
})
);
$keyBundle
=
file_get_contents
(
__DIR__
.
'/../../data/integritycheck/core.crt'
);
...
...
@@ -542,7 +566,13 @@ class CheckerTest extends TestCase {
->
method
(
'file_put_contents'
)
->
with
(
\
OC
::
$SERVERROOT
.
'/tests/data/integritycheck/htaccessWithValidModifiedContent/core/signature.json'
,
$expectedSignatureFileData
$this
->
callback
(
function
(
$arg
)
use
(
$expectedSignatureFileData
)
{
$this
->
assertEquals
(
json_decode
(
$expectedSignatureFileData
,
true
),
json_decode
(
$arg
,
true
)
);
return
true
;
})
);
$keyBundle
=
file_get_contents
(
__DIR__
.
'/../../data/integritycheck/core.crt'
);
...
...
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