PMCORE-3880 PhpUnit: Error: Call to undefined function factory

This commit is contained in:
Roly Gutierrez
2022-07-21 00:04:21 -04:00
parent 99fa155266
commit 01833eb210
295 changed files with 6494 additions and 4762 deletions

View File

@@ -18,6 +18,9 @@ class AuthSourcesEditTest extends TestCase
{
parent::setUp();
$this->settingUserLogged();
if (!defined('SYS_COLLECTION')) {
define('SYS_COLLECTION', 'case');
}
}
/**
@@ -59,7 +62,7 @@ class AuthSourcesEditTest extends TestCase
$fileName = PATH_METHODS . 'authSources/authSources_Edit.php';
$_REQUEST['AUTH_SOURCE_PROVIDER'] = 'ldapAdvanced';
$authenticationSource = factory(RbacAuthenticationSource::class)
$authenticationSource = RbacAuthenticationSource::factory()
->create();
$_GET['sUID'] = $authenticationSource->AUTH_SOURCE_UID;