This commit is contained in:
Yuri Kuznetsov
2024-10-05 14:28:17 +03:00
parent 7969d6aa91
commit 15b2ba3f3f
@@ -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')