Fix willReturnOnConsecutiveCalls
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
3930ab8e8a
commit
8db32805be
|
@ -133,6 +133,7 @@ class ExternalSharesController extends Controller {
|
||||||
if (strpos($remote, '#') !== false || strpos($remote, '?') !== false) {
|
if (strpos($remote, '#') !== false || strpos($remote, '?') !== false) {
|
||||||
return new DataResponse(false);
|
return new DataResponse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$this->testUrl('https://' . $remote . '/ocs-provider/') ||
|
$this->testUrl('https://' . $remote . '/ocs-provider/') ||
|
||||||
$this->testUrl('https://' . $remote . '/ocs-provider/index.php') ||
|
$this->testUrl('https://' . $remote . '/ocs-provider/index.php') ||
|
||||||
|
|
|
@ -99,8 +99,8 @@ class ExternalShareControllerTest extends \Test\TestCase {
|
||||||
->expects($this->exactly(2))
|
->expects($this->exactly(2))
|
||||||
->method('getBody')
|
->method('getBody')
|
||||||
->willReturnOnConsecutiveCalls(
|
->willReturnOnConsecutiveCalls(
|
||||||
['Certainly not a JSON string'],
|
'Certainly not a JSON string',
|
||||||
['{"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1.0","edition":""}']
|
'{"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1.0","edition":""}'
|
||||||
);
|
);
|
||||||
$client
|
$client
|
||||||
->expects($this->any())
|
->expects($this->any())
|
||||||
|
@ -124,7 +124,13 @@ class ExternalShareControllerTest extends \Test\TestCase {
|
||||||
$response
|
$response
|
||||||
->expects($this->exactly(5))
|
->expects($this->exactly(5))
|
||||||
->method('getBody')
|
->method('getBody')
|
||||||
->will($this->onConsecutiveCalls('Certainly not a JSON string', 'Certainly not a JSON string', 'Certainly not a JSON string', 'Certainly not a JSON string', '{"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1.0","edition":""}'));
|
->willReturnOnConsecutiveCalls(
|
||||||
|
'Certainly not a JSON string',
|
||||||
|
'Certainly not a JSON string',
|
||||||
|
'Certainly not a JSON string',
|
||||||
|
'Certainly not a JSON string',
|
||||||
|
'{"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1.0","edition":""}'
|
||||||
|
);
|
||||||
$this->clientService
|
$this->clientService
|
||||||
->expects($this->exactly(5))
|
->expects($this->exactly(5))
|
||||||
->method('newClient')
|
->method('newClient')
|
||||||
|
|
Loading…
Reference in New Issue