PMCORE-3880 PhpUnit: Error: Call to undefined function factory
This commit is contained in:
@@ -4,7 +4,6 @@ namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Faker\Factory;
|
||||
use G;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use ProcessMaker\Model\DbSource;
|
||||
use ProcessMaker\Model\ProcessCategory;
|
||||
use ProcessMaker\Model\User;
|
||||
@@ -25,7 +24,7 @@ class ExecuteQueryTest extends TestCase
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
ProcessCategory::truncate();
|
||||
$this->truncateNonInitialModels();
|
||||
$this->oldContentSystemTables = "";
|
||||
$path = PATH_CONFIG . $this->nameSystemTables;
|
||||
if (file_exists($path)) {
|
||||
@@ -47,7 +46,7 @@ class ExecuteQueryTest extends TestCase
|
||||
*/
|
||||
public function it_must_return_the_result_of_execute_query_method()
|
||||
{
|
||||
$user = factory(User::class, 5)->create();
|
||||
$user = User::factory(5)->create();
|
||||
|
||||
$user = $user->sortByDesc('USR_UID')->values()->map(function($item) {
|
||||
$result = [
|
||||
@@ -139,7 +138,7 @@ class ExecuteQueryTest extends TestCase
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
$category = ProcessCategory::factory()->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
@@ -176,7 +175,7 @@ class ExecuteQueryTest extends TestCase
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
$category = ProcessCategory::factory()->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
@@ -205,7 +204,7 @@ class ExecuteQueryTest extends TestCase
|
||||
{
|
||||
$this->expectException(SQLException::class);
|
||||
$database = env('DB_DATABASE');
|
||||
$category = factory(ProcessCategory::class)->create();
|
||||
$category = ProcessCategory::factory()->create();
|
||||
|
||||
$sql = ""
|
||||
. "DELETE FROM {$database}.PROCESS_CATEGORY "
|
||||
@@ -228,7 +227,7 @@ class ExecuteQueryTest extends TestCase
|
||||
public function this_connects_to_an_external_database_using_the_execute_query_method()
|
||||
{
|
||||
$dbName = env('DB_DATABASE');
|
||||
$dbSource = factory(DbSource::class)->create([
|
||||
$dbSource = DbSource::factory()->create([
|
||||
'DBS_TYPE' => 'mysql',
|
||||
'DBS_SERVER' => env('DB_HOST'),
|
||||
'DBS_DATABASE_NAME' => $dbName,
|
||||
@@ -253,10 +252,10 @@ class ExecuteQueryTest extends TestCase
|
||||
*/
|
||||
public function this_connects_to_an_external_oracle_database_using_the_execute_query_method()
|
||||
{
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
$this->markTestSkipped('This test has not been implemented yet.');
|
||||
|
||||
$dbName = "XE";
|
||||
$dbSource = factory(DbSource::class)->create([
|
||||
$dbSource = DbSource::factory()->create([
|
||||
'DBS_TYPE' => 'oracle',
|
||||
'DBS_CONNECTION_TYPE' => 'NORMAL',
|
||||
'DBS_SERVER' => 'localhost',
|
||||
@@ -322,7 +321,7 @@ class ExecuteQueryTest extends TestCase
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
$category = ProcessCategory::factory()->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFAddCaseNoteTest extends TestCase
|
||||
public function it_add_case_notes()
|
||||
{
|
||||
// Create notes
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
// Force commit for propel
|
||||
DB::commit();
|
||||
$result = PMFAddCaseNote($table->APP_UID, $table->PRO_UID, $table->TAS_UID, $table->USR_UID, 'note');
|
||||
|
||||
@@ -26,15 +26,15 @@ class PMFAssignUserToGroupTest extends TestCase
|
||||
{
|
||||
// Create user
|
||||
global $RBAC;
|
||||
$user = factory(User::class)->create();
|
||||
factory(RbacUsers::class)->create([
|
||||
$user = User::factory()->create();
|
||||
RbacUsers::factory()->create([
|
||||
'USR_UID' => $user->USR_UID,
|
||||
'USR_USERNAME' => $user->USR_USERNAME,
|
||||
'USR_FIRSTNAME' => $user->USR_FIRSTNAME,
|
||||
'USR_LASTNAME' => $user->USR_LASTNAME
|
||||
]);
|
||||
// Create group
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFAssignUserToGroup($user->USR_UID, $group->GRP_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -13,7 +13,7 @@ use Tests\TestCase;
|
||||
*
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFCaseInformation.28.29
|
||||
*/
|
||||
class PMFCaseInformation extends TestCase
|
||||
class PMFCaseInformationTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
@@ -32,7 +32,7 @@ class PMFCaseInformation extends TestCase
|
||||
*/
|
||||
public function it_should_test_this_pmfunction_default_parameters()
|
||||
{
|
||||
$table = factory(Application::class)->states('foreign_keys')->create();
|
||||
$table = Application::factory()->foreign_keys()->create();
|
||||
// Force commit for propel
|
||||
DB::commit();
|
||||
// Call the funtion
|
||||
@@ -74,8 +74,8 @@ class PMFCaseInformation extends TestCase
|
||||
*/
|
||||
public function it_should_test_this_pmfunction_index_parameter()
|
||||
{
|
||||
$application = factory(Application::class)->states('todo')->create();
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create([
|
||||
$application = Application::factory()->todo()->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create([
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'APP_UID' => $application->APP_UID,
|
||||
]);
|
||||
@@ -104,8 +104,8 @@ class PMFCaseInformation extends TestCase
|
||||
*/
|
||||
public function it_should_test_this_pmfunction_app_data_parameter()
|
||||
{
|
||||
$application = factory(Application::class)->states('todo')->create();
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create([
|
||||
$application = Application::factory()->todo()->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create([
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'APP_UID' => $application->APP_UID,
|
||||
]);
|
||||
|
||||
@@ -24,8 +24,8 @@ class PMFCaseListTest extends TestCase
|
||||
public function it_return_list_of_cases()
|
||||
{
|
||||
// Create delegation
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
factory(AppThread::class)->create([
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
AppThread::factory()->create([
|
||||
'APP_THREAD_STATUS' => 'OPEN',
|
||||
'APP_UID' => $table->APP_UID
|
||||
]);
|
||||
|
||||
@@ -25,8 +25,8 @@ class PMFCreateUserTest extends TestCase
|
||||
public function it_create_user()
|
||||
{
|
||||
// Create User
|
||||
$user = factory(User::class)->create();
|
||||
factory(RbacUsers::class)->create([
|
||||
$user = User::factory()->create();
|
||||
RbacUsers::factory()->create([
|
||||
'USR_UID' => $user->USR_UID,
|
||||
'USR_USERNAME' => $user->USR_USERNAME,
|
||||
'USR_FIRSTNAME' => $user->USR_FIRSTNAME,
|
||||
|
||||
@@ -25,8 +25,8 @@ class PMFDeleteCaseTest extends TestCase
|
||||
public function it_should_test_this_pmfunction_default_parameters()
|
||||
{
|
||||
$this->expectException(Exception::class);
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
factory(Triggers::class)->create([
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
Triggers::factory()->create([
|
||||
'PRO_UID' => $table->PRO_UID
|
||||
]);
|
||||
// Force commit for propel
|
||||
|
||||
@@ -24,8 +24,8 @@ class PMFGetCaseNotesTest extends TestCase
|
||||
public function it_get_case_notes()
|
||||
{
|
||||
// Create notes
|
||||
$user = factory(User::class)->create();
|
||||
$table = factory(AppNotes::class)->create([
|
||||
$user = User::factory()->create();
|
||||
$table = AppNotes::factory()->create([
|
||||
'USR_UID' => $user->USR_UID
|
||||
]);
|
||||
// Force commit for propel
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGetGroupNameTest extends TestCase
|
||||
public function it_get_group_name()
|
||||
{
|
||||
// Create group
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetGroupName($group->GRP_TITLE, 'en');
|
||||
$this->assertFalse($result);
|
||||
|
||||
@@ -22,7 +22,7 @@ class PMFGetGroupUIDTest extends TestCase
|
||||
public function it_group_uid()
|
||||
{
|
||||
// Create group
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
$result = PMFGetGroupUID($group->GRP_UID);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGetGroupUsersTest extends TestCase
|
||||
public function it_return_list_of_groups()
|
||||
{
|
||||
// Create group
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetGroupUsers($group->GRP_UID);
|
||||
$this->assertEmpty($result);
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGetProcessUidByNameTest extends TestCase
|
||||
public function it_return_process()
|
||||
{
|
||||
// Create process
|
||||
$table = factory(Process::class)->create();
|
||||
$table = Process::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetProcessUidByName($table->PRO_TITLE);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGetTaskNameTest extends TestCase
|
||||
public function it_return_task_name()
|
||||
{
|
||||
// Create task
|
||||
$task = factory(Task::class)->create();
|
||||
$task = Task::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetTaskName($task->TAS_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGetTaskUIDTest extends TestCase
|
||||
public function it_return_task_uid()
|
||||
{
|
||||
// Create task
|
||||
$table = factory(Task::class)->states('foreign_keys')->create();
|
||||
$table = Task::factory()->foreign_keys()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetTaskUID($table->TAS_TITLE);
|
||||
$this->assertFalse($result);
|
||||
|
||||
@@ -22,7 +22,7 @@ class PMFGetUserEmailAddressTest extends TestCase
|
||||
{
|
||||
// Create User
|
||||
global $RBAC;
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGetUserEmailAddress([$user->USR_UID], null);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFGroupListTest extends TestCase
|
||||
public function it_return_list_of_groups()
|
||||
{
|
||||
// Create group
|
||||
factory(Groupwf::class)->create();
|
||||
Groupwf::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFGroupList();
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -24,7 +24,7 @@ class PMFInformationUserTest extends TestCase
|
||||
{
|
||||
// Create User
|
||||
global $RBAC;
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFInformationUser($user->USR_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -24,7 +24,7 @@ class PMFNewCaseImpersonateTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_this_pmfunction_default_parameters()
|
||||
{
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
// Force commit for propel
|
||||
DB::commit();
|
||||
$result = PMFNewCaseImpersonate($table->PRO_UID, $table->USR_UID, [], '');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -24,7 +24,7 @@ class PMFNewCaseTest extends TestCase
|
||||
*/
|
||||
public function it_should_test_this_pmfunction_default_parameters()
|
||||
{
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
// Force commit for propel
|
||||
DB::commit();
|
||||
$result = PMFNewCase($table->PRO_UID, $table->USR_UID, $table->TAS_UID, [], null);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use ProcessMaker\Model\GroupUser;
|
||||
use ProcessMaker\Model\Groupwf;
|
||||
use ProcessMaker\Model\RbacUsers;
|
||||
@@ -56,7 +54,7 @@ class PMFNewUserTest extends TestCase
|
||||
$RBAC->initRBAC();
|
||||
$RBAC->loadUserRolePermission('PROCESSMAKER', $_SESSION['USER_LOGGED']);
|
||||
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
|
||||
// Active
|
||||
$result = PMFNewUser("test", "Test123*", "test", "test", "test@test.com", "PROCESSMAKER_ADMIN", null, null, $group['GRP_UID']);
|
||||
|
||||
@@ -22,7 +22,7 @@ class PMFProcessListTest extends TestCase
|
||||
public function it_return_list_of_process()
|
||||
{
|
||||
// Create delegation
|
||||
factory(Process::class)->create();
|
||||
Process::factory()->create();
|
||||
$result = PMFProcessList();
|
||||
$this->assertNotEmpty($result);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ class PMFRemoveUsersFromGroupTest extends TestCase
|
||||
public function it_remove_user_group()
|
||||
{
|
||||
// Create group
|
||||
$user = factory(User::class)->create();
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$groupUser = factory(GroupUser::class)->create([
|
||||
$user = User::factory()->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
$groupUser = GroupUser::factory()->create([
|
||||
'GRP_UID' => $group->GRP_UID,
|
||||
'GRP_ID' => $group->GRP_ID,
|
||||
'USR_UID' =>$user->USR_UID
|
||||
|
||||
@@ -25,9 +25,9 @@ class PMFRemoveUsersToGroupTest extends TestCase
|
||||
public function it_remove_user_group()
|
||||
{
|
||||
// Create group
|
||||
$user = factory(User::class)->create();
|
||||
$group = factory(Groupwf::class)->create();
|
||||
$groupUser = factory(GroupUser::class)->create([
|
||||
$user = User::factory()->create();
|
||||
$group = Groupwf::factory()->create();
|
||||
$groupUser = GroupUser::factory()->create([
|
||||
'GRP_UID' => $group->GRP_UID,
|
||||
'GRP_ID' => $group->GRP_ID,
|
||||
'USR_UID' =>$user->USR_UID
|
||||
|
||||
@@ -24,7 +24,7 @@ class PMFRoleListTest extends TestCase
|
||||
{
|
||||
// Create roles
|
||||
global $RBAC;
|
||||
factory(RbacRoles::class)->create();
|
||||
RbacRoles::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFRoleList();
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -39,7 +39,7 @@ class PMFSendMessageTest extends TestCase
|
||||
mkdir(PATH_DATA_SITE . 'mailTemplates' . PATH_SEP . $proUid);
|
||||
}
|
||||
file_put_contents(PATH_DATA_SITE . 'mailTemplates' . PATH_SEP . $proUid . PATH_SEP . 'template.html', $data);
|
||||
$template = factory(\ProcessMaker\Model\ProcessFiles::class)->create([
|
||||
$template = \ProcessMaker\Model\ProcessFiles::factory()->create([
|
||||
'PRO_UID' => $proUid,
|
||||
'USR_UID' => $usrUid,
|
||||
'PRF_PATH' => 'template.html'
|
||||
@@ -56,7 +56,7 @@ class PMFSendMessageTest extends TestCase
|
||||
{
|
||||
$passwordEnv = env('emailAccountPassword');
|
||||
$password = G::encrypt("hash:" . $passwordEnv, 'EMAILENCRYPT');
|
||||
$emailServer = factory(EmailServerModel::class)->create([
|
||||
$emailServer = EmailServerModel::factory()->create([
|
||||
'MESS_ENGINE' => env('emailEngine'),
|
||||
'MESS_SERVER' => env('emailServer'),
|
||||
'MESS_PORT' => env('emailPort'),
|
||||
@@ -82,11 +82,11 @@ class PMFSendMessageTest extends TestCase
|
||||
*/
|
||||
public function it_send_message_related_to_same_case()
|
||||
{
|
||||
$user = factory(User::class)->create();
|
||||
$process = factory(Process::class)->create([
|
||||
$user = User::factory()->create();
|
||||
$process = Process::factory()->create([
|
||||
'PRO_CREATE_USER' => $user->USR_UID
|
||||
]);
|
||||
$app = factory(Application::class)->create([
|
||||
$app = Application::factory()->create([
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'APP_INIT_USER' => $user->USR_UID,
|
||||
'APP_CUR_USER' => $user->USR_UID
|
||||
@@ -111,10 +111,10 @@ class PMFSendMessageTest extends TestCase
|
||||
*/
|
||||
public function it_send_message_related_to_different_case()
|
||||
{
|
||||
$user = factory(User::class)->create();
|
||||
$process = factory(Process::class)->create();
|
||||
$app = factory(Application::class)->create(['PRO_UID' => $process->PRO_UID]);
|
||||
$app2 = factory(Application::class)->create(['PRO_UID' => $process->PRO_UID]);
|
||||
$user = User::factory()->create();
|
||||
$process = Process::factory()->create();
|
||||
$app = Application::factory()->create(['PRO_UID' => $process->PRO_UID]);
|
||||
$app2 = Application::factory()->create(['PRO_UID' => $process->PRO_UID]);
|
||||
$template = $this->createTemplate($process->PRO_UID, $user->USR_UID);
|
||||
$emailServer = $this->createEmailServer();
|
||||
// Set different case in session
|
||||
|
||||
@@ -23,8 +23,8 @@ class PMFTaskCaseTest extends TestCase
|
||||
*/
|
||||
public function it_return_pending_tasks()
|
||||
{
|
||||
$task = factory(Task::class)->create();
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create([
|
||||
$task = Task::factory()->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create([
|
||||
'TAS_ID' => $task->TAS_ID,
|
||||
'TAS_UID' => $task->TAS_UID
|
||||
]);
|
||||
|
||||
@@ -25,11 +25,11 @@ class PMFTaskListTest extends TestCase
|
||||
public function it_return_pending_tasks()
|
||||
{
|
||||
// Create task
|
||||
$task = factory(Task::class)->create();
|
||||
$task = Task::factory()->create();
|
||||
// Create user
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
// Assign a user in the task
|
||||
factory(TaskUser::class)->create([
|
||||
TaskUser::factory()->create([
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
'TU_RELATION' => 1, //Related to the user
|
||||
|
||||
@@ -23,7 +23,7 @@ class PMFTasksListByProcessIdTest extends TestCase
|
||||
public function it_return_process_tasks()
|
||||
{
|
||||
// Create task
|
||||
$task = factory(Task::class)->create();
|
||||
$task = Task::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFTasksListByProcessId($task->PRO_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
@@ -25,7 +25,7 @@ class PMFUnpauseCaseTest extends TestCase
|
||||
public function it_should_test_this_pmfunction_default_parameters()
|
||||
{
|
||||
$this->expectException(Exception::class);
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$table = Delegation::factory()->foreign_keys()->create();
|
||||
// Force commit for propel
|
||||
DB::commit();
|
||||
$result = PMFUnpauseCase($table->APP_UID, $table->DEL_INDEX, $table->USR_UID);
|
||||
|
||||
@@ -24,7 +24,7 @@ class PMFUpdateUserTest extends TestCase
|
||||
{
|
||||
// Create User
|
||||
global $RBAC;
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
DB::commit();
|
||||
$result = PMFUpdateUser($user->USR_UID, $user->USR_USERNAME, 'John A.');
|
||||
$this->assertEquals(0, $result);
|
||||
|
||||
@@ -22,7 +22,7 @@ class PMFUserListTest extends TestCase
|
||||
public function it_return_list_of_users()
|
||||
{
|
||||
// Create user
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
$result = PMFUserList();
|
||||
$this->assertNotEmpty($result);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class UserInfoTest extends TestCase
|
||||
{
|
||||
// Create User
|
||||
global $RBAC;
|
||||
$user = factory(User::class)->create();
|
||||
$user = User::factory()->create();
|
||||
DB::commit();
|
||||
$result = userInfo($user->USR_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
|
||||
Reference in New Issue
Block a user