PMCORE-3880 PhpUnit: Error: Call to undefined function factory
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use ProcessMaker\Model\Application;
|
||||
@@ -12,9 +11,7 @@ use Tests\TestCase;
|
||||
|
||||
class ReportTablesTest extends TestCase
|
||||
{
|
||||
|
||||
use CreateTestSite;
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* Sets up the unit tests.
|
||||
@@ -645,19 +642,19 @@ class ReportTablesTest extends TestCase
|
||||
$appData = array_merge($appData, $gridFields);
|
||||
}
|
||||
|
||||
$user = factory(User::class)->create([
|
||||
$user = User::factory()->create([
|
||||
'USR_UID' => $userUid
|
||||
]);
|
||||
|
||||
$process = factory(Process::class)->create([
|
||||
$process = Process::factory()->create([
|
||||
'PRO_UID' => $processUid
|
||||
]);
|
||||
|
||||
$task = factory(Task::class)->create([
|
||||
$task = Task::factory()->create([
|
||||
'PRO_UID' => $process->PRO_UID
|
||||
]);
|
||||
|
||||
$application = factory(Application::class)->create([
|
||||
$application = Application::factory()->create([
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'APP_UID' => $applicationUid,
|
||||
'APP_NUMBER' => $applicationNumber,
|
||||
@@ -825,7 +822,7 @@ class ReportTablesTest extends TestCase
|
||||
$grid = 'var_Grid1';
|
||||
|
||||
//assert exception
|
||||
$this->expectException(Exception::class);
|
||||
$this->expectException(TypeError::class);
|
||||
|
||||
$reportTables = new ReportTables();
|
||||
$reportTables->populateTable($tableName, $connectionShortName, $type, null, $proUid, $grid);
|
||||
|
||||
Reference in New Issue
Block a user