mirror of
https://github.com/espocrm/espocrm.git
synced 2026-07-01 08:26:04 +00:00
fix tests
This commit is contained in:
@@ -32,6 +32,7 @@ namespace tests\unit\Espo\Core;
|
||||
use tests\unit\ReflectionHelper;
|
||||
|
||||
use Espo\Core\{
|
||||
Hook\GeneralInvoker,
|
||||
HookManager,
|
||||
InjectableFactory,
|
||||
Utils\Metadata,
|
||||
@@ -39,8 +40,7 @@ use Espo\Core\{
|
||||
Utils\File\Manager as FileManager,
|
||||
Utils\DataCache,
|
||||
Utils\Log,
|
||||
Utils\Module\PathProvider,
|
||||
};
|
||||
Utils\Module\PathProvider};
|
||||
|
||||
class HookManagerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
@@ -56,12 +56,10 @@ class HookManagerTest extends \PHPUnit\Framework\TestCase
|
||||
$this->config = $this->createMock(Config::class);
|
||||
|
||||
$this->injectableFactory = $this->createMock(InjectableFactory::class);
|
||||
|
||||
$this->dataCache = $this->createMock(DataCache::class);
|
||||
|
||||
$this->fileManager = new FileManager();
|
||||
|
||||
$this->pathProvider = $this->createMock(PathProvider::class);
|
||||
$this->generalInvoker = $this->createMock(GeneralInvoker::class);
|
||||
|
||||
$this->hookManager = new HookManager(
|
||||
$this->injectableFactory,
|
||||
@@ -70,7 +68,8 @@ class HookManagerTest extends \PHPUnit\Framework\TestCase
|
||||
$this->config,
|
||||
$this->dataCache,
|
||||
$this->createMock(Log::class),
|
||||
$this->pathProvider
|
||||
$this->pathProvider,
|
||||
$this->generalInvoker
|
||||
);
|
||||
|
||||
$this->reflection = new ReflectionHelper($this->hookManager);
|
||||
|
||||
@@ -30,11 +30,8 @@
|
||||
namespace tests\unit\Espo\Tools;
|
||||
|
||||
use tests\unit\ReflectionHelper;
|
||||
|
||||
use Espo\Tools\FieldManager\FieldManager;
|
||||
|
||||
use Espo\Core\InjectableFactory;
|
||||
use Espo\Core\Utils\FieldUtil;
|
||||
|
||||
class FieldManagerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
@@ -56,12 +53,10 @@ class FieldManagerTest extends \PHPUnit\Framework\TestCase
|
||||
$this->metadata,
|
||||
$this->language,
|
||||
$this->baseLanguage,
|
||||
$this->defaultLanguage,
|
||||
$this->createMock(FieldUtil::class)
|
||||
$this->metadataHelper
|
||||
);
|
||||
|
||||
$this->reflection = new ReflectionHelper($this->fieldManager);
|
||||
$this->reflection->setProperty('metadataHelper', $this->metadataHelper);
|
||||
}
|
||||
|
||||
public function testCreateExistingField()
|
||||
|
||||
Reference in New Issue
Block a user