->expects($this->once())
->method('file_put_contents')
->with(
- \OC::$SERVERROOT . '/tests/data/integritycheck/app//appinfo/signature.json',
- $expectedSignatureFileData
+ $this->equalTo(\OC::$SERVERROOT . '/tests/data/integritycheck/app//appinfo/signature.json'),
+ $this->callback(function($signature) use ($expectedSignatureFileData) {
+ $expectedArray = json_decode($expectedSignatureFileData, true);
+ $actualArray = json_decode($signature, true);
+ $this->assertEquals($expectedArray, $actualArray);
+ return true;
+ })
);
$keyBundle = file_get_contents(__DIR__ .'/../../data/integritycheck/SomeApp.crt');
->method('file_put_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/app//core/signature.json',
- $expectedSignatureFileData
+ $this->callback(function($signature) use ($expectedSignatureFileData) {
+ $expectedArray = json_decode($expectedSignatureFileData, true);
+ $actualArray = json_decode($signature, true);
+ $this->assertEquals($expectedArray, $actualArray);
+ return true;
+ })
);
$keyBundle = file_get_contents(__DIR__ .'/../../data/integritycheck/core.crt');
->method('file_put_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessUnmodified//core/signature.json',
- $expectedSignatureFileData
+ $this->callback(function($signature) use ($expectedSignatureFileData) {
+ $expectedArray = json_decode($expectedSignatureFileData, true);
+ $actualArray = json_decode($signature, true);
+ $this->assertEquals($expectedArray, $actualArray);
+ return true;
+ })
);
$keyBundle = file_get_contents(__DIR__ .'/../../data/integritycheck/core.crt');
->method('file_put_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithInvalidModifiedContent//core/signature.json',
- $expectedSignatureFileData
+ $this->callback(function($signature) use ($expectedSignatureFileData) {
+ $expectedArray = json_decode($expectedSignatureFileData, true);
+ $actualArray = json_decode($signature, true);
+ $this->assertEquals($expectedArray, $actualArray);
+ return true;
+ })
);
$keyBundle = file_get_contents(__DIR__ .'/../../data/integritycheck/core.crt');
->method('file_put_contents')
->with(
\OC::$SERVERROOT . '/tests/data/integritycheck/htaccessWithValidModifiedContent/core/signature.json',
- $expectedSignatureFileData
+ $this->callback(function($signature) use ($expectedSignatureFileData) {
+ $expectedArray = json_decode($expectedSignatureFileData, true);
+ $actualArray = json_decode($signature, true);
+ $this->assertEquals($expectedArray, $actualArray);
+ return true;
+ })
);
$keyBundle = file_get_contents(__DIR__ .'/../../data/integritycheck/core.crt');