mirror of
https://github.com/friendica/friendica
synced 2025-09-05 22:05:26 +02:00
Fix namespace in IntallerTest, mock function_exists() with PHPMock
This commit is contained in:
parent
7de3b16dc3
commit
5ecee2b9f7
2 changed files with 253 additions and 106 deletions
|
@ -5,7 +5,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
/// @todo Use right namespace - needs alternative way of mocking random_int()
|
||||
namespace Friendica\Test\src\Util;
|
||||
|
||||
use Friendica\Util\Crypto;
|
||||
|
@ -42,7 +41,7 @@ class CryptoTest extends TestCase
|
|||
public function testRandomDigitsRandomInt()
|
||||
{
|
||||
$random_int = $this->getFunctionMock(__NAMESPACE__, 'random_int');
|
||||
$random_int->expects($this->any())->willReturnCallback(function($min, $max) {
|
||||
$random_int->expects($this->any())->willReturnCallback(function($min, $max) {
|
||||
global $phpMock;
|
||||
if (isset($phpMock['random_int'])) {
|
||||
return call_user_func_array($phpMock['random_int'], func_get_args());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue