]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix signCoretests
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 22 Nov 2019 09:06:07 +0000 (10:06 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 27 Nov 2019 12:34:42 +0000 (13:34 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tests/lib/Command/Integrity/SignCoreTest.php

index c496b864008a5f1a57b8e7280d9666e27a73927c..6f67b86f478cf3bf9f2f5e4d6379082f2bc5ec32 100644 (file)
@@ -150,7 +150,7 @@ class SignCoreTest extends TestCase {
                        ->expects($this->at(0))
                        ->method('file_get_contents')
                        ->with('privateKey')
-                       ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key'));
+                       ->willReturn(file_get_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key'));
                $this->fileAccessHelper
                        ->expects($this->at(1))
                        ->method('file_get_contents')
@@ -189,12 +189,12 @@ class SignCoreTest extends TestCase {
                        ->expects($this->at(0))
                        ->method('file_get_contents')
                        ->with('privateKey')
-                       ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key'));
+                       ->willReturn(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'));
+                       ->willReturn(file_get_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt'));
 
                $this->checker
                        ->expects($this->once())
@@ -233,12 +233,12 @@ class SignCoreTest extends TestCase {
                        ->expects($this->at(0))
                        ->method('file_get_contents')
                        ->with('privateKey')
-                       ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key'));
+                       ->willReturn(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'));
+                       ->willReturn(file_get_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt'));
 
                $this->checker
                        ->expects($this->once())