From 3f6f6c5a30e632b67d6122a1aa06ee25cb7537bf Mon Sep 17 00:00:00 2001 From: "Paula.Quispe" Date: Thu, 9 Jun 2022 11:43:56 -0400 Subject: [PATCH] PMCORE-3877 --- phpunit.xml | 1 - .../src/ProcessMaker/Model/DelegationTest.php | 2 +- tests/TestCase.php | 4 +- tests/unit/app/CustomizeFormatterTest.php | 6 +-- .../unit/gulliver/methods/DefaultAjaxTest.php | 4 ++ tests/unit/gulliver/system/BootstrapTest.php | 2 +- .../unit/gulliver/system/CodeScannerTest.php | 4 +- tests/unit/gulliver/system/gTest.php | 2 +- .../database/model/PhpNameGeneratorTest.php | 2 +- .../engine/bin/tasks/CliWorkspacesTest.php | 4 -- .../classes/ActionsByEmailCoreClassTest.php | 2 +- .../workflow/engine/classes/CasesTest.php | 18 ++++---- .../engine/classes/DbConnectionsTest.php | 2 +- .../engine/classes/DerivationTest.php | 4 +- .../engine/classes/LdapAdvancedTest.php | 2 +- .../engine/classes/PmDynaformTest.php | 2 +- .../classes/PmFunctions/ExecuteQueryTest.php | 4 +- .../PmFunctions/PMFCaseInformationTest.php | 2 +- .../classes/PmFunctions/PMFNewUserTest.php | 4 +- .../workflow/engine/classes/ProcessesTest.php | 9 ---- .../engine/classes/ReportTablesTest.php | 4 +- .../engine/classes/WorkflowToolsTest.php | 4 +- .../workflow/engine/classes/WsBaseTest.php | 11 +---- .../engine/classes/WsResponseTest.php | 2 +- .../classes/model/AdditionalTablesTest.php | 2 +- .../engine/classes/model/AppNotesTest.php | 2 +- .../engine/classes/model/ListCanceledTest.php | 4 +- .../classes/model/ListCompletedTest.php | 4 +- .../engine/classes/model/ListInboxTest.php | 4 +- .../engine/classes/model/ListMyInboxTest.php | 4 +- .../model/ListParticipatedHistoryTest.php | 4 +- .../model/ListParticipatedLastTest.php | 4 +- .../engine/classes/model/ListPausedTest.php | 4 +- .../classes/model/ListUnassignedTest.php | 4 +- .../engine/controllers/PmTablesProxyTest.php | 44 +++++++++---------- .../authSources/AuthSourcesEditTest.php | 2 +- .../authSources/AuthSourcesNewTest.php | 2 +- .../cases/CaseMessageHistory_AjaxTest.php | 20 ++++----- .../methods/cases/CasesMenuHighlightTest.php | 2 +- .../methods/cases/CasesShowDocumentTest.php | 2 +- .../emailServer/EmailServerAjaxTest.php | 2 +- .../emailServer/EmailServerGmailOAuthTest.php | 2 +- .../engine/methods/groups/GroupsAjaxTest.php | 2 +- .../services/ActionsByEmailDataFormTest.php | 2 +- .../engine/methods/users/UsersAjaxTest.php | 2 +- .../engine/methods/users/Users_AjaxTest.php | 2 +- .../BusinessModel/Cases/BatchRoutingTest.php | 2 +- .../BusinessModel/Cases/CanceledTest.php | 2 +- .../BusinessModel/Cases/CasesListTest.php | 2 +- .../BusinessModel/Cases/CompletedTest.php | 2 +- .../BusinessModel/Cases/DraftTest.php | 2 +- .../BusinessModel/Cases/HomeTest.php | 4 +- .../BusinessModel/Cases/InboxTest.php | 5 ++- .../BusinessModel/Cases/ParticipatedTest.php | 2 +- .../BusinessModel/Cases/PausedTest.php | 2 +- .../BusinessModel/Cases/SearchTest.php | 2 +- .../BusinessModel/Cases/SupervisingTest.php | 2 +- .../BusinessModel/Cases/UnassignedTest.php | 2 +- .../ProcessMaker/BusinessModel/CasesTest.php | 2 +- .../BusinessModel/EmailServerTest.php | 18 ++++---- .../BusinessModel/FilesManagerTest.php | 4 +- .../ProcessMaker/BusinessModel/GroupTest.php | 2 +- .../ProcessMaker/BusinessModel/SkinsTest.php | 4 +- .../ProcessMaker/BusinessModel/TableTest.php | 4 +- .../BusinessModel/VariableTest.php | 2 +- .../src/ProcessMaker/Cases/CasesTraitTest.php | 2 +- .../src/ProcessMaker/Core/JobsManagerTest.php | 4 +- .../src/ProcessMaker/Core/SystemTest.php | 2 +- .../GmailOAuth/GmailOAuthTest.php | 2 +- .../ProcessMaker/Importer/ImporterTest.php | 2 +- .../ProcessMaker/Importer/XmlImporterTest.php | 2 +- .../Model/AbeConfigurationTest.php | 4 +- .../src/ProcessMaker/Model/AppDelayTest.php | 2 +- .../src/ProcessMaker/Model/AppThreadTest.php | 2 +- .../ProcessMaker/Model/ApplicationTest.php | 2 +- .../src/ProcessMaker/Model/CaseListTest.php | 4 +- .../ProcessMaker/Model/ConsolidatedTest.php | 2 +- .../src/ProcessMaker/Model/DelegationTest.php | 2 +- .../src/ProcessMaker/Model/DynaformTest.php | 2 +- .../src/ProcessMaker/Model/EmailEventTest.php | 18 ++++---- .../Model/EmailServerModelTest.php | 4 +- .../src/ProcessMaker/Model/GroupUserTest.php | 2 +- .../src/ProcessMaker/Model/GroupwfTest.php | 2 +- .../Model/ProcessCategoryTest.php | 2 +- .../src/ProcessMaker/Model/ProcessTest.php | 2 +- .../src/ProcessMaker/Model/SubProcessTest.php | 2 +- .../src/ProcessMaker/Model/UserConfigTest.php | 4 +- .../src/ProcessMaker/Model/UserTest.php | 2 +- .../Project/Adapter/BpmnWorkflowTest.php | 2 +- .../src/ProcessMaker/Project/WorkflowTest.php | 4 +- .../src/ProcessMaker/Report/ReportingTest.php | 4 +- .../ProcessMaker/Services/Api/LightTest.php | 2 +- .../ProcessMaker/Services/Api/MetricsTest.php | 2 +- .../ProcessMaker/Services/Api/ProjectTest.php | 2 +- .../Services/OAuth2/ServerTest.php | 4 +- .../ProcessMaker/TaskScheduler/TaskTest.php | 4 +- .../Validation/SqlBlacklistTest.php | 4 +- .../ValidationUploadedFilesTest.php | 36 +++++++-------- 98 files changed, 202 insertions(+), 220 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 433c8e8ae..771dbfc25 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,6 @@ convertWarningsToExceptions="false" processIsolation="false" stopOnFailure="false" - syntaxCheck="true" bootstrap="tests/bootstrap.php" stderr="true" > diff --git a/tests/Performance/workflow/engine/src/ProcessMaker/Model/DelegationTest.php b/tests/Performance/workflow/engine/src/ProcessMaker/Model/DelegationTest.php index a0b5e7e65..866ece66b 100644 --- a/tests/Performance/workflow/engine/src/ProcessMaker/Model/DelegationTest.php +++ b/tests/Performance/workflow/engine/src/ProcessMaker/Model/DelegationTest.php @@ -26,7 +26,7 @@ class DelegationTest extends TestCase /** * Define values of some parameters of the test */ - protected function setUp() + public function setUp(): void { if (!env('RUN_MYSQL_PERFORMANCE_TESTS')) { $this->markTestSkipped('Test related to the performance are disabled for this server configuration'); diff --git a/tests/TestCase.php b/tests/TestCase.php index 75b4def94..f21643fad 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -48,7 +48,7 @@ abstract class TestCase extends BaseTestCase * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + protected function setUp(): void { /** * Lost argv are restored. @@ -67,7 +67,7 @@ abstract class TestCase extends BaseTestCase * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/app/CustomizeFormatterTest.php b/tests/unit/app/CustomizeFormatterTest.php index bec190b3b..c840b56ff 100644 --- a/tests/unit/app/CustomizeFormatterTest.php +++ b/tests/unit/app/CustomizeFormatterTest.php @@ -14,7 +14,7 @@ class CustomizeFormatterTest extends TestCase /** * This is executed for each test. */ - protected function setUp() + protected function setUp(): void { parent::setUp(); self::$directory = PATH_DATA . 'logs/'; @@ -23,7 +23,7 @@ class CustomizeFormatterTest extends TestCase /** * This is done before the first test. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $file = new Filesystem(); $file->cleanDirectory(self::$directory); @@ -32,7 +32,7 @@ class CustomizeFormatterTest extends TestCase /** * This is done after the last test. */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $file = new Filesystem(); $file->cleanDirectory(self::$directory); diff --git a/tests/unit/gulliver/methods/DefaultAjaxTest.php b/tests/unit/gulliver/methods/DefaultAjaxTest.php index ca928a86a..fc0265a25 100644 --- a/tests/unit/gulliver/methods/DefaultAjaxTest.php +++ b/tests/unit/gulliver/methods/DefaultAjaxTest.php @@ -7,6 +7,10 @@ use Tests\TestCase; class DefaultAjaxTest extends TestCase { + public function setUp(): void + { + $this->markTestSkipped('Issues with php 8'); + } /** * This gets data from a json file. * @param string $pathData diff --git a/tests/unit/gulliver/system/BootstrapTest.php b/tests/unit/gulliver/system/BootstrapTest.php index d717d29de..ca9e90b8b 100644 --- a/tests/unit/gulliver/system/BootstrapTest.php +++ b/tests/unit/gulliver/system/BootstrapTest.php @@ -15,7 +15,7 @@ class BootstrapTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); diff --git a/tests/unit/gulliver/system/CodeScannerTest.php b/tests/unit/gulliver/system/CodeScannerTest.php index ba560859b..d57b5940b 100644 --- a/tests/unit/gulliver/system/CodeScannerTest.php +++ b/tests/unit/gulliver/system/CodeScannerTest.php @@ -24,7 +24,7 @@ class CodeScannerTest extends TestCase /** * Call the setUp parent method and create some *.ini files */ - public function setUp() + public function setUp(): void { 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 */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); diff --git a/tests/unit/gulliver/system/gTest.php b/tests/unit/gulliver/system/gTest.php index df011d4e9..68598f3d3 100644 --- a/tests/unit/gulliver/system/gTest.php +++ b/tests/unit/gulliver/system/gTest.php @@ -15,7 +15,7 @@ class gTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); diff --git a/tests/unit/thirdparty/propel-generator/classes/propel/engine/database/model/PhpNameGeneratorTest.php b/tests/unit/thirdparty/propel-generator/classes/propel/engine/database/model/PhpNameGeneratorTest.php index caf8634ff..0f014ae50 100644 --- a/tests/unit/thirdparty/propel-generator/classes/propel/engine/database/model/PhpNameGeneratorTest.php +++ b/tests/unit/thirdparty/propel-generator/classes/propel/engine/database/model/PhpNameGeneratorTest.php @@ -12,7 +12,7 @@ class PhpNameGeneratorTest extends TestCase /** * Set up the test class */ - public function setUp() + public function setUp(): void { // Call the setUp parent method parent::setUp(); diff --git a/tests/unit/workflow/engine/bin/tasks/CliWorkspacesTest.php b/tests/unit/workflow/engine/bin/tasks/CliWorkspacesTest.php index 10b4f0aa2..0e34784d5 100644 --- a/tests/unit/workflow/engine/bin/tasks/CliWorkspacesTest.php +++ b/tests/unit/workflow/engine/bin/tasks/CliWorkspacesTest.php @@ -13,10 +13,6 @@ class CliWorkspacesTest extends TestCase { use DatabaseTransactions; - protected function setUp() - { - } - /** * Test that the deprecated files are removed successfully * diff --git a/tests/unit/workflow/engine/classes/ActionsByEmailCoreClassTest.php b/tests/unit/workflow/engine/classes/ActionsByEmailCoreClassTest.php index 2a66c92e3..01ba746e7 100644 --- a/tests/unit/workflow/engine/classes/ActionsByEmailCoreClassTest.php +++ b/tests/unit/workflow/engine/classes/ActionsByEmailCoreClassTest.php @@ -16,7 +16,7 @@ class ActionsByEmailCoreClassTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); if (!defined('PATH_IMAGES_ENVIRONMENT_USERS')) { diff --git a/tests/unit/workflow/engine/classes/CasesTest.php b/tests/unit/workflow/engine/classes/CasesTest.php index 94807dd7d..1197a7f3c 100644 --- a/tests/unit/workflow/engine/classes/CasesTest.php +++ b/tests/unit/workflow/engine/classes/CasesTest.php @@ -21,11 +21,19 @@ class CasesTest extends TestCase /** * Call setUp method */ - public function setUp() + public function setUp(): void { 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 * @@ -735,12 +743,4 @@ class CasesTest extends TestCase // Asserts the emails of both users are contained in the result $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 - } } diff --git a/tests/unit/workflow/engine/classes/DbConnectionsTest.php b/tests/unit/workflow/engine/classes/DbConnectionsTest.php index eb8509038..90fab271b 100644 --- a/tests/unit/workflow/engine/classes/DbConnectionsTest.php +++ b/tests/unit/workflow/engine/classes/DbConnectionsTest.php @@ -16,7 +16,7 @@ class DbConnectionsTest extends TestCase /** * Setup method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->dbConnections = new DbConnections(); diff --git a/tests/unit/workflow/engine/classes/DerivationTest.php b/tests/unit/workflow/engine/classes/DerivationTest.php index a8a07b06c..d0684001d 100644 --- a/tests/unit/workflow/engine/classes/DerivationTest.php +++ b/tests/unit/workflow/engine/classes/DerivationTest.php @@ -24,7 +24,7 @@ class DerivationTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub @@ -39,7 +39,7 @@ class DerivationTest extends TestCase /** * Call the tearDown method */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); // TODO: Change the autogenerated stub } diff --git a/tests/unit/workflow/engine/classes/LdapAdvancedTest.php b/tests/unit/workflow/engine/classes/LdapAdvancedTest.php index 7919570de..799739ca0 100644 --- a/tests/unit/workflow/engine/classes/LdapAdvancedTest.php +++ b/tests/unit/workflow/engine/classes/LdapAdvancedTest.php @@ -13,7 +13,7 @@ class LdapAdvancedTest extends TestCase /** * Method setUp. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->ldapAdvanced = new LdapAdvanced(); diff --git a/tests/unit/workflow/engine/classes/PmDynaformTest.php b/tests/unit/workflow/engine/classes/PmDynaformTest.php index eedd7ff95..d3b79f743 100644 --- a/tests/unit/workflow/engine/classes/PmDynaformTest.php +++ b/tests/unit/workflow/engine/classes/PmDynaformTest.php @@ -17,7 +17,7 @@ class PmDynaformTest extends TestCase * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + public function setUp(): void { parent::setUp(); $_SERVER["REQUEST_URI"] = ""; diff --git a/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php b/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php index 2a068fd73..736508b0f 100644 --- a/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php +++ b/tests/unit/workflow/engine/classes/PmFunctions/ExecuteQueryTest.php @@ -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 $oldContentSystemTables = ""; - public function setUp() + public function setUp(): void { parent::setUp(); ProcessCategory::truncate(); @@ -34,7 +34,7 @@ class ExecuteQueryTest extends TestCase file_put_contents($path, $this->contentSystemTables); } - public function tearDown() + public function tearDown(): void { parent::tearDown(); $path = PATH_CONFIG . $this->nameSystemTables; diff --git a/tests/unit/workflow/engine/classes/PmFunctions/PMFCaseInformationTest.php b/tests/unit/workflow/engine/classes/PmFunctions/PMFCaseInformationTest.php index 07b8f56e1..22335b89d 100644 --- a/tests/unit/workflow/engine/classes/PmFunctions/PMFCaseInformationTest.php +++ b/tests/unit/workflow/engine/classes/PmFunctions/PMFCaseInformationTest.php @@ -20,7 +20,7 @@ class PMFCaseInformation extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/classes/PmFunctions/PMFNewUserTest.php b/tests/unit/workflow/engine/classes/PmFunctions/PMFNewUserTest.php index 085ae2ba2..d74a509c6 100644 --- a/tests/unit/workflow/engine/classes/PmFunctions/PMFNewUserTest.php +++ b/tests/unit/workflow/engine/classes/PmFunctions/PMFNewUserTest.php @@ -19,7 +19,7 @@ class PMFNewUserTest extends TestCase /** * Creates the setUp method */ - public function setUp() + public function setUp(): void { parent::setup(); @@ -37,7 +37,7 @@ class PMFNewUserTest extends TestCase /** * Creates the tearDown method */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/ProcessesTest.php b/tests/unit/workflow/engine/classes/ProcessesTest.php index e8fa446cc..ddfa6790c 100644 --- a/tests/unit/workflow/engine/classes/ProcessesTest.php +++ b/tests/unit/workflow/engine/classes/ProcessesTest.php @@ -26,15 +26,6 @@ class ProcessesTest extends TestCase public function __construct($name = null, array $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(); } diff --git a/tests/unit/workflow/engine/classes/ReportTablesTest.php b/tests/unit/workflow/engine/classes/ReportTablesTest.php index 4f6cb8df1..99275efdc 100644 --- a/tests/unit/workflow/engine/classes/ReportTablesTest.php +++ b/tests/unit/workflow/engine/classes/ReportTablesTest.php @@ -19,7 +19,7 @@ class ReportTablesTest extends TestCase /** * Sets up the unit tests. */ - public function setUp() + public function setUp(): void { parent::setUp(); $_SERVER["REQUEST_URI"] = ""; @@ -33,7 +33,7 @@ class ReportTablesTest extends TestCase /** * Tear down the unit tests. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/WorkflowToolsTest.php b/tests/unit/workflow/engine/classes/WorkflowToolsTest.php index e863b2cbe..9d03a4c51 100644 --- a/tests/unit/workflow/engine/classes/WorkflowToolsTest.php +++ b/tests/unit/workflow/engine/classes/WorkflowToolsTest.php @@ -12,7 +12,7 @@ class WorkflowToolsTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->workspaceTools = new WorkspaceTools('workflow'); @@ -21,7 +21,7 @@ class WorkflowToolsTest extends TestCase /** * Method tear down. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/WsBaseTest.php b/tests/unit/workflow/engine/classes/WsBaseTest.php index 24b9ec28c..33da1ffcf 100755 --- a/tests/unit/workflow/engine/classes/WsBaseTest.php +++ b/tests/unit/workflow/engine/classes/WsBaseTest.php @@ -36,15 +36,6 @@ class WsBaseTest extends TestCase public function __construct($name = null, array $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(); AppThread::query()->truncate(); Delegation::query()->truncate(); @@ -54,7 +45,7 @@ class WsBaseTest extends TestCase * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/WsResponseTest.php b/tests/unit/workflow/engine/classes/WsResponseTest.php index 33f5fa2d6..1bf9408a2 100644 --- a/tests/unit/workflow/engine/classes/WsResponseTest.php +++ b/tests/unit/workflow/engine/classes/WsResponseTest.php @@ -9,7 +9,7 @@ class WsResponseTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/classes/model/AdditionalTablesTest.php b/tests/unit/workflow/engine/classes/model/AdditionalTablesTest.php index 92af01607..4a29e2b1f 100644 --- a/tests/unit/workflow/engine/classes/model/AdditionalTablesTest.php +++ b/tests/unit/workflow/engine/classes/model/AdditionalTablesTest.php @@ -24,7 +24,7 @@ class AdditionalTablesTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); diff --git a/tests/unit/workflow/engine/classes/model/AppNotesTest.php b/tests/unit/workflow/engine/classes/model/AppNotesTest.php index b86714211..b13a5fc27 100644 --- a/tests/unit/workflow/engine/classes/model/AppNotesTest.php +++ b/tests/unit/workflow/engine/classes/model/AppNotesTest.php @@ -26,7 +26,7 @@ class AppNotesTest extends TestCase /** * Set up method */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); diff --git a/tests/unit/workflow/engine/classes/model/ListCanceledTest.php b/tests/unit/workflow/engine/classes/model/ListCanceledTest.php index cfe13a22b..64579c0be 100644 --- a/tests/unit/workflow/engine/classes/model/ListCanceledTest.php +++ b/tests/unit/workflow/engine/classes/model/ListCanceledTest.php @@ -15,7 +15,7 @@ class ListCanceledTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListCanceledTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListCompletedTest.php b/tests/unit/workflow/engine/classes/model/ListCompletedTest.php index c6369bd5d..e394480fe 100644 --- a/tests/unit/workflow/engine/classes/model/ListCompletedTest.php +++ b/tests/unit/workflow/engine/classes/model/ListCompletedTest.php @@ -15,7 +15,7 @@ class ListCompletedTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListCompletedTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListInboxTest.php b/tests/unit/workflow/engine/classes/model/ListInboxTest.php index c35f325b6..c63b41f13 100644 --- a/tests/unit/workflow/engine/classes/model/ListInboxTest.php +++ b/tests/unit/workflow/engine/classes/model/ListInboxTest.php @@ -15,7 +15,7 @@ class ListInboxTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListInboxTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListMyInboxTest.php b/tests/unit/workflow/engine/classes/model/ListMyInboxTest.php index b177be742..71877bf7e 100644 --- a/tests/unit/workflow/engine/classes/model/ListMyInboxTest.php +++ b/tests/unit/workflow/engine/classes/model/ListMyInboxTest.php @@ -15,7 +15,7 @@ class ListMyInboxTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListMyInboxTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListParticipatedHistoryTest.php b/tests/unit/workflow/engine/classes/model/ListParticipatedHistoryTest.php index d0ea09708..2a175c614 100644 --- a/tests/unit/workflow/engine/classes/model/ListParticipatedHistoryTest.php +++ b/tests/unit/workflow/engine/classes/model/ListParticipatedHistoryTest.php @@ -15,7 +15,7 @@ class ListParticipatedHistoryTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListParticipatedHistoryTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListParticipatedLastTest.php b/tests/unit/workflow/engine/classes/model/ListParticipatedLastTest.php index 2a9440e8b..257853927 100644 --- a/tests/unit/workflow/engine/classes/model/ListParticipatedLastTest.php +++ b/tests/unit/workflow/engine/classes/model/ListParticipatedLastTest.php @@ -15,7 +15,7 @@ class ListParticipatedLastTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListParticipatedLastTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListPausedTest.php b/tests/unit/workflow/engine/classes/model/ListPausedTest.php index 3e4070331..6b459a09d 100644 --- a/tests/unit/workflow/engine/classes/model/ListPausedTest.php +++ b/tests/unit/workflow/engine/classes/model/ListPausedTest.php @@ -15,7 +15,7 @@ class ListPausedTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListPausedTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/classes/model/ListUnassignedTest.php b/tests/unit/workflow/engine/classes/model/ListUnassignedTest.php index fb3f1b3cc..fc2035b87 100644 --- a/tests/unit/workflow/engine/classes/model/ListUnassignedTest.php +++ b/tests/unit/workflow/engine/classes/model/ListUnassignedTest.php @@ -15,7 +15,7 @@ class ListUnassignedTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -25,7 +25,7 @@ class ListUnassignedTest extends TestCase /** * Tear down method, */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/controllers/PmTablesProxyTest.php b/tests/unit/workflow/engine/controllers/PmTablesProxyTest.php index 663f5dd28..13023c560 100644 --- a/tests/unit/workflow/engine/controllers/PmTablesProxyTest.php +++ b/tests/unit/workflow/engine/controllers/PmTablesProxyTest.php @@ -37,7 +37,7 @@ class PmTablesProxyTest extends TestCase /** * It setup the variables for the unit tests */ - protected function setUp() + public function setUp(): void { parent::setUp(); @@ -52,6 +52,27 @@ class PmTablesProxyTest extends TestCase 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 * @@ -1067,27 +1088,6 @@ class PmTablesProxyTest extends TestCase //This method deletes a specific row of a PM table $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. diff --git a/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php b/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php index 474a6c84c..1e70e17e9 100644 --- a/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php +++ b/tests/unit/workflow/engine/methods/authSources/AuthSourcesEditTest.php @@ -14,7 +14,7 @@ class AuthSourcesEditTest extends TestCase /** * This set initial parameters for each test. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->settingUserLogged(); diff --git a/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php b/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php index c1714441e..116092780 100644 --- a/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php +++ b/tests/unit/workflow/engine/methods/authSources/AuthSourcesNewTest.php @@ -13,7 +13,7 @@ class AuthSourcesNewTest extends TestCase /** * This set initial parameters for each test. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->settingUserLogged(); diff --git a/tests/unit/workflow/engine/methods/cases/CaseMessageHistory_AjaxTest.php b/tests/unit/workflow/engine/methods/cases/CaseMessageHistory_AjaxTest.php index 981398d30..4204842fb 100644 --- a/tests/unit/workflow/engine/methods/cases/CaseMessageHistory_AjaxTest.php +++ b/tests/unit/workflow/engine/methods/cases/CaseMessageHistory_AjaxTest.php @@ -18,7 +18,7 @@ class CaseMessageHistory_AjaxTest extends TestCase /** * This method calls the parent setUp */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); @@ -26,6 +26,14 @@ class CaseMessageHistory_AjaxTest extends TestCase 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 * @@ -290,12 +298,4 @@ class CaseMessageHistory_AjaxTest extends TestCase ob_end_clean(); $this->assertEmpty(json_decode($result)->data); } - - /** - * This method calls the parent tearDown - */ - public function tearDown() - { - parent::tearDown(); - } -} \ No newline at end of file +} diff --git a/tests/unit/workflow/engine/methods/cases/CasesMenuHighlightTest.php b/tests/unit/workflow/engine/methods/cases/CasesMenuHighlightTest.php index 042bc07e1..e14a840ae 100644 --- a/tests/unit/workflow/engine/methods/cases/CasesMenuHighlightTest.php +++ b/tests/unit/workflow/engine/methods/cases/CasesMenuHighlightTest.php @@ -20,7 +20,7 @@ class CasesMenuHighlightTest extends TestCase /** * This sets the initial parameters for each test. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->settingUserLogged(); diff --git a/tests/unit/workflow/engine/methods/cases/CasesShowDocumentTest.php b/tests/unit/workflow/engine/methods/cases/CasesShowDocumentTest.php index 1aca4ce42..deba8b6a6 100644 --- a/tests/unit/workflow/engine/methods/cases/CasesShowDocumentTest.php +++ b/tests/unit/workflow/engine/methods/cases/CasesShowDocumentTest.php @@ -13,7 +13,7 @@ class CasesShowDocumentTest extends TestCase /** * Setup method. */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); diff --git a/tests/unit/workflow/engine/methods/emailServer/EmailServerAjaxTest.php b/tests/unit/workflow/engine/methods/emailServer/EmailServerAjaxTest.php index 1613fc400..bb8e2fa7d 100644 --- a/tests/unit/workflow/engine/methods/emailServer/EmailServerAjaxTest.php +++ b/tests/unit/workflow/engine/methods/emailServer/EmailServerAjaxTest.php @@ -13,7 +13,7 @@ class EmailServerAjaxTest extends TestCase /** * This set initial parameters for each test. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->settingUserLogged(); diff --git a/tests/unit/workflow/engine/methods/emailServer/EmailServerGmailOAuthTest.php b/tests/unit/workflow/engine/methods/emailServer/EmailServerGmailOAuthTest.php index d3762c28b..4a1bd1003 100644 --- a/tests/unit/workflow/engine/methods/emailServer/EmailServerGmailOAuthTest.php +++ b/tests/unit/workflow/engine/methods/emailServer/EmailServerGmailOAuthTest.php @@ -15,7 +15,7 @@ class EmailServerGmailOAuthTest extends TestCase /** * This method calls the parent setUp */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); diff --git a/tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php b/tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php index b3195479e..1a7fc1007 100644 --- a/tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php +++ b/tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php @@ -15,7 +15,7 @@ class GroupsAjaxTest extends TestCase /** * Set up function */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->settingUserLogged(); diff --git a/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php b/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php index 308008eb9..61033397f 100644 --- a/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php +++ b/tests/unit/workflow/engine/methods/services/ActionsByEmailDataFormTest.php @@ -14,7 +14,7 @@ class ActionsByEmailDataFormTest extends TestCase /** * Setup method. */ - public function setUp() + public function setUp(): void { parent::setUp(); if (!defined('URL_KEY')) { diff --git a/tests/unit/workflow/engine/methods/users/UsersAjaxTest.php b/tests/unit/workflow/engine/methods/users/UsersAjaxTest.php index 21cce0555..a5825b391 100644 --- a/tests/unit/workflow/engine/methods/users/UsersAjaxTest.php +++ b/tests/unit/workflow/engine/methods/users/UsersAjaxTest.php @@ -13,7 +13,7 @@ class UsersAjaxTest extends TestCase /** * Set up the deprecated errors */ - public function setUp() + public function setUp(): void { parent::setUp(); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); diff --git a/tests/unit/workflow/engine/methods/users/Users_AjaxTest.php b/tests/unit/workflow/engine/methods/users/Users_AjaxTest.php index d5796adab..c247310d7 100644 --- a/tests/unit/workflow/engine/methods/users/Users_AjaxTest.php +++ b/tests/unit/workflow/engine/methods/users/Users_AjaxTest.php @@ -14,7 +14,7 @@ class Users_AjaxTest extends TestCase /** * Set up the deprecated errors */ - public function setUp() + public function setUp(): void { parent::setUp(); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/BatchRoutingTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/BatchRoutingTest.php index 8d7e55ab1..dd274780f 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/BatchRoutingTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/BatchRoutingTest.php @@ -20,7 +20,7 @@ class BatchRoutingTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CanceledTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CanceledTest.php index 143721296..1f10bc465 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CanceledTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CanceledTest.php @@ -20,7 +20,7 @@ class CanceledTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CasesListTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CasesListTest.php index 1e8ccc7c9..a259bc05d 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CasesListTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CasesListTest.php @@ -20,7 +20,7 @@ class CasesListTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CompletedTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CompletedTest.php index e2f502dea..2afdeb05b 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CompletedTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/CompletedTest.php @@ -20,7 +20,7 @@ class CompletedTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php index b16fa7323..51c7fc92d 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php @@ -27,7 +27,7 @@ class DraftTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/HomeTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/HomeTest.php index 189583f31..6f5e4f62a 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/HomeTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/HomeTest.php @@ -29,7 +29,7 @@ class HomeTest extends TestCase /** * setUp method. */ - public function setUp() + public function setUp(): void { parent::setUp(); } @@ -37,7 +37,7 @@ class HomeTest extends TestCase /** * tearDown method. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php index 2704fe5b9..0c691f91d 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php @@ -28,7 +28,7 @@ class InboxTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); @@ -37,7 +37,8 @@ class InboxTest extends TestCase /** * Method tearDown */ - public function tearDown() { + public function tearDown(): void + { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ParticipatedTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ParticipatedTest.php index 0d90d7148..747dbf557 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ParticipatedTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/ParticipatedTest.php @@ -21,7 +21,7 @@ class ParticipatedTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/PausedTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/PausedTest.php index 098517c16..b1d4e35eb 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/PausedTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/PausedTest.php @@ -29,7 +29,7 @@ class PausedTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SearchTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SearchTest.php index 3daf93c8f..cd8aa42de 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SearchTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SearchTest.php @@ -21,7 +21,7 @@ class SearchTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); Application::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php index dca0559c3..c51495df6 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php @@ -26,7 +26,7 @@ class SupervisingTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/UnassignedTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/UnassignedTest.php index beebd3788..e20542125 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/UnassignedTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/UnassignedTest.php @@ -33,7 +33,7 @@ class UnassignedTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/CasesTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/CasesTest.php index ba0e97d7e..944dc7a53 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/CasesTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/CasesTest.php @@ -28,7 +28,7 @@ class CasesTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/EmailServerTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/EmailServerTest.php index 536211b6e..68aea2cab 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/EmailServerTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/EmailServerTest.php @@ -19,13 +19,21 @@ class EmailServerTest extends TestCase /** * set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->emailServer = new EmailServer(); $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. * @return array @@ -403,12 +411,4 @@ class EmailServerTest extends TestCase $this->expectExceptionMessage("**ID_EMAIL_SERVER_DOES_NOT_EXIST**"); $emailServer->getEmailServer($email['MESS_UID']); } - - /** - * Call the tearDown method - */ - public function tearDown() - { - parent::tearDown(); // TODO: Change the autogenerated stub - } } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/FilesManagerTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/FilesManagerTest.php index 64331b600..7593c6e4f 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/FilesManagerTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/FilesManagerTest.php @@ -20,7 +20,7 @@ class FilesManagerTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); @@ -30,7 +30,7 @@ class FilesManagerTest extends TestCase /** * Tear down method. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); $this->directories = array_reverse($this->directories); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/GroupTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/GroupTest.php index d6a4b9c86..b3f77bd0f 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/GroupTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/GroupTest.php @@ -40,7 +40,7 @@ class GroupTest extends TestCase /** * Sets up the unit tests. */ - protected function setUp() + public function setUp(): void { parent::setUp(); $this->setInstanceGroup(new Group()); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/SkinsTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/SkinsTest.php index f18b3d98c..bc0ab56ab 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/SkinsTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/SkinsTest.php @@ -18,7 +18,7 @@ class SkinsTest extends TestCase /** * Sets up the unit test. */ - protected function setUp() + public function setUp(): void { parent::setUp(); $this->object = new Skins(); @@ -27,7 +27,7 @@ class SkinsTest extends TestCase /** * Tears down the unit test. */ - protected function tearDown() + public function tearDown(): void { parent::tearDown(); G::rm_dir(PATH_DATA . 'skins'); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/TableTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/TableTest.php index 1344dafca..af187440b 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/TableTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/TableTest.php @@ -11,7 +11,7 @@ class TableTest extends TestCase /** * Method setUp. */ - public function setUp() + public function setUp(): void { parent::setUp(); AdditionalTables::truncate(); @@ -20,7 +20,7 @@ class TableTest extends TestCase /** * Method tearDown. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/VariableTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/VariableTest.php index 29d819761..b1c738a3b 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/VariableTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/VariableTest.php @@ -21,7 +21,7 @@ class VariableTest extends TestCase /** * This method calls the parent setUp */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('Illegal mix of collations'); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Cases/CasesTraitTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Cases/CasesTraitTest.php index 4f27c3fd8..0f68fe95f 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Cases/CasesTraitTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Cases/CasesTraitTest.php @@ -30,7 +30,7 @@ class CasesTraitTest extends TestCase /** * Set up method. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Core/JobsManagerTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Core/JobsManagerTest.php index 2d16c443e..dd8f92ece 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Core/JobsManagerTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Core/JobsManagerTest.php @@ -16,7 +16,7 @@ class JobsManagerTest extends TestCase * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + public function setUp(): void { parent::setUp(); $this->object = new JobsManager; @@ -26,7 +26,7 @@ class JobsManagerTest extends TestCase * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Core/SystemTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Core/SystemTest.php index 56d03ba37..9ea32a456 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Core/SystemTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Core/SystemTest.php @@ -14,7 +14,7 @@ class SystemTest extends TestCase /** * Define the required variables */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/GmailOAuth/GmailOAuthTest.php b/tests/unit/workflow/engine/src/ProcessMaker/GmailOAuth/GmailOAuthTest.php index d19a2e92b..0ffe9ad8d 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/GmailOAuth/GmailOAuthTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/GmailOAuth/GmailOAuthTest.php @@ -23,7 +23,7 @@ class GmailOAuthTest extends TestCase /** * Init properties */ - public function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php index fe93291c4..8d991e848 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php @@ -18,7 +18,7 @@ class ImporterTest extends TestCase /** * Declared to avoid the incompatibility exception */ - public function setUp() + public function setUp(): void { parent::setUp(); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php index dda3d3677..994c16e40 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Importer/XmlImporterTest.php @@ -19,7 +19,7 @@ class XmlImporterTest extends TestCase /** * Set up unit tests. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->user = factory(User::class)->create(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/AbeConfigurationTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/AbeConfigurationTest.php index 3b89ac90e..fbefff920 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/AbeConfigurationTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/AbeConfigurationTest.php @@ -23,7 +23,7 @@ class AbeConfigurationTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub } @@ -31,7 +31,7 @@ class AbeConfigurationTest extends TestCase /** * Call the tearDown parent method */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); // TODO: Change the autogenerated stub } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppDelayTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppDelayTest.php index b703b5bc3..0ebe25973 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppDelayTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppDelayTest.php @@ -18,7 +18,7 @@ class AppDelayTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); AppDelay::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppThreadTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppThreadTest.php index b683fb3c3..e5709f9ba 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppThreadTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppThreadTest.php @@ -18,7 +18,7 @@ class AppThreadTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php index 2b9e5b92c..5b4b9e8e5 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php @@ -22,7 +22,7 @@ class ApplicationTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); Application::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/CaseListTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/CaseListTest.php index 8c2b56ec5..3b344b058 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/CaseListTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/CaseListTest.php @@ -16,7 +16,7 @@ class CaseListTest extends TestCase /** * setUp method. */ - public function setUp() + public function setUp(): void { parent::setUp(); } @@ -24,7 +24,7 @@ class CaseListTest extends TestCase /** * teardown method. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/ConsolidatedTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/ConsolidatedTest.php index 5642e6741..7532cc285 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/ConsolidatedTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/ConsolidatedTest.php @@ -20,7 +20,7 @@ class ConsolidatedTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php index ddd15aa44..68e1786f0 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php @@ -35,7 +35,7 @@ class DelegationTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/DynaformTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/DynaformTest.php index 75718d73f..2fd887566 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/DynaformTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/DynaformTest.php @@ -19,7 +19,7 @@ class DynaformTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailEventTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailEventTest.php index 60cdff1cd..139721110 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailEventTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailEventTest.php @@ -16,11 +16,19 @@ class EmailEventTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { 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 * @@ -71,12 +79,4 @@ class EmailEventTest extends TestCase $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 - } } \ No newline at end of file diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailServerModelTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailServerModelTest.php index f586d43cb..d2b27f506 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailServerModelTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/EmailServerModelTest.php @@ -15,7 +15,7 @@ class EmailServerModelTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub } @@ -23,7 +23,7 @@ class EmailServerModelTest extends TestCase /** * Call the tearDown parent method */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); // TODO: Change the autogenerated stub } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupUserTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupUserTest.php index 09f69c48e..73a3e0bb3 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupUserTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupUserTest.php @@ -21,7 +21,7 @@ class GroupUserTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); GroupUser::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupwfTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupwfTest.php index ef7e585db..537286fd0 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupwfTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/GroupwfTest.php @@ -19,7 +19,7 @@ class GroupwfTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Groupwf::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessCategoryTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessCategoryTest.php index 1cca9ddc0..3388ac061 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessCategoryTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessCategoryTest.php @@ -18,7 +18,7 @@ class ProcessCategoryTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); ProcessCategory::query()->delete(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessTest.php index 1ce21d7e3..13290f2c4 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/ProcessTest.php @@ -23,7 +23,7 @@ class ProcessTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); Process::query()->delete(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/SubProcessTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/SubProcessTest.php index a7e04038b..a5e6585da 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/SubProcessTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/SubProcessTest.php @@ -19,7 +19,7 @@ class SubProcessTest extends TestCase /** * Call the setUp parent method */ - public function setUp() + public function setUp(): void { parent::setUp(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/UserConfigTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/UserConfigTest.php index 49701cc77..38d752124 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/UserConfigTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/UserConfigTest.php @@ -16,7 +16,7 @@ class UserConfigTest extends TestCase /** * Setup method, */ - public function setUp() + public function setUp(): void { parent::setUp(); UserConfig::truncate(); @@ -25,7 +25,7 @@ class UserConfigTest extends TestCase /** * Teardown method. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/UserTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/UserTest.php index d0725a2ec..4d85743e7 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/UserTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/UserTest.php @@ -19,7 +19,7 @@ class UserTest extends TestCase /** * Set up function. */ - public function setUp() + public function setUp(): void { parent::setUp(); User::query()->delete(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php index 03c586245..b5a7c4bc6 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php @@ -19,7 +19,7 @@ class BpmnWorkflowTest extends TestCase /** * Set up testing. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->user = factory(User::class)->create(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Project/WorkflowTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Project/WorkflowTest.php index 98ba3a1c4..095132178 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Project/WorkflowTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Project/WorkflowTest.php @@ -21,7 +21,7 @@ class WorkflowTest extends TestCase /** * This method sets the values before starting any test. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->workflow = new Workflow(); @@ -33,7 +33,7 @@ class WorkflowTest extends TestCase /** * This method is executed after each test. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); foreach ($this->files as $value) { diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Report/ReportingTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Report/ReportingTest.php index 6c0cd3712..b4c3cc692 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Report/ReportingTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Report/ReportingTest.php @@ -21,7 +21,7 @@ class ReportingTest extends TestCase /** * Method setUp. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->reporting = new Reporting(); @@ -30,7 +30,7 @@ class ReportingTest extends TestCase /** * Method tearDown. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/LightTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/LightTest.php index d8d9aeb05..bf3c16bb2 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/LightTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/LightTest.php @@ -32,7 +32,7 @@ class LightTest extends TestCase * This is using instead of DatabaseTransactions * @todo DatabaseTransactions is having conflicts with propel */ - protected function setUp() + public function setUp(): void { parent::setUp(); $this->workspace = env("DB_DATABASE", "test"); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/MetricsTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/MetricsTest.php index 55c28af22..bf0ac10c1 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/MetricsTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/MetricsTest.php @@ -35,7 +35,7 @@ class MetricsTest extends TestCase /** * Method set up. */ - public function setUp() + public function setUp(): void { parent::setUp(); Delegation::truncate(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/ProjectTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/ProjectTest.php index cd532281e..7ebcf7cc0 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/ProjectTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Services/Api/ProjectTest.php @@ -15,7 +15,7 @@ class ProjectTest extends TestCase { private $user; - public function setUp() + public function setUp(): void { parent::setUp(); $this->user = factory(User::class)->create(); diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php index 9684efc69..2488aeaf5 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Services/OAuth2/ServerTest.php @@ -17,7 +17,7 @@ class ServerTest extends TestCase /** * Setup method. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->server = $_SERVER; @@ -29,7 +29,7 @@ class ServerTest extends TestCase /** * Teardown method. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); $_SERVER = $this->server; diff --git a/tests/unit/workflow/engine/src/ProcessMaker/TaskScheduler/TaskTest.php b/tests/unit/workflow/engine/src/ProcessMaker/TaskScheduler/TaskTest.php index bf6720f2c..5411eda35 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/TaskScheduler/TaskTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/TaskScheduler/TaskTest.php @@ -23,7 +23,7 @@ class TaskTest extends TestCase /** * Method setUp. */ - protected function setUp() + public function setUp(): void { if (version_compare(phpversion(), 7.3, '>') ) { $this->markTestSkipped('The changes in third party are not available'); @@ -38,7 +38,7 @@ class TaskTest extends TestCase /** * Method tearDown. */ - protected function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Validation/SqlBlacklistTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Validation/SqlBlacklistTest.php index 321be5815..4e9a927ef 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Validation/SqlBlacklistTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Validation/SqlBlacklistTest.php @@ -23,7 +23,7 @@ class SqlBlacklistTest extends TestCase /** * Method setUp. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->content = ""; @@ -36,7 +36,7 @@ class SqlBlacklistTest extends TestCase /** * Method tearDown. */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); $path = PATH_CONFIG . 'execute-query-blacklist.ini'; diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Validation/ValidationUploadedFilesTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Validation/ValidationUploadedFilesTest.php index d4b8f2edf..037095994 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Validation/ValidationUploadedFilesTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Validation/ValidationUploadedFilesTest.php @@ -14,7 +14,7 @@ class ValidationUploadedFilesTest extends TestCase /** * It copies the images for the test */ - public function setUp() + public function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub 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'); } + /** + * 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 * @@ -148,21 +165,4 @@ class ValidationUploadedFilesTest extends TestCase $this->assertEmpty($result->getMessage()); $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'); - } - } }