From 66909a22619a86249c88b1c3db9b4612897b9dcd Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 13 Dec 2019 17:46:19 +0545 Subject: [PATCH] Pass real core.key core.crt in SignAppTest to fix 'Trying to access array offset on value of type bool' --- tests/lib/Command/Integrity/SignAppTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index de4c4f94dffd..c03289d0135d 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -221,23 +221,23 @@ public function testExecute() { ->expects($this->at(1)) ->method('getOption') ->with('privateKey') - ->will($this->returnValue('privateKey')); + ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') - ->will($this->returnValue('certificate')); + ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt')); $this->fileAccessHelper ->expects($this->at(0)) ->method('file_get_contents') - ->with('privateKey') - ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key')); + ->with(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key') + ->will($this->returnValue(\file_get_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key'))); $this->fileAccessHelper ->expects($this->at(1)) ->method('file_get_contents') - ->with('certificate') - ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt')); + ->with(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt') + ->will($this->returnValue(\file_get_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt'))); $this->checker ->expects($this->once())