PMCORE-3930 Check if the feature/PMCORE-3834 can be compatible with php 7.4.x

This commit is contained in:
Roly Gutierrez
2022-08-25 10:50:16 -04:00
parent 3706ac353b
commit a29bf73ab2
11 changed files with 332 additions and 337 deletions

View File

@@ -86,7 +86,7 @@ abstract class TestCase extends BaseTestCase
*/
public function truncateNonInitialModels(): void
{
DB::statement("set global max_connections = 300;");
DB::statement("set global max_connections = 500;");
if (empty(static::$truncateInitialTables)) {
$initialTables = [
'RBAC_PERMISSIONS',

View File

@@ -50,7 +50,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 6,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -74,7 +73,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -98,7 +96,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -122,7 +119,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -146,7 +142,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -171,7 +166,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -196,7 +190,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 4,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -225,7 +218,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 6,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -249,7 +241,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 5,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -273,7 +264,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 3,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -297,7 +287,6 @@ class PmDynaformTest extends TestCase
$arrayForm = $this->createArrayDynaform();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 7,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -333,7 +322,6 @@ class PmDynaformTest extends TestCase
$arrayForm = $this->createArrayDynaform();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 7,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -341,7 +329,6 @@ class PmDynaformTest extends TestCase
$arrayForm2 = $this->createArrayDynaform();
$dynaform2 = Dynaform::factory(1)->create([
'DYN_ID' => 9,
'DYN_UID' => $arrayForm2['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm2)
@@ -367,7 +354,6 @@ class PmDynaformTest extends TestCase
$arrayForm = $this->createArrayDynaform();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 7,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -375,7 +361,6 @@ class PmDynaformTest extends TestCase
$arrayForm2 = $this->createArrayDynaform();
$dynaform2 = Dynaform::factory(1)->create([
'DYN_ID' => 9,
'DYN_UID' => $arrayForm2['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm2)
@@ -418,7 +403,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 1,
'DYN_UID' => $arrayForm['items'][0]['id'],
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
@@ -445,7 +429,6 @@ class PmDynaformTest extends TestCase
$process = Process::factory(1)->create();
$dynaform = Dynaform::factory(1)->create([
'DYN_ID' => 2,
'PRO_UID' => $process[0]->PRO_UID,
'DYN_CONTENT' => G::json_encode($arrayForm)
]);

View File

@@ -40,27 +40,32 @@ class WorkspaceToolsTest extends TestCase
Delegation::factory()->create([
'APP_UID' => $application1->APP_UID,
'APP_NUMBER' => $application1->APP_NUMBER,
'DEL_TITLE' => $application1->APP_TITLE,
'DEL_INDEX' => 1
]);
Delegation::factory()->create([
'APP_UID' => $application1->APP_UID,
'APP_NUMBER' => $application1->APP_NUMBER,
'DEL_TITLE' => $application1->APP_TITLE,
'DEL_INDEX' => 2
]);
$delegation1 = Delegation::factory()->create([
'APP_UID' => $application1->APP_UID,
'APP_NUMBER' => $application1->APP_NUMBER,
'DEL_TITLE' => $application1->APP_TITLE,
'DEL_INDEX' => 3,
]);
Delegation::factory()->create([
'APP_UID' => $application2->APP_UID,
'APP_NUMBER' => $application2->APP_NUMBER,
'DEL_TITLE' => $application2->APP_TITLE,
'DEL_INDEX' => 1
]);
$delegation2 = Delegation::factory()->create([
'APP_UID' => $application2->APP_UID,
'APP_NUMBER' => $application2->APP_NUMBER,
'DEL_TITLE' => $application2->APP_TITLE,
'DEL_INDEX' => 2,
'DEL_LAST_INDEX' => 1
]);
@@ -68,11 +73,13 @@ class WorkspaceToolsTest extends TestCase
Delegation::factory()->create([
'APP_UID' => $application3->APP_UID,
'APP_NUMBER' => $application3->APP_NUMBER,
'DEL_TITLE' => $application3->APP_TITLE,
'DEL_INDEX' => 1
]);
$delegation3 = Delegation::factory()->create([
'APP_UID' => $application3->APP_UID,
'APP_NUMBER' => $application3->APP_NUMBER,
'DEL_TITLE' => $application3->APP_TITLE,
'DEL_INDEX' => 2,
'DEL_LAST_INDEX' => 1
]);

View File

@@ -20,15 +20,6 @@ class PmTablesProxyTest extends TestCase
use CreateTestSite;
use DatabaseTransactions;
protected $preserveGlobalState = false;
protected $runTestInSeparateProcess = true;
private $repTableBigInt;
private $repTableChar;
private $repTableInteger;
private $repTableSmallInt;
private $repTableTinyInt;
private $repTableVarChar;
private $repTableBigIntUid;
private $repTableCharUid;
private $repTableIntegerUid;
@@ -50,8 +41,7 @@ class PmTablesProxyTest extends TestCase
//Set the user logged as the admin
$_SESSION['USER_LOGGED'] = "00000000000000000000000000000001";
// The InputFilter class use deprecated code
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
$this->markTestSkipped("propel classes are not generated correctly");
}
/**
@@ -128,7 +118,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableBigInt = $reportTable->saveStructureOfTable($httpDatavarBigInt, true);
$reportTable->saveStructureOfTable($httpDatavarBigInt, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableBigIntUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -151,7 +141,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateBigInt = $obj->dataUpdate($httpDataUpdateBigInt);
$obj->dataUpdate($httpDataUpdateBigInt);
//Assert the values were updated
$resUpdateBigInt = $obj->dataView((object)["id" => $this->repTableBigIntUid]);
@@ -238,7 +228,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableChar = $reportTable->saveStructureOfTable($httpDatavarChar, true);
$reportTable->saveStructureOfTable($httpDatavarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -261,7 +251,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateChar = $obj->dataUpdate($httpDataUpdateChar);
$obj->dataUpdate($httpDataUpdateChar);
//Assert the values were updated
$resUpdateChar = $obj->dataView((object)["id" => $this->repTableCharUid]);
@@ -348,7 +338,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableInteger = $reportTable->saveStructureOfTable($httpDatavarInteger, true);
$reportTable->saveStructureOfTable($httpDatavarInteger, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableIntegerUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -362,7 +352,7 @@ class PmTablesProxyTest extends TestCase
];
//This will add rows to the PM tables
$res = $obj->dataCreate($httpDataInteger);
$obj->dataCreate($httpDataInteger);
//The variables that will be used to update the rows in the PM tables
$httpDataUpdateInteger = (object)[
@@ -371,7 +361,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateInteger = $obj->dataUpdate($httpDataUpdateInteger);
$obj->dataUpdate($httpDataUpdateInteger);
//Assert the values were updated
$resUpdateInteger = $obj->dataView((object)["id" => $this->repTableIntegerUid]);
@@ -458,7 +448,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableSmallInt = $reportTable->saveStructureOfTable($httpDatavarSmallInt, true);
$reportTable->saveStructureOfTable($httpDatavarSmallInt, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableSmallIntUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -481,7 +471,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateSmallInt = $obj->dataUpdate($httpDataUpdateSmallInt);
$obj->dataUpdate($httpDataUpdateSmallInt);
//Assert the values were updated
$resUpdateSmallInt = $obj->dataView((object)["id" => $this->repTableSmallIntUid]);
@@ -567,7 +557,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableTinyInt = $reportTable->saveStructureOfTable($httpDatavarTinyInt, true);
$reportTable->saveStructureOfTable($httpDatavarTinyInt, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableTinyIntUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -590,7 +580,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateTinyInt = $obj->dataUpdate($httpDataUpdateTinyInt);
$obj->dataUpdate($httpDataUpdateTinyInt);
//Assert the values were updated
$resUpdateTinyInt = $obj->dataView((object)["id" => $this->repTableTinyIntUid]);
@@ -676,7 +666,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableVarChar = $reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableVarCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -699,7 +689,7 @@ class PmTablesProxyTest extends TestCase
];
//This method update the PM tables rows
$resultDataUpdateVarChar = $obj->dataUpdate($httpDataUpdateVarChar);
$obj->dataUpdate($httpDataUpdateVarChar);
//Assert the values were updated
$resUpdateVarChar = $obj->dataView((object)["id" => $this->repTableVarCharUid]);
@@ -784,7 +774,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableVarChar = $reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableVarCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -858,7 +848,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableVarChar = $reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableVarCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -937,7 +927,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableVarChar = $reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableVarCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];
@@ -951,7 +941,7 @@ class PmTablesProxyTest extends TestCase
];
//This will add rows to the PM tables
$r = $obj->dataCreate($httpDataVarChar);
$obj->dataCreate($httpDataVarChar);
//The variables that will be used to update the rows in the PM tables
$httpDataUpdateVarChar = (object)[
@@ -1058,7 +1048,7 @@ class PmTablesProxyTest extends TestCase
];
//This create the report tables
$this->repTableVarChar = $reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$reportTable->saveStructureOfTable($httpDatavarVarChar, true);
$pmTablesList = new AdditionalTables();
$resuPmTableList = $pmTablesList->getAll();
$this->repTableVarCharUid = $resuPmTableList['rows'][0]['ADD_TAB_UID'];