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

@@ -39,8 +39,8 @@ class AppNotesTest extends TestCase
*/
public function it_test_case_notes_creation()
{
$application = factory(Application::class)->create();
$user = factory(User::class)->create();
$application = Application::factory()->create();
$user = User::factory()->create();
$reason = "The case was canceled due to:";
$appNotes = new ModelAppNotes();
$noteContent = addslashes($reason);
@@ -62,8 +62,8 @@ class AppNotesTest extends TestCase
*/
public function it_test_case_notes_creation_and_send_email_to_user()
{
$application = factory(Application::class)->create();
$user = factory(User::class)->create();
$application = Application::factory()->create();
$user = User::factory()->create();
$reason = "The case was canceled due to:";
$appNotes = new ModelAppNotes();
$noteContent = addslashes($reason);
@@ -91,9 +91,9 @@ class AppNotesTest extends TestCase
*/
public function it_test_case_notes_creation_and_send_email()
{
$application = factory(Application::class)->create();
$user = factory(User::class)->create();
factory(Delegation::class)->create([
$application = Application::factory()->create();
$user = User::factory()->create();
Delegation::factory()->create([
'APP_UID' => $application->APP_UID,
'USR_UID' => $user->USR_UID
]);
@@ -141,8 +141,8 @@ class AppNotesTest extends TestCase
$user = User::where('USR_UID', '=', '00000000000000000000000000000001')
->get()
->first();
$application = factory(Application::class)->create();
$delegation = factory(Delegation::class)->create([
$application = Application::factory()->create();
$delegation = Delegation::factory()->create([
'APP_UID' => $application->APP_UID,
'USR_UID' => $user->USR_UID
]);
@@ -174,17 +174,17 @@ class AppNotesTest extends TestCase
$user = User::where('USR_UID', '=', '00000000000000000000000000000001')
->get()
->first();
$application = factory(Application::class)->create();
$delegation = factory(Delegation::class)->create([
$application = Application::factory()->create();
$delegation = Delegation::factory()->create([
'APP_UID' => $application->APP_UID,
'USR_UID' => $user->USR_UID
]);
$appNote = factory(AppNotes::class)->create();
$appDocument = factory(Documents::class)->create([
$appNote = AppNotes::factory()->create();
$appDocument = Documents::factory()->create([
'APP_UID' => $application->APP_UID,
'DOC_ID' => $appNote->NOTE_ID
]);
factory(EmailServerModel::class)->create([
EmailServerModel::factory()->create([
'MESS_DEFAULT' => 1
]);
@@ -212,8 +212,8 @@ class AppNotesTest extends TestCase
*/
public function it_should_test_get_attached_files_from_the_casenote()
{
$appNote = factory(AppNotes::class)->create();
$appDocument = factory(Documents::class)->create([
$appNote = AppNotes::factory()->create();
$appDocument = Documents::factory()->create([
'DOC_ID' => $appNote->NOTE_ID
]);