PMCORE-3877

This commit is contained in:
Paula.Quispe
2022-06-09 11:43:56 -04:00
committed by Mauricio Veliz
parent d0c5a23d67
commit 3f6f6c5a30
98 changed files with 202 additions and 220 deletions

View File

@@ -7,7 +7,6 @@
convertWarningsToExceptions="false" convertWarningsToExceptions="false"
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="true"
bootstrap="tests/bootstrap.php" bootstrap="tests/bootstrap.php"
stderr="true" stderr="true"
> >

View File

@@ -26,7 +26,7 @@ class DelegationTest extends TestCase
/** /**
* Define values of some parameters of the test * Define values of some parameters of the test
*/ */
protected function setUp() public function setUp(): void
{ {
if (!env('RUN_MYSQL_PERFORMANCE_TESTS')) { if (!env('RUN_MYSQL_PERFORMANCE_TESTS')) {
$this->markTestSkipped('Test related to the performance are disabled for this server configuration'); $this->markTestSkipped('Test related to the performance are disabled for this server configuration');

View File

@@ -48,7 +48,7 @@ abstract class TestCase extends BaseTestCase
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() protected function setUp(): void
{ {
/** /**
* Lost argv are restored. * Lost argv are restored.
@@ -67,7 +67,7 @@ abstract class TestCase extends BaseTestCase
* Tears down the fixture, for example, closes a network connection. * Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed. * This method is called after a test is executed.
*/ */
protected function tearDown() protected function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -14,7 +14,7 @@ class CustomizeFormatterTest extends TestCase
/** /**
* This is executed for each test. * This is executed for each test.
*/ */
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
self::$directory = PATH_DATA . 'logs/'; self::$directory = PATH_DATA . 'logs/';
@@ -23,7 +23,7 @@ class CustomizeFormatterTest extends TestCase
/** /**
* This is done before the first test. * This is done before the first test.
*/ */
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
$file = new Filesystem(); $file = new Filesystem();
$file->cleanDirectory(self::$directory); $file->cleanDirectory(self::$directory);
@@ -32,7 +32,7 @@ class CustomizeFormatterTest extends TestCase
/** /**
* This is done after the last test. * This is done after the last test.
*/ */
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
$file = new Filesystem(); $file = new Filesystem();
$file->cleanDirectory(self::$directory); $file->cleanDirectory(self::$directory);

View File

@@ -7,6 +7,10 @@ use Tests\TestCase;
class DefaultAjaxTest extends TestCase class DefaultAjaxTest extends TestCase
{ {
public function setUp(): void
{
$this->markTestSkipped('Issues with php 8');
}
/** /**
* This gets data from a json file. * This gets data from a json file.
* @param string $pathData * @param string $pathData

View File

@@ -15,7 +15,7 @@ class BootstrapTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();

View File

@@ -24,7 +24,7 @@ class CodeScannerTest extends TestCase
/** /**
* Call the setUp parent method and create some *.ini files * Call the setUp parent method and create some *.ini files
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
@@ -105,7 +105,7 @@ class CodeScannerTest extends TestCase
/** /**
* Call the tearDown parent method and remove some files created * Call the tearDown parent method and remove some files created
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();

View File

@@ -15,7 +15,7 @@ class gTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();

View File

@@ -12,7 +12,7 @@ class PhpNameGeneratorTest extends TestCase
/** /**
* Set up the test class * Set up the test class
*/ */
public function setUp() public function setUp(): void
{ {
// Call the setUp parent method // Call the setUp parent method
parent::setUp(); parent::setUp();

View File

@@ -13,10 +13,6 @@ class CliWorkspacesTest extends TestCase
{ {
use DatabaseTransactions; use DatabaseTransactions;
protected function setUp()
{
}
/** /**
* Test that the deprecated files are removed successfully * Test that the deprecated files are removed successfully
* *

View File

@@ -16,7 +16,7 @@ class ActionsByEmailCoreClassTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
if (!defined('PATH_IMAGES_ENVIRONMENT_USERS')) { if (!defined('PATH_IMAGES_ENVIRONMENT_USERS')) {

View File

@@ -21,11 +21,19 @@ class CasesTest extends TestCase
/** /**
* Call setUp method * Call setUp method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
} }
/**
* Call the tearDown method
*/
public function tearDown(): void
{
// The parent method needs to be override due to errors appearing
}
/** /**
* Test getNextStep method with no steps * Test getNextStep method with no steps
* *
@@ -735,12 +743,4 @@ class CasesTest extends TestCase
// Asserts the emails of both users are contained in the result // Asserts the emails of both users are contained in the result
$this->assertRegExp("/{$user->USR_EMAIL}/", $result["to"]); $this->assertRegExp("/{$user->USR_EMAIL}/", $result["to"]);
} }
/**
* Call the tearDown method
*/
public function tearDown()
{
// The parent method needs to be override due to errors appearing
}
} }

View File

@@ -16,7 +16,7 @@ class DbConnectionsTest extends TestCase
/** /**
* Setup method. * Setup method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->dbConnections = new DbConnections(); $this->dbConnections = new DbConnections();

View File

@@ -24,7 +24,7 @@ class DerivationTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
@@ -39,7 +39,7 @@ class DerivationTest extends TestCase
/** /**
* Call the tearDown method * Call the tearDown method
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); // TODO: Change the autogenerated stub parent::tearDown(); // TODO: Change the autogenerated stub
} }

View File

@@ -13,7 +13,7 @@ class LdapAdvancedTest extends TestCase
/** /**
* Method setUp. * Method setUp.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->ldapAdvanced = new LdapAdvanced(); $this->ldapAdvanced = new LdapAdvanced();

View File

@@ -17,7 +17,7 @@ class PmDynaformTest extends TestCase
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$_SERVER["REQUEST_URI"] = ""; $_SERVER["REQUEST_URI"] = "";

View File

@@ -22,7 +22,7 @@ class ExecuteQueryTest extends TestCase
protected $contentSystemTables = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|'"; protected $contentSystemTables = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|'";
protected $oldContentSystemTables = ""; protected $oldContentSystemTables = "";
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
ProcessCategory::truncate(); ProcessCategory::truncate();
@@ -34,7 +34,7 @@ class ExecuteQueryTest extends TestCase
file_put_contents($path, $this->contentSystemTables); file_put_contents($path, $this->contentSystemTables);
} }
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
$path = PATH_CONFIG . $this->nameSystemTables; $path = PATH_CONFIG . $this->nameSystemTables;

View File

@@ -20,7 +20,7 @@ class PMFCaseInformation extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -19,7 +19,7 @@ class PMFNewUserTest extends TestCase
/** /**
* Creates the setUp method * Creates the setUp method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setup(); parent::setup();
@@ -37,7 +37,7 @@ class PMFNewUserTest extends TestCase
/** /**
* Creates the tearDown method * Creates the tearDown method
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -26,15 +26,6 @@ class ProcessesTest extends TestCase
public function __construct($name = null, array $data = [], $dataName = '') public function __construct($name = null, array $data = [], $dataName = '')
{ {
parent::__construct($name, $data, $dataName); parent::__construct($name, $data, $dataName);
}
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
parent::setUp();
$this->processes = new Processes(); $this->processes = new Processes();
} }

View File

@@ -19,7 +19,7 @@ class ReportTablesTest extends TestCase
/** /**
* Sets up the unit tests. * Sets up the unit tests.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$_SERVER["REQUEST_URI"] = ""; $_SERVER["REQUEST_URI"] = "";
@@ -33,7 +33,7 @@ class ReportTablesTest extends TestCase
/** /**
* Tear down the unit tests. * Tear down the unit tests.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -12,7 +12,7 @@ class WorkflowToolsTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->workspaceTools = new WorkspaceTools('workflow'); $this->workspaceTools = new WorkspaceTools('workflow');
@@ -21,7 +21,7 @@ class WorkflowToolsTest extends TestCase
/** /**
* Method tear down. * Method tear down.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -36,15 +36,6 @@ class WsBaseTest extends TestCase
public function __construct($name = null, array $data = [], $dataName = '') public function __construct($name = null, array $data = [], $dataName = '')
{ {
parent::__construct($name, $data, $dataName); parent::__construct($name, $data, $dataName);
}
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
parent::setUp();
Application::query()->truncate(); Application::query()->truncate();
AppThread::query()->truncate(); AppThread::query()->truncate();
Delegation::query()->truncate(); Delegation::query()->truncate();
@@ -54,7 +45,7 @@ class WsBaseTest extends TestCase
* Tears down the fixture, for example, closes a network connection. * Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed. * This method is called after a test is executed.
*/ */
protected function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -9,7 +9,7 @@ class WsResponseTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -24,7 +24,7 @@ class AdditionalTablesTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');

View File

@@ -26,7 +26,7 @@ class AppNotesTest extends TestCase
/** /**
* Set up method * Set up method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();

View File

@@ -15,7 +15,7 @@ class ListCanceledTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListCanceledTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListCompletedTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListCompletedTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListInboxTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListInboxTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListMyInboxTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListMyInboxTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListParticipatedHistoryTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListParticipatedHistoryTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListParticipatedLastTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListParticipatedLastTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListPausedTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListPausedTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -15,7 +15,7 @@ class ListUnassignedTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -25,7 +25,7 @@ class ListUnassignedTest extends TestCase
/** /**
* Tear down method, * Tear down method,
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -37,7 +37,7 @@ class PmTablesProxyTest extends TestCase
/** /**
* It setup the variables for the unit tests * It setup the variables for the unit tests
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
@@ -52,6 +52,27 @@ class PmTablesProxyTest extends TestCase
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
} }
/**
* Delete all the PM Tables created for the test
*/
public function tearDown(): void
{
parent::tearDown();
$obj = new pmTablesProxy();
$httpDataBigInt = (object)['rows' => '[{"id":"' . $this->repTableBigIntUid . '","type":""}]'];
$httpDataChar = (object)['rows' => '[{"id":"' . $this->repTableCharUid . '","type":""}]'];
$httpDataSmallInt = (object)['rows' => '[{"id":"' . $this->repTableSmallIntUid . '","type":""}]'];
$httpDataInteger = (object)['rows' => '[{"id":"' . $this->repTableIntegerUid . '","type":""}]'];
$httpDataVarChar = (object)['rows' => '[{"id":"' . $this->repTableVarCharUid . '","type":""}]'];
$httpDataTinyInt = (object)['rows' => '[{"id":"' . $this->repTableTinyIntUid . '","type":""}]'];
$obj->delete($httpDataBigInt);
$obj->delete($httpDataChar);
$obj->delete($httpDataSmallInt);
$obj->delete($httpDataInteger);
$obj->delete($httpDataVarChar);
$obj->delete($httpDataTinyInt);
}
/** /**
* It tests the PM Table with a bigInt ID * It tests the PM Table with a bigInt ID
* *
@@ -1068,27 +1089,6 @@ class PmTablesProxyTest extends TestCase
$obj->dataDestroy($httpDataDestroyTest); $obj->dataDestroy($httpDataDestroyTest);
} }
/**
* Delete all the PM Tables created for the test
*/
public function tearDown()
{
parent::tearDown();
$obj = new pmTablesProxy();
$httpDataBigInt = (object)['rows' => '[{"id":"' . $this->repTableBigIntUid . '","type":""}]'];
$httpDataChar = (object)['rows' => '[{"id":"' . $this->repTableCharUid . '","type":""}]'];
$httpDataSmallInt = (object)['rows' => '[{"id":"' . $this->repTableSmallIntUid . '","type":""}]'];
$httpDataInteger = (object)['rows' => '[{"id":"' . $this->repTableIntegerUid . '","type":""}]'];
$httpDataVarChar = (object)['rows' => '[{"id":"' . $this->repTableVarCharUid . '","type":""}]'];
$httpDataTinyInt = (object)['rows' => '[{"id":"' . $this->repTableTinyIntUid . '","type":""}]'];
$obj->delete($httpDataBigInt);
$obj->delete($httpDataChar);
$obj->delete($httpDataSmallInt);
$obj->delete($httpDataInteger);
$obj->delete($httpDataVarChar);
$obj->delete($httpDataTinyInt);
}
/** /**
* This test verifies the import of pmtable with post form error catching. * This test verifies the import of pmtable with post form error catching.
* *

View File

@@ -14,7 +14,7 @@ class AuthSourcesEditTest extends TestCase
/** /**
* This set initial parameters for each test. * This set initial parameters for each test.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->settingUserLogged(); $this->settingUserLogged();

View File

@@ -13,7 +13,7 @@ class AuthSourcesNewTest extends TestCase
/** /**
* This set initial parameters for each test. * This set initial parameters for each test.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->settingUserLogged(); $this->settingUserLogged();

View File

@@ -18,7 +18,7 @@ class CaseMessageHistory_AjaxTest extends TestCase
/** /**
* This method calls the parent setUp * This method calls the parent setUp
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');
@@ -26,6 +26,14 @@ class CaseMessageHistory_AjaxTest extends TestCase
parent::setUp(); parent::setUp();
} }
/**
* This method calls the parent tearDown
*/
public function tearDown(): void
{
parent::tearDown();
}
/** /**
* It tests the message history grid messageHistoryGridList_JXP action with no permissions configured * It tests the message history grid messageHistoryGridList_JXP action with no permissions configured
* *
@@ -290,12 +298,4 @@ class CaseMessageHistory_AjaxTest extends TestCase
ob_end_clean(); ob_end_clean();
$this->assertEmpty(json_decode($result)->data); $this->assertEmpty(json_decode($result)->data);
} }
/**
* This method calls the parent tearDown
*/
public function tearDown()
{
parent::tearDown();
}
} }

View File

@@ -20,7 +20,7 @@ class CasesMenuHighlightTest extends TestCase
/** /**
* This sets the initial parameters for each test. * This sets the initial parameters for each test.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->settingUserLogged(); $this->settingUserLogged();

View File

@@ -13,7 +13,7 @@ class CasesShowDocumentTest extends TestCase
/** /**
* Setup method. * Setup method.
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');

View File

@@ -13,7 +13,7 @@ class EmailServerAjaxTest extends TestCase
/** /**
* This set initial parameters for each test. * This set initial parameters for each test.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->settingUserLogged(); $this->settingUserLogged();

View File

@@ -15,7 +15,7 @@ class EmailServerGmailOAuthTest extends TestCase
/** /**
* This method calls the parent setUp * This method calls the parent setUp
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');

View File

@@ -15,7 +15,7 @@ class GroupsAjaxTest extends TestCase
/** /**
* Set up function * Set up function
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->settingUserLogged(); $this->settingUserLogged();

View File

@@ -14,7 +14,7 @@ class ActionsByEmailDataFormTest extends TestCase
/** /**
* Setup method. * Setup method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
if (!defined('URL_KEY')) { if (!defined('URL_KEY')) {

View File

@@ -13,7 +13,7 @@ class UsersAjaxTest extends TestCase
/** /**
* Set up the deprecated errors * Set up the deprecated errors
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

View File

@@ -14,7 +14,7 @@ class Users_AjaxTest extends TestCase
/** /**
* Set up the deprecated errors * Set up the deprecated errors
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

View File

@@ -20,7 +20,7 @@ class BatchRoutingTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -20,7 +20,7 @@ class CanceledTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -20,7 +20,7 @@ class CasesListTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -20,7 +20,7 @@ class CompletedTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -27,7 +27,7 @@ class DraftTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -29,7 +29,7 @@ class HomeTest extends TestCase
/** /**
* setUp method. * setUp method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }
@@ -37,7 +37,7 @@ class HomeTest extends TestCase
/** /**
* tearDown method. * tearDown method.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -28,7 +28,7 @@ class InboxTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();
@@ -37,7 +37,8 @@ class InboxTest extends TestCase
/** /**
* Method tearDown * Method tearDown
*/ */
public function tearDown() { public function tearDown(): void
{
parent::tearDown(); parent::tearDown();
} }

View File

@@ -21,7 +21,7 @@ class ParticipatedTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -29,7 +29,7 @@ class PausedTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -21,7 +21,7 @@ class SearchTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Application::truncate(); Application::truncate();

View File

@@ -26,7 +26,7 @@ class SupervisingTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -33,7 +33,7 @@ class UnassignedTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -28,7 +28,7 @@ class CasesTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -19,13 +19,21 @@ class EmailServerTest extends TestCase
/** /**
* set up function. * set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->emailServer = new EmailServer(); $this->emailServer = new EmailServer();
$this->faker = Factory::create(); $this->faker = Factory::create();
} }
/**
* Call the tearDown method
*/
public function tearDown(): void
{
parent::tearDown(); // TODO: Change the autogenerated stub
}
/** /**
* Get structure for registry the EMAIL_SERVER. * Get structure for registry the EMAIL_SERVER.
* @return array * @return array
@@ -403,12 +411,4 @@ class EmailServerTest extends TestCase
$this->expectExceptionMessage("**ID_EMAIL_SERVER_DOES_NOT_EXIST**"); $this->expectExceptionMessage("**ID_EMAIL_SERVER_DOES_NOT_EXIST**");
$emailServer->getEmailServer($email['MESS_UID']); $emailServer->getEmailServer($email['MESS_UID']);
} }
/**
* Call the tearDown method
*/
public function tearDown()
{
parent::tearDown(); // TODO: Change the autogenerated stub
}
} }

View File

@@ -20,7 +20,7 @@ class FilesManagerTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
@@ -30,7 +30,7 @@ class FilesManagerTest extends TestCase
/** /**
* Tear down method. * Tear down method.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
$this->directories = array_reverse($this->directories); $this->directories = array_reverse($this->directories);

View File

@@ -40,7 +40,7 @@ class GroupTest extends TestCase
/** /**
* Sets up the unit tests. * Sets up the unit tests.
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->setInstanceGroup(new Group()); $this->setInstanceGroup(new Group());

View File

@@ -18,7 +18,7 @@ class SkinsTest extends TestCase
/** /**
* Sets up the unit test. * Sets up the unit test.
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->object = new Skins(); $this->object = new Skins();
@@ -27,7 +27,7 @@ class SkinsTest extends TestCase
/** /**
* Tears down the unit test. * Tears down the unit test.
*/ */
protected function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
G::rm_dir(PATH_DATA . 'skins'); G::rm_dir(PATH_DATA . 'skins');

View File

@@ -11,7 +11,7 @@ class TableTest extends TestCase
/** /**
* Method setUp. * Method setUp.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
AdditionalTables::truncate(); AdditionalTables::truncate();
@@ -20,7 +20,7 @@ class TableTest extends TestCase
/** /**
* Method tearDown. * Method tearDown.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -21,7 +21,7 @@ class VariableTest extends TestCase
/** /**
* This method calls the parent setUp * This method calls the parent setUp
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('Illegal mix of collations'); $this->markTestSkipped('Illegal mix of collations');

View File

@@ -30,7 +30,7 @@ class CasesTraitTest extends TestCase
/** /**
* Set up method. * Set up method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -16,7 +16,7 @@ class JobsManagerTest extends TestCase
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->object = new JobsManager; $this->object = new JobsManager;
@@ -26,7 +26,7 @@ class JobsManagerTest extends TestCase
* Tears down the fixture, for example, closes a network connection. * Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed. * This method is called after a test is executed.
*/ */
protected function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -14,7 +14,7 @@ class SystemTest extends TestCase
/** /**
* Define the required variables * Define the required variables
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -23,7 +23,7 @@ class GmailOAuthTest extends TestCase
/** /**
* Init properties * Init properties
*/ */
public function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');

View File

@@ -18,7 +18,7 @@ class ImporterTest extends TestCase
/** /**
* Declared to avoid the incompatibility exception * Declared to avoid the incompatibility exception
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

View File

@@ -19,7 +19,7 @@ class XmlImporterTest extends TestCase
/** /**
* Set up unit tests. * Set up unit tests.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->user = factory(User::class)->create(); $this->user = factory(User::class)->create();

View File

@@ -23,7 +23,7 @@ class AbeConfigurationTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
} }
@@ -31,7 +31,7 @@ class AbeConfigurationTest extends TestCase
/** /**
* Call the tearDown parent method * Call the tearDown parent method
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); // TODO: Change the autogenerated stub parent::tearDown(); // TODO: Change the autogenerated stub
} }

View File

@@ -18,7 +18,7 @@ class AppDelayTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
AppDelay::truncate(); AppDelay::truncate();

View File

@@ -18,7 +18,7 @@ class AppThreadTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -22,7 +22,7 @@ class ApplicationTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Application::truncate(); Application::truncate();

View File

@@ -16,7 +16,7 @@ class CaseListTest extends TestCase
/** /**
* setUp method. * setUp method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }
@@ -24,7 +24,7 @@ class CaseListTest extends TestCase
/** /**
* teardown method. * teardown method.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -20,7 +20,7 @@ class ConsolidatedTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -35,7 +35,7 @@ class DelegationTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -19,7 +19,7 @@ class DynaformTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -16,11 +16,19 @@ class EmailEventTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
} }
/**
* Call the tearDown parent method
*/
public function tearDown(): void
{
parent::tearDown(); // TODO: Change the autogenerated stub
}
/** /**
* It tests the updateServerAndFromToDefaultOrEmpty method * It tests the updateServerAndFromToDefaultOrEmpty method
* *
@@ -71,12 +79,4 @@ class EmailEventTest extends TestCase
$this->assertEquals($updatedEmailEvent[0]['EMAIL_SERVER_UID'], $emailServerDefault['MESS_UID']); $this->assertEquals($updatedEmailEvent[0]['EMAIL_SERVER_UID'], $emailServerDefault['MESS_UID']);
} }
/**
* Call the tearDown parent method
*/
public function tearDown()
{
parent::tearDown(); // TODO: Change the autogenerated stub
}
} }

View File

@@ -15,7 +15,7 @@ class EmailServerModelTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
} }
@@ -23,7 +23,7 @@ class EmailServerModelTest extends TestCase
/** /**
* Call the tearDown parent method * Call the tearDown parent method
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); // TODO: Change the autogenerated stub parent::tearDown(); // TODO: Change the autogenerated stub
} }

View File

@@ -21,7 +21,7 @@ class GroupUserTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
GroupUser::truncate(); GroupUser::truncate();

View File

@@ -19,7 +19,7 @@ class GroupwfTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Groupwf::truncate(); Groupwf::truncate();

View File

@@ -18,7 +18,7 @@ class ProcessCategoryTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
ProcessCategory::query()->delete(); ProcessCategory::query()->delete();

View File

@@ -23,7 +23,7 @@ class ProcessTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Process::query()->delete(); Process::query()->delete();

View File

@@ -19,7 +19,7 @@ class SubProcessTest extends TestCase
/** /**
* Call the setUp parent method * Call the setUp parent method
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
} }

View File

@@ -16,7 +16,7 @@ class UserConfigTest extends TestCase
/** /**
* Setup method, * Setup method,
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
UserConfig::truncate(); UserConfig::truncate();
@@ -25,7 +25,7 @@ class UserConfigTest extends TestCase
/** /**
* Teardown method. * Teardown method.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -19,7 +19,7 @@ class UserTest extends TestCase
/** /**
* Set up function. * Set up function.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
User::query()->delete(); User::query()->delete();

View File

@@ -19,7 +19,7 @@ class BpmnWorkflowTest extends TestCase
/** /**
* Set up testing. * Set up testing.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->user = factory(User::class)->create(); $this->user = factory(User::class)->create();

View File

@@ -21,7 +21,7 @@ class WorkflowTest extends TestCase
/** /**
* This method sets the values before starting any test. * This method sets the values before starting any test.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->workflow = new Workflow(); $this->workflow = new Workflow();
@@ -33,7 +33,7 @@ class WorkflowTest extends TestCase
/** /**
* This method is executed after each test. * This method is executed after each test.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
foreach ($this->files as $value) { foreach ($this->files as $value) {

View File

@@ -21,7 +21,7 @@ class ReportingTest extends TestCase
/** /**
* Method setUp. * Method setUp.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->reporting = new Reporting(); $this->reporting = new Reporting();
@@ -30,7 +30,7 @@ class ReportingTest extends TestCase
/** /**
* Method tearDown. * Method tearDown.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -32,7 +32,7 @@ class LightTest extends TestCase
* This is using instead of DatabaseTransactions * This is using instead of DatabaseTransactions
* @todo DatabaseTransactions is having conflicts with propel * @todo DatabaseTransactions is having conflicts with propel
*/ */
protected function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->workspace = env("DB_DATABASE", "test"); $this->workspace = env("DB_DATABASE", "test");

View File

@@ -35,7 +35,7 @@ class MetricsTest extends TestCase
/** /**
* Method set up. * Method set up.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
Delegation::truncate(); Delegation::truncate();

View File

@@ -15,7 +15,7 @@ class ProjectTest extends TestCase
{ {
private $user; private $user;
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->user = factory(User::class)->create(); $this->user = factory(User::class)->create();

View File

@@ -17,7 +17,7 @@ class ServerTest extends TestCase
/** /**
* Setup method. * Setup method.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->server = $_SERVER; $this->server = $_SERVER;
@@ -29,7 +29,7 @@ class ServerTest extends TestCase
/** /**
* Teardown method. * Teardown method.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
$_SERVER = $this->server; $_SERVER = $this->server;

View File

@@ -23,7 +23,7 @@ class TaskTest extends TestCase
/** /**
* Method setUp. * Method setUp.
*/ */
protected function setUp() public function setUp(): void
{ {
if (version_compare(phpversion(), 7.3, '>') ) { if (version_compare(phpversion(), 7.3, '>') ) {
$this->markTestSkipped('The changes in third party are not available'); $this->markTestSkipped('The changes in third party are not available');
@@ -38,7 +38,7 @@ class TaskTest extends TestCase
/** /**
* Method tearDown. * Method tearDown.
*/ */
protected function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
} }

View File

@@ -23,7 +23,7 @@ class SqlBlacklistTest extends TestCase
/** /**
* Method setUp. * Method setUp.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->content = ""; $this->content = "";
@@ -36,7 +36,7 @@ class SqlBlacklistTest extends TestCase
/** /**
* Method tearDown. * Method tearDown.
*/ */
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();
$path = PATH_CONFIG . 'execute-query-blacklist.ini'; $path = PATH_CONFIG . 'execute-query-blacklist.ini';

View File

@@ -14,7 +14,7 @@ class ValidationUploadedFilesTest extends TestCase
/** /**
* It copies the images for the test * It copies the images for the test
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); // TODO: Change the autogenerated stub parent::setUp(); // TODO: Change the autogenerated stub
copy(PATH_HTML . 'images/1.png', PATH_DATA . '1.PNG'); copy(PATH_HTML . 'images/1.png', PATH_DATA . '1.PNG');
@@ -22,6 +22,23 @@ class ValidationUploadedFilesTest extends TestCase
copy(PATH_HTML . 'images/1.png', PATH_DATA . '1.PnG'); copy(PATH_HTML . 'images/1.png', PATH_DATA . '1.PnG');
} }
/**
* It deletes the images created
*/
public function tearDown(): void
{
parent::tearDown(); // TODO: Change the autogenerated stub
if (file_exists(PATH_DATA . '1.PNG')) {
unlink(PATH_DATA . '1.PNG');
}
if (file_exists(PATH_DATA . '1.png')) {
unlink(PATH_DATA . '1.png');
}
if (file_exists(PATH_DATA . '1.PnG')) {
unlink(PATH_DATA . '1.PnG');
}
}
/** /**
* It tests the runRules method when the file extension is in upper case * It tests the runRules method when the file extension is in upper case
* *
@@ -148,21 +165,4 @@ class ValidationUploadedFilesTest extends TestCase
$this->assertEmpty($result->getMessage()); $this->assertEmpty($result->getMessage());
$this->assertEquals(0, $result->getStatus()); $this->assertEquals(0, $result->getStatus());
} }
/**
* It deletes the images created
*/
public function tearDown()
{
parent::tearDown(); // TODO: Change the autogenerated stub
if (file_exists(PATH_DATA . '1.PNG')) {
unlink(PATH_DATA . '1.PNG');
}
if (file_exists(PATH_DATA . '1.png')) {
unlink(PATH_DATA . '1.png');
}
if (file_exists(PATH_DATA . '1.PnG')) {
unlink(PATH_DATA . '1.PnG');
}
}
} }