fix test
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
namespace tests\unit\Espo\Core\Upgrades\Actions;
|
||||
|
||||
use Espo\Core\Utils\Id\RecordIdGenerator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use tests\unit\ReflectionHelper;
|
||||
use Espo\Core\Utils\Util;
|
||||
@@ -79,6 +80,19 @@ class BaseTest extends TestCase
|
||||
[Log::class, $this->log],
|
||||
];
|
||||
|
||||
$idGenerator = $this->createMock(RecordIdGenerator::class);
|
||||
$idGenerator
|
||||
->expects($this->any())
|
||||
->method('generate')
|
||||
->willReturn(Util::generateId());
|
||||
|
||||
$this->injectableFactory
|
||||
->expects($this->any())
|
||||
->method('createResolved')
|
||||
->willReturnMap([
|
||||
[RecordIdGenerator::class, null, $idGenerator]
|
||||
]);
|
||||
|
||||
$this->injectableFactory
|
||||
->expects($this->any())
|
||||
->method('create')
|
||||
|
||||
Reference in New Issue
Block a user