From 95b7ede4e8e5af033df93d0aa302573d7da40e50 Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Mon, 24 Jul 2017 12:13:43 -0400 Subject: [PATCH] HOR-3560 --- .../gulliver/system/classControllerTest.php | 346 -- .../gulliver/system/classDBTableTest.php | 210 -- .../system/classDataBaseMaintenanceTest.php | 449 --- .../gulliver/system/classFormTest.php | 242 -- .../automated/gulliver/system/classGTest.php | 2447 -------------- .../gulliver/system/classG_ErrorTest.php | 92 - .../gulliver/system/classHelperTest.php | 158 - .../system/classHttpProxyControllerTest.php | 172 - .../gulliver/system/classMenuTest.php | 270 -- .../gulliver/system/classPHPSQLParserTest.php | 111 - .../gulliver/system/classPMExceptionTest.php | 87 - .../gulliver/system/classPublisherTest.php | 133 - .../gulliver/system/classRBACTest.php | 922 ------ .../gulliver/system/classRestClientTest.php | 394 --- .../gulliver/system/classTableTest.php | 507 --- .../system/classTemplatePowerParserTest.php | 181 -- .../system/classTemplatePowerTest.php | 309 -- .../gulliver/system/classTreeTest.php | 135 - .../gulliver/system/classXmlFormTest.php | 116 - .../system/classXmlForm_FieldTest.php | 460 --- .../system/classXmlForm_Field_ButtonTest.php | 71 - ...classXmlForm_Field_CaptionCurrencyTest.php | 67 - ...assXmlForm_Field_CaptionPercentageTest.php | 67 - .../system/classXmlForm_Field_CaptionTest.php | 105 - .../classXmlForm_Field_CheckGroupTest.php | 71 - .../classXmlForm_Field_CheckGroupViewTest.php | 67 - .../classXmlForm_Field_Checkbox2Test.php | 67 - .../classXmlForm_Field_CheckboxTest.php | 107 - .../classXmlForm_Field_CheckboxptTest.php | 107 - .../classXmlForm_Field_CurrencyTest.php | 89 - .../classXmlForm_Field_DVEditorTest.php | 85 - .../system/classXmlForm_Field_Date2Test.php | 143 - .../system/classXmlForm_Field_Date5Test.php | 187 -- .../system/classXmlForm_Field_DateTest.php | 165 - .../classXmlForm_Field_DateViewTest.php | 67 - .../classXmlForm_Field_DropdownTest.php | 133 - .../classXmlForm_Field_DropdownptTest.php | 89 - .../classXmlForm_Field_FastSearchTest.php | 51 - .../system/classXmlForm_Field_FileTest.php | 67 - .../system/classXmlForm_Field_GridTest.php | 147 - .../system/classXmlForm_Field_HiddenTest.php | 105 - .../system/classXmlForm_Field_ImageTest.php | 70 - .../classXmlForm_Field_JavaScriptTest.php | 127 - .../system/classXmlForm_Field_LabelTest.php | 51 - .../system/classXmlForm_Field_LinkTest.php | 123 - .../system/classXmlForm_Field_ListboxTest.php | 109 - .../classXmlForm_Field_PasswordTest.php | 67 - .../classXmlForm_Field_PercentageTest.php | 71 - .../system/classXmlForm_Field_PrintTest.php | 71 - .../classXmlForm_Field_RadioGroupTest.php | 87 - .../classXmlForm_Field_RadioGroupViewTest.php | 71 - .../system/classXmlForm_Field_ResetTest.php | 69 - .../classXmlForm_Field_SimpleTextTest.php | 87 - .../system/classXmlForm_Field_SubmitTest.php | 69 - .../classXmlForm_Field_SubtitleTest.php | 82 - .../system/classXmlForm_Field_SuggestTest.php | 107 - .../system/classXmlForm_Field_TextTest.php | 107 - .../classXmlForm_Field_TextareaTest.php | 87 - .../system/classXmlForm_Field_TitleTest.php | 84 - .../system/classXmlForm_Field_XmlMenuTest.php | 105 - .../system/classXmlForm_Field_XmlformTest.php | 106 - .../system/classXmlForm_Field_YesNoTest.php | 89 - .../classXmlForm_Field_cellMarkTest.php | 87 - .../gulliver/system/classXml_NodeTest.php | 178 -- .../gulliver/system/classXml_documentTest.php | 122 - .../system/classdatabase_baseTest.php | 201 -- .../system/classdynaFormHandlerTest.php | 444 --- .../gulliver/system/classfilterFormTest.php | 69 - .../system/classheadPublisherTest.php | 461 --- .../gulliver/system/classi18n_POTest.php | 297 -- .../gulliver/system/classmailerTest.php | 252 -- .../system/classobjectTemplateTest.php | 81 - .../gulliver/system/classpagedTableTest.php | 180 -- .../gulliver/system/classxmlMenuTest.php | 51 - .../system/classxmlformTemplateTest.php | 234 -- .../gulliver/system/classymlTestCasesTest.php | 186 -- .../engine/classes/classAppSolrTest.php | 560 ---- ...nWithoutDelegationRecordsExceptionTest.php | 82 - .../engine/classes/classApplicationsTest.php | 198 -- ...sBpmnEngine_SearchIndexAccess_SolrTest.php | 234 -- ...assBpmnEngine_Services_SearchIndexTest.php | 190 -- .../workflow/engine/classes/classCLITest.php | 267 -- .../engine/classes/classCasesTest.php | 1956 ------------ .../classes/classConfigurationsTest.php | 398 --- .../engine/classes/classDerivationTest.php | 271 -- .../engine/classes/classDynaFormFieldTest.php | 132 - .../classes/classFieldValidatorTest.php | 441 --- .../engine/classes/classFileCacheTest.php | 117 - .../engine/classes/classGroupsTest.php | 322 -- .../engine/classes/classInstallerTest.php | 231 -- ...assInvalidIndexSearchTextExceptionTest.php | 82 - .../engine/classes/classJavaBridgePMTest.php | 100 - .../workflow/engine/classes/classNETTest.php | 261 -- .../classes/classObjectCellectionTest.php | 97 - .../classes/classObjectDocumentTest.php | 61 - .../engine/classes/classPMDashletTest.php | 226 -- .../classes/classPMPluginRegistryTest.php | 955 ------ .../engine/classes/classPMPluginTest.php | 452 --- .../engine/classes/classPMScriptTest.php | 151 - .../engine/classes/classPMmemcachedTest.php | 228 -- .../engine/classes/classPmTableTest.php | 418 --- .../engine/classes/classProcessesTest.php | 2176 ------------- .../engine/classes/classReportTablesTest.php | 272 -- .../engine/classes/classReportTest.php | 268 -- .../engine/classes/classSessionsTest.php | 142 - .../workflow/engine/classes/classStatTest.php | 61 - .../engine/classes/classTasksTest.php | 516 --- .../engine/classes/classToolBarTest.php | 50 - .../engine/classes/classXMLConnectionTest.php | 225 -- .../engine/classes/classXMLDBTest.php | 84 - .../engine/classes/classXMLResultTest.php | 94 - .../classXmlForm_Field_CheckBoxTableTest.php | 74 - .../classes/classXmlForm_Field_TextPMTest.php | 106 - .../classXmlForm_Field_TextareaPMTest.php | 90 - .../classXmlForm_Field_ToolBarTest.php | 93 - .../classes/classXmlForm_Field_hoursTest.php | 106 - .../classXmlForm_Field_popupOptionTest.php | 65 - .../classXmlForm_Field_toolButtonTest.php | 69 - .../engine/classes/classarchiveTest.php | 224 -- .../engine/classes/classbzip_fileTest.php | 89 - .../engine/classes/classcalendarTest.php | 135 - .../classes/classcaseSchedulerPluginTest.php | 83 - .../engine/classes/classcssFileTest.php | 68 - .../engine/classes/classdashboardPageTest.php | 76 - .../classdashletOpenVSCompletedTest.php | 110 - .../classdashletProcessMakerCommunityTest.php | 110 - ...classdashletProcessMakerEnterpriseTest.php | 110 - .../classes/classdashletRssReaderTest.php | 110 - .../engine/classes/classdatesTest.php | 269 -- .../classes/classdynaformEditorAjaxTest.php | 381 --- .../classes/classdynaformEditorTest.php | 169 - .../engine/classes/classfolderDataTest.php | 86 - .../engine/classes/classfolderDetailTest.php | 71 - .../engine/classes/classgzip_fileTest.php | 89 - .../engine/classes/classloginInfoTest.php | 72 - .../engine/classes/classmenuDetailTest.php | 71 - .../engine/classes/classpluginDetailTest.php | 92 - .../engine/classes/classpmGaugeTest.php | 85 - .../engine/classes/classpmPhingTest.php | 61 - .../engine/classes/classpopupMenuTest.php | 70 - .../engine/classes/classprocessMapTest.php | 2826 ----------------- .../engine/classes/classpropelTableTest.php | 179 -- .../classes/classredirectDetailTest.php | 74 - .../classes/classreplacementLogoTest.php | 106 - .../engine/classes/classserverConfTest.php | 385 --- .../engine/classes/classspoolRunTest.php | 202 -- .../engine/classes/classstepDetailTest.php | 77 - .../engine/classes/classtar_fileTest.php | 101 - .../classes/classtaskExtendedPropertyTest.php | 76 - .../engine/classes/classtoolbarDetailTest.php | 72 - .../engine/classes/classtriggerDetailTest.php | 74 - .../classes/classtriggerLibraryTest.php | 172 - .../classes/classuploadDocumentDataTest.php | 88 - .../classes/classworkspaceToolsTest.php | 475 --- .../engine/classes/classwsBaseTest.php | 687 ---- .../classwsCreateDepartmentResponseTest.php | 71 - .../classwsCreateGroupResponseTest.php | 73 - .../classes/classwsCreateUserResponseTest.php | 73 - .../classwsGetCaseNotesResponseTest.php | 71 - .../classwsGetVariableResponseTest.php | 71 - .../engine/classes/classwsResponseTest.php | 95 - .../engine/classes/classzip_fileTest.php | 77 - tests/bootstrap.php | 137 - tests/fixtures/README.txt | 1 - tests/fixtures/os/db.php | 11 - tests/functional/README.txt | 1 - tests/functional/pom.xml | 153 - tests/functional/src/main/app.conf | 1 - tests/functional/src/main/default.conf | 27 - .../qa/automatization/common/Browser.java | 164 - .../common/BrowserConfiguration.java | 109 - .../common/BrowserInstance.java | 599 ---- .../common/BrowserSettings.java | 68 - .../common/ConfigurationSettings.java | 65 - .../qa/automatization/common/Constant.java | 12 - .../automatization/common/FieldKeyType.java | 13 - .../qa/automatization/common/FieldType.java | 27 - .../common/InvalidPageException.java | 15 - .../qa/automatization/common/Logger.java | 37 - .../qa/automatization/common/Registry.java | 65 - .../qa/automatization/common/Utils.java | 40 - .../qa/automatization/common/WaitTool.java | 652 ---- .../common/controlOptions/ControlOptions.java | 151 - .../DependentFieldsApplicableBehavior.java | 9 - .../DependentFieldsApplicableOption.java | 20 - .../DependentFieldsNotApplicableOption.java | 11 - .../input/InputControlOptions.java | 72 - .../controlOptions/input/NumericOptions.java | 71 - .../controlOptions/input/PasswordOptions.java | 37 - .../controlOptions/input/SuggestOptions.java | 102 - .../controlOptions/input/TextAreaOptions.java | 19 - .../input/TextFieldOptions.java | 96 - .../selection/DropDownOption.java | 25 - .../selection/DropDownOptions.java | 43 - .../selection/ListBoxOptions.java | 31 - .../selection/YesNoOptions.java | 43 - .../common/extJs/ExtJSFloatingMenu.java | 136 - .../common/extJs/ExtJSForm.java | 91 - .../common/extJs/ExtJSFormItem.java | 69 - .../common/extJs/ExtJSGrid.java | 403 --- .../common/extJs/ExtJSGridHeader.java | 65 - .../common/extJs/ExtJSGridRow.java | 48 - .../common/extJs/ExtJSMenuItem.java | 37 - .../common/extJs/ExtJSToolbar.java | 137 - .../common/extJs/ExtJSToolbarCell.java | 173 - .../common/extJs/ExtJSTree.java | 400 --- .../common/extJs/ExtJSTreeNode.java | 202 -- .../common/extJs/ExtJSWindow.java | 51 - .../common/extJs/ExtJSWindowToolbar.java | 94 - .../colosa/qa/automatization/pages/Page.java | 39 - .../colosa/qa/automatization/pages/Pages.java | 40 - .../qa/automatization/tests/common/Test.java | 98 - .../tests/common/WebDriverFunctionsPMOS2.java | 348 -- .../qa/automatization/tests/test/Example.java | 43 - .../qa/automatization/TestSuiteAll.java | 33 - tests/tools/generateTestUnit.php | 308 -- tests/unit/backend/README.txt | 2 - tests/unit/backend/gulliver/system/GTest.php | 1810 ----------- .../gulliver/system/PHPSQLParserTest.php | 64 - .../gulliver/system/dynaFormHandlerTest.php | 292 -- .../backend/gulliver/system/i18n_POTest.php | 220 -- tests/unit/backend/services/AppOwnerTest.php | 184 -- .../unit/backend/services/ApplicationTest.php | 167 - .../services/CalendarDefinitionTest.php | 176 - tests/unit/backend/services/ContentTest.php | 174 - tests/unit/backend/services/ProcessTest.php | 173 - tests/unit/backend/services/Rest/CRUD.java | 204 -- .../backend/services/Rest/CURLMessage.php | 149 - .../backend/services/Rest/FormatedMessage.php | 46 - .../backend/services/Rest/JsonMessage.php | 43 - .../backend/services/Rest/RestMessage.php | 47 - .../backend/services/Rest/SimpleMessage.php | 43 - .../unit/backend/services/Rest/XmlMessage.php | 48 - .../services/Rest/fixtures/application.xml | 33 - tests/unit/backend/services/Rest/testing.php | 37 - tests/unit/backend/services/SessionTest.php | 173 - tests/unit/backend/services/StepTest.php | 183 -- .../unit/backend/services/TranslationTest.php | 169 - .../backend/services/UsersPropertiesTest.php | 169 - tests/unit/backend/services/UsersTest.php | 177 -- .../workflow/engine/classes/AppSolrTest.php | 252 -- .../triggers/pmAlfrescoFunctionsTest.php | 44 - tests/unit/frontend/README.txt | 2 - .../src/Tests/BusinessModel/CalendarTest.php | 403 --- .../BusinessModel/CasesActionTest13_17.php | 392 --- .../src/Tests/BusinessModel/CasesTest.php | 175 - .../src/Tests/BusinessModel/CasesTest7_12.php | 356 --- .../Tests/BusinessModel/DepartmentTest.php | 354 --- .../BusinessModel/InputDocumentsCasesTest.php | 204 -- .../OutputDocumentsCasesTest.php | 212 -- .../BusinessModel/ProcessCategoryTest.php | 320 -- .../BusinessModel/Role/PermissionTest.php | 208 -- .../src/Tests/BusinessModel/Role/UserTest.php | 225 -- .../src/Tests/BusinessModel/RoleTest.php | 330 -- .../src/Tests/Model/BpmnActivityTest.php | 315 -- .../engine/src/Tests/Model/BpmnEventTest.php | 297 -- .../src/Tests/Model/BpmnGatewayTest.php | 262 -- .../ProcessMaker/Exporter/XmlExporterTest.php | 166 - .../ProcessMaker/Importer/XmlImporterTest.php | 216 -- .../Project/Adapter/BpmnWorkflowTest.php | 713 ----- .../Project/Adapter/WorkflowBpmnTest.php | 92 - .../Tests/ProcessMaker/Project/BpmnTest.php | 278 -- .../ProcessMaker/Project/WorkflowTest.php | 287 -- .../Tests/ProcessMaker/Util/CommonTest.php | 44 - workflow/engine/src/Tests/bootstrap.php | 5 - workflow/engine/src/Tests/config.ini.dist | 4 - .../fixtures/files_struct/first/sample-1.txt | 1 - .../fixtures/files_struct/first/sample-2.txt | 1 - .../fixtures/files_struct/first/sample-3.txt | 1 - .../fixtures/files_struct/second/sample-1.txt | 1 - .../fixtures/files_struct/second/sample-2.txt | 1 - .../fixtures/files_struct/second/sample-3.txt | 1 - .../fixtures/files_struct/second/sample-5.txt | 1 - .../fixtures/files_struct/third/sample-1.txt | 1 - .../fixtures/files_struct/third/sample-2.txt | 1 - .../files_struct/third/sample-3.1.9.txt | 1 - .../files_struct/third/sample-3.1.txt | 1 - .../fixtures/files_struct/third/sample-3.txt | 1 - workflow/engine/src/Tests/pm-bootstrap.php | 34 - workflow/engine/test/bootstrap/functional.php | 52 - .../test/bootstrap/gulliverConstants.php | 103 - workflow/engine/test/bootstrap/unit.php | 107 - .../engine/test/fixtures/appDelegation.yml | 40 - workflow/engine/test/fixtures/appDocument.yml | 100 - workflow/engine/test/fixtures/application.yml | 10 - .../engine/test/fixtures/applicationInput.yml | 75 - .../engine/test/fixtures/configuration.yml | 47 - workflow/engine/test/fixtures/content.yml | 71 - workflow/engine/test/fixtures/departments.txt | 34 - workflow/engine/test/fixtures/derivation.yml | 28 - workflow/engine/test/fixtures/domain.yml | 34 - workflow/engine/test/fixtures/es.yml | 59 - workflow/engine/test/fixtures/firstname.txt | 501 --- workflow/engine/test/fixtures/fixtures.yml | 29 - workflow/engine/test/fixtures/groupUser.yml | 36 - workflow/engine/test/fixtures/groups.txt | 32 - .../engine/test/fixtures/inputDocument.yml | 88 - workflow/engine/test/fixtures/lastname.txt | 222 -- .../engine/test/fixtures/outputDocument.yml | 84 - workflow/engine/test/fixtures/processMap.yml | 494 --- workflow/engine/test/fixtures/route.yml | 112 - workflow/engine/test/fixtures/step.yml | 35 - workflow/engine/test/fixtures/stepTrigger.yml | 43 - .../test/fixtures/swimlanesElements.yml | 84 - workflow/engine/test/fixtures/task.yml | 32 - workflow/engine/test/fixtures/taskUser.yml | 44 - workflow/engine/test/fixtures/trigger.yml | 32 - workflow/engine/test/fixtures/user.yml | 34 - .../unit/gulliver/classDBConnectionTest.php | 74 - .../unit/gulliver/classDBRecordsetTest.php | 66 - .../test/unit/gulliver/classDBSessionTest.php | 67 - .../test/unit/gulliver/classDBTableTest.php | 71 - .../unit/gulliver/classDatabase_baseTest.php | 59 - .../unit/gulliver/classDatabase_mysqlTest.php | 65 - .../gulliver/classDynaformhandlerTest.php | 44 - .../test/unit/gulliver/classErrorTest.php | 79 - .../unit/gulliver/classFilterFormTest.php | 49 - .../test/unit/gulliver/classFormTest.php | 59 - .../engine/test/unit/gulliver/classGTest.php | 276 -- .../unit/gulliver/classHeadPublisherTest.php | 73 - .../test/unit/gulliver/classMailerTest.php | 67 - .../test/unit/gulliver/classMenuTest.php | 72 - .../unit/gulliver/classObjectTemplateTest.php | 58 - .../unit/gulliver/classPagedTableTest.php | 44 - .../test/unit/gulliver/classPublisherTest.php | 63 - .../test/unit/gulliver/classRbacTest.php | 66 - .../test/unit/gulliver/classTableTest.php | 81 - .../unit/gulliver/classTemplatePowerTest.php | 77 - .../test/unit/gulliver/classTreeTest.php | 67 - .../unit/gulliver/classWebResourceTest.php | 48 - .../unit/gulliver/classXmlDocumentTest.php | 74 - .../test/unit/gulliver/classXmlMenuTest.php | 65 - .../gulliver/classXmlformExtensionTest.php | 49 - .../test/unit/gulliver/classXmlformTest.php | 46 - .../unit/processmaker/classArchiveTest.php | 167 - .../processmaker/classArrayBasePeerTest.php | 229 -- .../unit/processmaker/classBasePeerTest.php | 183 -- .../test/unit/processmaker/classCasesTest.php | 638 ---- .../unit/processmaker/classDashboardsTest.php | 96 - .../test/unit/processmaker/classDatesTest.php | 207 -- .../processmaker/classDbConnectionsTest.php | 151 - .../processmaker/classDynaFormFieldTest.php | 82 - .../test/unit/processmaker/classESMTPTest.php | 242 -- .../unit/processmaker/classInsertTest.php | 72 - .../unit/processmaker/classInstallerTest.php | 178 -- .../processmaker/classJavaBridgePMTest.php | 73 - .../unit/processmaker/classLanguagesTest.php | 56 - .../unit/processmaker/classMenuDetailTest.php | 57 - .../test/unit/processmaker/classNetTest.php | 161 - .../unit/processmaker/classPackageTest.php | 113 - .../processmaker/classPluginDetailTest.php | 57 - .../unit/processmaker/classPmScriptTest.php | 89 - .../unit/processmaker/classPopupMenuTest.php | 55 - .../classProcessMakerWebDavTest.php | 465 --- .../unit/processmaker/classProcessesTest.php | 985 ------ .../processmaker/classPropelTableTest.php | 112 - .../processmaker/classReportTablesTest.php | 112 - .../unit/processmaker/classReportTest.php | 162 - .../unit/processmaker/classSessionsTest.php | 65 - .../test/unit/processmaker/classSmtpTest.php | 153 - .../unit/processmaker/classSpoolRunTest.php | 160 - .../unit/processmaker/classToolBarTest.php | 60 - .../processmaker/classTranslationTest.php | 55 - .../unit/processmaker/classWsBaseTest.php | 233 -- .../unit/processmaker/classWsResponseTest.php | 73 - .../test/unit/processmaker/classXmlDbTest.php | 64 - .../classXmlForm_Field_ImageTest.php | 209 -- .../classXmlForm_Field_TextPMTest.php | 210 -- .../test/unit/ws/EvaluationDerivationTest.php | 182 -- .../engine/test/unit/ws/OtherMethodsTest.php | 83 - .../test/unit/ws/ParallelDerivation2Test.php | 206 -- .../test/unit/ws/ParallelDerivationTest.php | 172 - .../test/unit/ws/ProcessWithSubprocess.php | 108 - .../test/unit/ws/SelectionDerivationTest.php | 152 - .../test/unit/ws/SequentialDerivationTest.php | 156 - .../engine/test/unit/ws/SubprocessTest.php | 166 - .../engine/test/unit/ws/basicMethodsTest.php | 492 --- .../engine/test/unit/ws/bugRelease09Test.php | 334 -- .../engine/test/unit/ws/reportsToTest.php | 260 -- workflow/engine/test/unit/ws/wsClient.php | 665 ---- .../engine/test/unit/ws/wsConfig.php.example | 9 - 381 files changed, 66414 deletions(-) delete mode 100644 tests/automated/gulliver/system/classControllerTest.php delete mode 100644 tests/automated/gulliver/system/classDBTableTest.php delete mode 100644 tests/automated/gulliver/system/classDataBaseMaintenanceTest.php delete mode 100644 tests/automated/gulliver/system/classFormTest.php delete mode 100644 tests/automated/gulliver/system/classGTest.php delete mode 100644 tests/automated/gulliver/system/classG_ErrorTest.php delete mode 100644 tests/automated/gulliver/system/classHelperTest.php delete mode 100644 tests/automated/gulliver/system/classHttpProxyControllerTest.php delete mode 100644 tests/automated/gulliver/system/classMenuTest.php delete mode 100644 tests/automated/gulliver/system/classPHPSQLParserTest.php delete mode 100644 tests/automated/gulliver/system/classPMExceptionTest.php delete mode 100644 tests/automated/gulliver/system/classPublisherTest.php delete mode 100644 tests/automated/gulliver/system/classRBACTest.php delete mode 100644 tests/automated/gulliver/system/classRestClientTest.php delete mode 100644 tests/automated/gulliver/system/classTableTest.php delete mode 100644 tests/automated/gulliver/system/classTemplatePowerParserTest.php delete mode 100644 tests/automated/gulliver/system/classTemplatePowerTest.php delete mode 100644 tests/automated/gulliver/system/classTreeTest.php delete mode 100644 tests/automated/gulliver/system/classXmlFormTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_FieldTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_ButtonTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CaptionCurrencyTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CaptionPercentageTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CaptionTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CheckGroupTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CheckGroupViewTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_Checkbox2Test.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CheckboxTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CheckboxptTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_CurrencyTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_DVEditorTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_Date2Test.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_Date5Test.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_DateTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_DateViewTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_DropdownTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_DropdownptTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_FastSearchTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_FileTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_GridTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_HiddenTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_ImageTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_JavaScriptTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_LabelTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_LinkTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_ListboxTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_PasswordTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_PercentageTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_PrintTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_RadioGroupTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_RadioGroupViewTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_ResetTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_SimpleTextTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_SubmitTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_SubtitleTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_SuggestTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_TextTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_TextareaTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_TitleTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_XmlMenuTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_XmlformTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_YesNoTest.php delete mode 100644 tests/automated/gulliver/system/classXmlForm_Field_cellMarkTest.php delete mode 100644 tests/automated/gulliver/system/classXml_NodeTest.php delete mode 100644 tests/automated/gulliver/system/classXml_documentTest.php delete mode 100644 tests/automated/gulliver/system/classdatabase_baseTest.php delete mode 100644 tests/automated/gulliver/system/classdynaFormHandlerTest.php delete mode 100644 tests/automated/gulliver/system/classfilterFormTest.php delete mode 100644 tests/automated/gulliver/system/classheadPublisherTest.php delete mode 100644 tests/automated/gulliver/system/classi18n_POTest.php delete mode 100644 tests/automated/gulliver/system/classmailerTest.php delete mode 100644 tests/automated/gulliver/system/classobjectTemplateTest.php delete mode 100644 tests/automated/gulliver/system/classpagedTableTest.php delete mode 100644 tests/automated/gulliver/system/classxmlMenuTest.php delete mode 100644 tests/automated/gulliver/system/classxmlformTemplateTest.php delete mode 100644 tests/automated/gulliver/system/classymlTestCasesTest.php delete mode 100644 tests/automated/workflow/engine/classes/classAppSolrTest.php delete mode 100644 tests/automated/workflow/engine/classes/classApplicationWithoutDelegationRecordsExceptionTest.php delete mode 100644 tests/automated/workflow/engine/classes/classApplicationsTest.php delete mode 100644 tests/automated/workflow/engine/classes/classBpmnEngine_SearchIndexAccess_SolrTest.php delete mode 100644 tests/automated/workflow/engine/classes/classBpmnEngine_Services_SearchIndexTest.php delete mode 100644 tests/automated/workflow/engine/classes/classCLITest.php delete mode 100644 tests/automated/workflow/engine/classes/classCasesTest.php delete mode 100644 tests/automated/workflow/engine/classes/classConfigurationsTest.php delete mode 100644 tests/automated/workflow/engine/classes/classDerivationTest.php delete mode 100644 tests/automated/workflow/engine/classes/classDynaFormFieldTest.php delete mode 100644 tests/automated/workflow/engine/classes/classFieldValidatorTest.php delete mode 100644 tests/automated/workflow/engine/classes/classFileCacheTest.php delete mode 100644 tests/automated/workflow/engine/classes/classGroupsTest.php delete mode 100644 tests/automated/workflow/engine/classes/classInstallerTest.php delete mode 100644 tests/automated/workflow/engine/classes/classInvalidIndexSearchTextExceptionTest.php delete mode 100644 tests/automated/workflow/engine/classes/classJavaBridgePMTest.php delete mode 100644 tests/automated/workflow/engine/classes/classNETTest.php delete mode 100644 tests/automated/workflow/engine/classes/classObjectCellectionTest.php delete mode 100644 tests/automated/workflow/engine/classes/classObjectDocumentTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPMDashletTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPMPluginRegistryTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPMPluginTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPMScriptTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPMmemcachedTest.php delete mode 100644 tests/automated/workflow/engine/classes/classPmTableTest.php delete mode 100644 tests/automated/workflow/engine/classes/classProcessesTest.php delete mode 100644 tests/automated/workflow/engine/classes/classReportTablesTest.php delete mode 100644 tests/automated/workflow/engine/classes/classReportTest.php delete mode 100644 tests/automated/workflow/engine/classes/classSessionsTest.php delete mode 100644 tests/automated/workflow/engine/classes/classStatTest.php delete mode 100644 tests/automated/workflow/engine/classes/classTasksTest.php delete mode 100644 tests/automated/workflow/engine/classes/classToolBarTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXMLConnectionTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXMLDBTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXMLResultTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_CheckBoxTableTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_ToolBarTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_hoursTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_popupOptionTest.php delete mode 100644 tests/automated/workflow/engine/classes/classXmlForm_Field_toolButtonTest.php delete mode 100644 tests/automated/workflow/engine/classes/classarchiveTest.php delete mode 100644 tests/automated/workflow/engine/classes/classbzip_fileTest.php delete mode 100644 tests/automated/workflow/engine/classes/classcalendarTest.php delete mode 100644 tests/automated/workflow/engine/classes/classcaseSchedulerPluginTest.php delete mode 100644 tests/automated/workflow/engine/classes/classcssFileTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdashboardPageTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdashletOpenVSCompletedTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdashletProcessMakerCommunityTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdashletProcessMakerEnterpriseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdashletRssReaderTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdatesTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdynaformEditorAjaxTest.php delete mode 100644 tests/automated/workflow/engine/classes/classdynaformEditorTest.php delete mode 100644 tests/automated/workflow/engine/classes/classfolderDataTest.php delete mode 100644 tests/automated/workflow/engine/classes/classfolderDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classgzip_fileTest.php delete mode 100644 tests/automated/workflow/engine/classes/classloginInfoTest.php delete mode 100644 tests/automated/workflow/engine/classes/classmenuDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classpluginDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classpmGaugeTest.php delete mode 100644 tests/automated/workflow/engine/classes/classpmPhingTest.php delete mode 100644 tests/automated/workflow/engine/classes/classpopupMenuTest.php delete mode 100644 tests/automated/workflow/engine/classes/classprocessMapTest.php delete mode 100644 tests/automated/workflow/engine/classes/classpropelTableTest.php delete mode 100644 tests/automated/workflow/engine/classes/classredirectDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classreplacementLogoTest.php delete mode 100644 tests/automated/workflow/engine/classes/classserverConfTest.php delete mode 100644 tests/automated/workflow/engine/classes/classspoolRunTest.php delete mode 100644 tests/automated/workflow/engine/classes/classstepDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classtar_fileTest.php delete mode 100644 tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php delete mode 100644 tests/automated/workflow/engine/classes/classtoolbarDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classtriggerDetailTest.php delete mode 100644 tests/automated/workflow/engine/classes/classtriggerLibraryTest.php delete mode 100644 tests/automated/workflow/engine/classes/classuploadDocumentDataTest.php delete mode 100644 tests/automated/workflow/engine/classes/classworkspaceToolsTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsBaseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsCreateDepartmentResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsCreateGroupResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsCreateUserResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsGetCaseNotesResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsGetVariableResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classwsResponseTest.php delete mode 100644 tests/automated/workflow/engine/classes/classzip_fileTest.php delete mode 100644 tests/bootstrap.php delete mode 100644 tests/fixtures/README.txt delete mode 100644 tests/fixtures/os/db.php delete mode 100644 tests/functional/README.txt delete mode 100644 tests/functional/pom.xml delete mode 100644 tests/functional/src/main/app.conf delete mode 100644 tests/functional/src/main/default.conf delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/Browser.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserConfiguration.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserInstance.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserSettings.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/ConfigurationSettings.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/Constant.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldKeyType.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldType.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/InvalidPageException.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/Logger.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/Registry.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/Utils.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/WaitTool.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/ControlOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableBehavior.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableOption.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsNotApplicableOption.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/InputControlOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/NumericOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/PasswordOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/SuggestOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextAreaOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextFieldOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOption.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/ListBoxOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/YesNoOptions.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFloatingMenu.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSForm.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFormItem.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGrid.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridHeader.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridRow.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/WebDriverFunctionsPMOS2.java delete mode 100644 tests/functional/src/main/java/com/colosa/qa/automatization/tests/test/Example.java delete mode 100644 tests/functional/src/test/java/com/colosa/qa/automatization/TestSuiteAll.java delete mode 100644 tests/tools/generateTestUnit.php delete mode 100644 tests/unit/backend/README.txt delete mode 100644 tests/unit/backend/gulliver/system/GTest.php delete mode 100644 tests/unit/backend/gulliver/system/PHPSQLParserTest.php delete mode 100644 tests/unit/backend/gulliver/system/dynaFormHandlerTest.php delete mode 100644 tests/unit/backend/gulliver/system/i18n_POTest.php delete mode 100644 tests/unit/backend/services/AppOwnerTest.php delete mode 100644 tests/unit/backend/services/ApplicationTest.php delete mode 100644 tests/unit/backend/services/CalendarDefinitionTest.php delete mode 100644 tests/unit/backend/services/ContentTest.php delete mode 100644 tests/unit/backend/services/ProcessTest.php delete mode 100644 tests/unit/backend/services/Rest/CRUD.java delete mode 100644 tests/unit/backend/services/Rest/CURLMessage.php delete mode 100644 tests/unit/backend/services/Rest/FormatedMessage.php delete mode 100644 tests/unit/backend/services/Rest/JsonMessage.php delete mode 100644 tests/unit/backend/services/Rest/RestMessage.php delete mode 100644 tests/unit/backend/services/Rest/SimpleMessage.php delete mode 100644 tests/unit/backend/services/Rest/XmlMessage.php delete mode 100644 tests/unit/backend/services/Rest/fixtures/application.xml delete mode 100644 tests/unit/backend/services/Rest/testing.php delete mode 100644 tests/unit/backend/services/SessionTest.php delete mode 100644 tests/unit/backend/services/StepTest.php delete mode 100644 tests/unit/backend/services/TranslationTest.php delete mode 100644 tests/unit/backend/services/UsersPropertiesTest.php delete mode 100644 tests/unit/backend/services/UsersTest.php delete mode 100644 tests/unit/backend/workflow/engine/classes/AppSolrTest.php delete mode 100644 tests/unit/backend/workflow/engine/classes/triggers/pmAlfrescoFunctionsTest.php delete mode 100644 tests/unit/frontend/README.txt delete mode 100644 workflow/engine/src/Tests/BusinessModel/CalendarTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/CasesActionTest13_17.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/CasesTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/CasesTest7_12.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/DepartmentTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/InputDocumentsCasesTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/OutputDocumentsCasesTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/Role/PermissionTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/Role/UserTest.php delete mode 100644 workflow/engine/src/Tests/BusinessModel/RoleTest.php delete mode 100644 workflow/engine/src/Tests/Model/BpmnActivityTest.php delete mode 100644 workflow/engine/src/Tests/Model/BpmnEventTest.php delete mode 100644 workflow/engine/src/Tests/Model/BpmnGatewayTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Exporter/XmlExporterTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Importer/XmlImporterTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Project/Adapter/WorkflowBpmnTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Project/BpmnTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Project/WorkflowTest.php delete mode 100644 workflow/engine/src/Tests/ProcessMaker/Util/CommonTest.php delete mode 100644 workflow/engine/src/Tests/bootstrap.php delete mode 100644 workflow/engine/src/Tests/config.ini.dist delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/first/sample-1.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/first/sample-2.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/first/sample-3.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/second/sample-1.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/second/sample-2.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/second/sample-3.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/second/sample-5.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/third/sample-1.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/third/sample-2.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/third/sample-3.1.9.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/third/sample-3.1.txt delete mode 100644 workflow/engine/src/Tests/fixtures/files_struct/third/sample-3.txt delete mode 100644 workflow/engine/src/Tests/pm-bootstrap.php delete mode 100644 workflow/engine/test/bootstrap/functional.php delete mode 100644 workflow/engine/test/bootstrap/gulliverConstants.php delete mode 100644 workflow/engine/test/bootstrap/unit.php delete mode 100644 workflow/engine/test/fixtures/appDelegation.yml delete mode 100644 workflow/engine/test/fixtures/appDocument.yml delete mode 100644 workflow/engine/test/fixtures/application.yml delete mode 100644 workflow/engine/test/fixtures/applicationInput.yml delete mode 100644 workflow/engine/test/fixtures/configuration.yml delete mode 100644 workflow/engine/test/fixtures/content.yml delete mode 100644 workflow/engine/test/fixtures/departments.txt delete mode 100644 workflow/engine/test/fixtures/derivation.yml delete mode 100644 workflow/engine/test/fixtures/domain.yml delete mode 100644 workflow/engine/test/fixtures/es.yml delete mode 100644 workflow/engine/test/fixtures/firstname.txt delete mode 100644 workflow/engine/test/fixtures/fixtures.yml delete mode 100644 workflow/engine/test/fixtures/groupUser.yml delete mode 100644 workflow/engine/test/fixtures/groups.txt delete mode 100644 workflow/engine/test/fixtures/inputDocument.yml delete mode 100644 workflow/engine/test/fixtures/lastname.txt delete mode 100644 workflow/engine/test/fixtures/outputDocument.yml delete mode 100644 workflow/engine/test/fixtures/processMap.yml delete mode 100644 workflow/engine/test/fixtures/route.yml delete mode 100644 workflow/engine/test/fixtures/step.yml delete mode 100644 workflow/engine/test/fixtures/stepTrigger.yml delete mode 100644 workflow/engine/test/fixtures/swimlanesElements.yml delete mode 100644 workflow/engine/test/fixtures/task.yml delete mode 100644 workflow/engine/test/fixtures/taskUser.yml delete mode 100644 workflow/engine/test/fixtures/trigger.yml delete mode 100644 workflow/engine/test/fixtures/user.yml delete mode 100644 workflow/engine/test/unit/gulliver/classDBConnectionTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDBRecordsetTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDBSessionTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDBTableTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDatabase_baseTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDatabase_mysqlTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classDynaformhandlerTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classErrorTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classFilterFormTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classFormTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classGTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classHeadPublisherTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classMailerTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classMenuTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classObjectTemplateTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classPagedTableTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classPublisherTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classRbacTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classTableTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classTemplatePowerTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classTreeTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classWebResourceTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classXmlDocumentTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classXmlMenuTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classXmlformExtensionTest.php delete mode 100644 workflow/engine/test/unit/gulliver/classXmlformTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classArchiveTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classArrayBasePeerTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classBasePeerTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classCasesTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classDashboardsTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classDatesTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classDbConnectionsTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classDynaFormFieldTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classESMTPTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classInsertTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classInstallerTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classJavaBridgePMTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classLanguagesTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classMenuDetailTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classNetTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classPackageTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classPluginDetailTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classPmScriptTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classPopupMenuTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classProcessMakerWebDavTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classProcessesTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classPropelTableTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classReportTablesTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classReportTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classSessionsTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classSmtpTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classSpoolRunTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classToolBarTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classTranslationTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classWsBaseTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classWsResponseTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classXmlDbTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classXmlForm_Field_ImageTest.php delete mode 100644 workflow/engine/test/unit/processmaker/classXmlForm_Field_TextPMTest.php delete mode 100644 workflow/engine/test/unit/ws/EvaluationDerivationTest.php delete mode 100644 workflow/engine/test/unit/ws/OtherMethodsTest.php delete mode 100644 workflow/engine/test/unit/ws/ParallelDerivation2Test.php delete mode 100644 workflow/engine/test/unit/ws/ParallelDerivationTest.php delete mode 100644 workflow/engine/test/unit/ws/ProcessWithSubprocess.php delete mode 100644 workflow/engine/test/unit/ws/SelectionDerivationTest.php delete mode 100644 workflow/engine/test/unit/ws/SequentialDerivationTest.php delete mode 100644 workflow/engine/test/unit/ws/SubprocessTest.php delete mode 100644 workflow/engine/test/unit/ws/basicMethodsTest.php delete mode 100644 workflow/engine/test/unit/ws/bugRelease09Test.php delete mode 100644 workflow/engine/test/unit/ws/reportsToTest.php delete mode 100644 workflow/engine/test/unit/ws/wsClient.php delete mode 100644 workflow/engine/test/unit/ws/wsConfig.php.example diff --git a/tests/automated/gulliver/system/classControllerTest.php b/tests/automated/gulliver/system/classControllerTest.php deleted file mode 100644 index e5f0813b3..000000000 --- a/tests/automated/gulliver/system/classControllerTest.php +++ /dev/null @@ -1,346 +0,0 @@ -object = new Controller(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Controller'); $this->assertTrue( count($methods) == 19); - } - - /** - * @covers Controller::__set - * @todo Implement test__set(). - */ - public function test__set() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__set', $methods ), 'exists method __set' ); - $r = new ReflectionMethod('Controller', '__set'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Controller::__get - * @todo Implement test__get(). - */ - public function test__get() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__get', $methods ), 'exists method __get' ); - $r = new ReflectionMethod('Controller', '__get'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::__isset - * @todo Implement test__isset(). - */ - public function test__isset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__isset', $methods ), 'exists method __isset' ); - $r = new ReflectionMethod('Controller', '__isset'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::__unset - * @todo Implement test__unset(). - */ - public function test__unset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__unset', $methods ), 'exists method __unset' ); - $r = new ReflectionMethod('Controller', '__unset'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::setResponseType - * @todo Implement testsetResponseType(). - */ - public function testsetResponseType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setResponseType', $methods ), 'exists method setResponseType' ); - $r = new ReflectionMethod('Controller', 'setResponseType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::call - * @todo Implement testcall(). - */ - public function testcall() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('call', $methods ), 'exists method call' ); - $r = new ReflectionMethod('Controller', 'call'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::setHttpRequestData - * @todo Implement testsetHttpRequestData(). - */ - public function testsetHttpRequestData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setHttpRequestData', $methods ), 'exists method setHttpRequestData' ); - $r = new ReflectionMethod('Controller', 'setHttpRequestData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::setDebug - * @todo Implement testsetDebug(). - */ - public function testsetDebug() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDebug', $methods ), 'exists method setDebug' ); - $r = new ReflectionMethod('Controller', 'setDebug'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'val'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::getDebug - * @todo Implement testgetDebug(). - */ - public function testgetDebug() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDebug', $methods ), 'exists method getDebug' ); - $r = new ReflectionMethod('Controller', 'getDebug'); - $params = $r->getParameters(); - } - - /** - * @covers Controller::includeExtJSLib - * @todo Implement testincludeExtJSLib(). - */ - public function testincludeExtJSLib() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('includeExtJSLib', $methods ), 'exists method includeExtJSLib' ); - $r = new ReflectionMethod('Controller', 'includeExtJSLib'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'srcFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'debug'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Controller::includeExtJS - * @todo Implement testincludeExtJS(). - */ - public function testincludeExtJS() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('includeExtJS', $methods ), 'exists method includeExtJS' ); - $r = new ReflectionMethod('Controller', 'includeExtJS'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'srcFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'debug'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Controller::setView - * @todo Implement testsetView(). - */ - public function testsetView() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setView', $methods ), 'exists method setView' ); - $r = new ReflectionMethod('Controller', 'setView'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::setJSVar - * @todo Implement testsetJSVar(). - */ - public function testsetJSVar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setJSVar', $methods ), 'exists method setJSVar' ); - $r = new ReflectionMethod('Controller', 'setJSVar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Controller::setVar - * @todo Implement testsetVar(). - */ - public function testsetVar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setVar', $methods ), 'exists method setVar' ); - $r = new ReflectionMethod('Controller', 'setVar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Controller::getHeadPublisher - * @todo Implement testgetHeadPublisher(). - */ - public function testgetHeadPublisher() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHeadPublisher', $methods ), 'exists method getHeadPublisher' ); - $r = new ReflectionMethod('Controller', 'getHeadPublisher'); - $params = $r->getParameters(); - } - - /** - * @covers Controller::setLayout - * @todo Implement testsetLayout(). - */ - public function testsetLayout() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setLayout', $methods ), 'exists method setLayout' ); - $r = new ReflectionMethod('Controller', 'setLayout'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'layout'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('Controller', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'mvc'); - } - - /** - * @covers Controller::header - * @todo Implement testheader(). - */ - public function testheader() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('header', $methods ), 'exists method header' ); - $r = new ReflectionMethod('Controller', 'header'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'header'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Controller::redirect - * @todo Implement testredirect(). - */ - public function testredirect() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('redirect', $methods ), 'exists method redirect' ); - $r = new ReflectionMethod('Controller', 'redirect'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classDBTableTest.php b/tests/automated/gulliver/system/classDBTableTest.php deleted file mode 100644 index 41001a3c3..000000000 --- a/tests/automated/gulliver/system/classDBTableTest.php +++ /dev/null @@ -1,210 +0,0 @@ -object = new DBTable(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('DBTable'); $this->assertTrue( count($methods) == 11); - } - - /** - * @covers DBTable::dBTable - * @todo Implement testdBTable(). - */ - public function testdBTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dBTable', $methods ), 'exists method dBTable' ); - $r = new ReflectionMethod('DBTable', 'dBTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'objConnection'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'strTable'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'arrKeys'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' )); - } - - /** - * @covers DBTable::setTo - * @todo Implement testsetTo(). - */ - public function testsetTo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setTo', $methods ), 'exists method setTo' ); - $r = new ReflectionMethod('DBTable', 'setTo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'objDBConnection'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strTable'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'arrKeys'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' )); - } - - /** - * @covers DBTable::loadEmpty - * @todo Implement testloadEmpty(). - */ - public function testloadEmpty() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadEmpty', $methods ), 'exists method loadEmpty' ); - $r = new ReflectionMethod('DBTable', 'loadEmpty'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::loadWhere - * @todo Implement testloadWhere(). - */ - public function testloadWhere() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadWhere', $methods ), 'exists method loadWhere' ); - $r = new ReflectionMethod('DBTable', 'loadWhere'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strWhere'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DBTable::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('DBTable', 'load'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::nextvalPGSql - * @todo Implement testnextvalPGSql(). - */ - public function testnextvalPGSql() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('nextvalPGSql', $methods ), 'exists method nextvalPGSql' ); - $r = new ReflectionMethod('DBTable', 'nextvalPGSql'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'seq'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DBTable::insert - * @todo Implement testinsert(). - */ - public function testinsert() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('insert', $methods ), 'exists method insert' ); - $r = new ReflectionMethod('DBTable', 'insert'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::update - * @todo Implement testupdate(). - */ - public function testupdate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('update', $methods ), 'exists method update' ); - $r = new ReflectionMethod('DBTable', 'update'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::save - * @todo Implement testsave(). - */ - public function testsave() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('save', $methods ), 'exists method save' ); - $r = new ReflectionMethod('DBTable', 'save'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::delete - * @todo Implement testdelete(). - */ - public function testdelete() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('delete', $methods ), 'exists method delete' ); - $r = new ReflectionMethod('DBTable', 'delete'); - $params = $r->getParameters(); - } - - /** - * @covers DBTable::next - * @todo Implement testnext(). - */ - public function testnext() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('next', $methods ), 'exists method next' ); - $r = new ReflectionMethod('DBTable', 'next'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classDataBaseMaintenanceTest.php b/tests/automated/gulliver/system/classDataBaseMaintenanceTest.php deleted file mode 100644 index c3d427f3b..000000000 --- a/tests/automated/gulliver/system/classDataBaseMaintenanceTest.php +++ /dev/null @@ -1,449 +0,0 @@ -object = new DataBaseMaintenance(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('DataBaseMaintenance'); $this->assertTrue( count($methods) == 27); - } - - /** - * @covers DataBaseMaintenance::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('DataBaseMaintenance', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'host'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'user'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'passwd'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers DataBaseMaintenance::setUser - * @todo Implement testsetUser(). - */ - public function testsetUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setUser', $methods ), 'exists method setUser' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'setUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'user'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::setPasswd - * @todo Implement testsetPasswd(). - */ - public function testsetPasswd() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setPasswd', $methods ), 'exists method setPasswd' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'setPasswd'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'passwd'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::setHost - * @todo Implement testsetHost(). - */ - public function testsetHost() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setHost', $methods ), 'exists method setHost' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'setHost'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'host'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::setTempDir - * @todo Implement testsetTempDir(). - */ - public function testsetTempDir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setTempDir', $methods ), 'exists method setTempDir' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'setTempDir'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tmpDir'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::getTempDir - * @todo Implement testgetTempDir(). - */ - public function testgetTempDir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTempDir', $methods ), 'exists method getTempDir' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'getTempDir'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::status - * @todo Implement teststatus(). - */ - public function teststatus() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('status', $methods ), 'exists method status' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'status'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::connect - * @todo Implement testconnect(). - */ - public function testconnect() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('connect', $methods ), 'exists method connect' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'connect'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers DataBaseMaintenance::setDbName - * @todo Implement testsetDbName(). - */ - public function testsetDbName() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDbName', $methods ), 'exists method setDbName' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'setDbName'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::selectDataBase - * @todo Implement testselectDataBase(). - */ - public function testselectDataBase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('selectDataBase', $methods ), 'exists method selectDataBase' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'selectDataBase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::query - * @todo Implement testquery(). - */ - public function testquery() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('query', $methods ), 'exists method query' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'query'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sql'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::error - * @todo Implement testerror(). - */ - public function testerror() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('error', $methods ), 'exists method error' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'error'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::getTablesList - * @todo Implement testgetTablesList(). - */ - public function testgetTablesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTablesList', $methods ), 'exists method getTablesList' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'getTablesList'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::dumpData - * @todo Implement testdumpData(). - */ - public function testdumpData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dumpData', $methods ), 'exists method dumpData' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'dumpData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'table'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::restoreData - * @todo Implement testrestoreData(). - */ - public function testrestoreData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restoreData', $methods ), 'exists method restoreData' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'restoreData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'backupFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::backupData - * @todo Implement testbackupData(). - */ - public function testbackupData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('backupData', $methods ), 'exists method backupData' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'backupData'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::backupSqlData - * @todo Implement testbackupSqlData(). - */ - public function testbackupSqlData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('backupSqlData', $methods ), 'exists method backupSqlData' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'backupSqlData'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::restoreAllData - * @todo Implement testrestoreAllData(). - */ - public function testrestoreAllData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restoreAllData', $methods ), 'exists method restoreAllData' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'restoreAllData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers DataBaseMaintenance::createDb - * @todo Implement testcreateDb(). - */ - public function testcreateDb() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createDb', $methods ), 'exists method createDb' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'createDb'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'drop'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers DataBaseMaintenance::restoreFromSql2 - * @todo Implement testrestoreFromSql2(). - */ - public function testrestoreFromSql2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restoreFromSql2', $methods ), 'exists method restoreFromSql2' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'restoreFromSql2'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sqlfile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::lockTables - * @todo Implement testlockTables(). - */ - public function testlockTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('lockTables', $methods ), 'exists method lockTables' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'lockTables'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::unlockTables - * @todo Implement testunlockTables(). - */ - public function testunlockTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unlockTables', $methods ), 'exists method unlockTables' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'unlockTables'); - $params = $r->getParameters(); - } - - /** - * @covers DataBaseMaintenance::dumpSqlInserts - * @todo Implement testdumpSqlInserts(). - */ - public function testdumpSqlInserts() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dumpSqlInserts', $methods ), 'exists method dumpSqlInserts' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'dumpSqlInserts'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'table'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::backupDataBase - * @todo Implement testbackupDataBase(). - */ - public function testbackupDataBase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('backupDataBase', $methods ), 'exists method backupDataBase' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'backupDataBase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'outfile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::restoreFromSql - * @todo Implement testrestoreFromSql(). - */ - public function testrestoreFromSql() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restoreFromSql', $methods ), 'exists method restoreFromSql' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'restoreFromSql'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sqlfile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'file'); - } - - /** - * @covers DataBaseMaintenance::getSchemaFromTable - * @todo Implement testgetSchemaFromTable(). - */ - public function testgetSchemaFromTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSchemaFromTable', $methods ), 'exists method getSchemaFromTable' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'getSchemaFromTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tablename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers DataBaseMaintenance::removeCommentsIntoString - * @todo Implement testremoveCommentsIntoString(). - */ - public function testremoveCommentsIntoString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeCommentsIntoString', $methods ), 'exists method removeCommentsIntoString' ); - $r = new ReflectionMethod('DataBaseMaintenance', 'removeCommentsIntoString'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classFormTest.php b/tests/automated/gulliver/system/classFormTest.php deleted file mode 100644 index 5612fac67..000000000 --- a/tests/automated/gulliver/system/classFormTest.php +++ /dev/null @@ -1,242 +0,0 @@ -object = new Form($file, $home); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Form'); $this->assertTrue( count($methods) == 13); - } - - /** - * @covers Form::setDefaultValues - * @todo Implement testsetDefaultValues(). - */ - public function testsetDefaultValues() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDefaultValues', $methods ), 'exists method setDefaultValues' ); - $r = new ReflectionMethod('Form', 'setDefaultValues'); - $params = $r->getParameters(); - } - - /** - * @covers Form::Form - * @todo Implement testForm(). - */ - public function testForm() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Form', $methods ), 'exists method Form' ); - $r = new ReflectionMethod('Form', 'Form'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'home'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'language'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'forceParse'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'visual_frontend'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Form::printTemplate - * @todo Implement testprintTemplate(). - */ - public function testprintTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printTemplate', $methods ), 'exists method printTemplate' ); - $r = new ReflectionMethod('Form', 'printTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'scriptContent'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Form::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('Form', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'scriptContent'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Form::setValues - * @todo Implement testsetValues(). - */ - public function testsetValues() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setValues', $methods ), 'exists method setValues' ); - $r = new ReflectionMethod('Form', 'setValues'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newValues'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - } - - /** - * @covers Form::getFields - * @todo Implement testgetFields(). - */ - public function testgetFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' ); - $r = new ReflectionMethod('Form', 'getFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'therow'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '-1'); - } - - /** - * @covers Form::validatePost - * @todo Implement testvalidatePost(). - */ - public function testvalidatePost() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validatePost', $methods ), 'exists method validatePost' ); - $r = new ReflectionMethod('Form', 'validatePost'); - $params = $r->getParameters(); - } - - /** - * @covers Form::validateArray - * @todo Implement testvalidateArray(). - */ - public function testvalidateArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateArray', $methods ), 'exists method validateArray' ); - $r = new ReflectionMethod('Form', 'validateArray'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newValues'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Form::getVars - * @todo Implement testgetVars(). - */ - public function testgetVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVars', $methods ), 'exists method getVars' ); - $r = new ReflectionMethod('Form', 'getVars'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'bWhitSystemVars'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers Form::validateRequiredFields - * @todo Implement testvalidateRequiredFields(). - */ - public function testvalidateRequiredFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateRequiredFields', $methods ), 'exists method validateRequiredFields' ); - $r = new ReflectionMethod('Form', 'validateRequiredFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dataFields'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'noRequired'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers Form::validateFields - * @todo Implement testvalidateFields(). - */ - public function testvalidateFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateFields', $methods ), 'exists method validateFields' ); - $r = new ReflectionMethod('Form', 'validateFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classGTest.php b/tests/automated/gulliver/system/classGTest.php deleted file mode 100644 index 36f89a10b..000000000 --- a/tests/automated/gulliver/system/classGTest.php +++ /dev/null @@ -1,2447 +0,0 @@ -object = new G(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('G'); - $this->assertTrue( count($methods) == 133, "now there are " . count($methods) . " methods."); - } - - /** - * @covers G::is_https - * @todo Implement testis_https(). - */ - public function testis_https() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('is_https', $methods ), 'exists method is_https' ); - $r = new ReflectionMethod('G', 'is_https'); - $params = $r->getParameters(); - } - - /** - * @covers G::array_fill_value - * @todo Implement testarray_fill_value(). - */ - public function testarray_fill_value() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('array_fill_value', $methods ), 'exists method array_fill_value' ); - $r = new ReflectionMethod('G', 'array_fill_value'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arr'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'recursive'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::generate_password - * @todo Implement testgenerate_password(). - */ - public function testgenerate_password() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generate_password', $methods ), 'exists method generate_password' ); - $r = new ReflectionMethod('G', 'generate_password'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'length'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '8'); - } - - /** - * @covers G::array_concat - * @todo Implement testarray_concat(). - */ - public function testarray_concat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('array_concat', $methods ), 'exists method array_concat' ); - $r = new ReflectionMethod('G', 'array_concat'); - $params = $r->getParameters(); - } - - /** - * @covers G::var_compare - * @todo Implement testvar_compare(). - */ - public function testvar_compare() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('var_compare', $methods ), 'exists method var_compare' ); - $r = new ReflectionMethod('G', 'var_compare'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - } - - /** - * @covers G::var_probe - * @todo Implement testvar_probe(). - */ - public function testvar_probe() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('var_probe', $methods ), 'exists method var_probe' ); - $r = new ReflectionMethod('G', 'var_probe'); - $params = $r->getParameters(); - } - - /** - * @covers G::getVersion - * @todo Implement testgetVersion(). - */ - public function testgetVersion() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVersion', $methods ), 'exists method getVersion' ); - $r = new ReflectionMethod('G', 'getVersion'); - $params = $r->getParameters(); - } - - /** - * @covers G::getIpAddress - * @todo Implement testgetIpAddress(). - */ - public function testgetIpAddress() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getIpAddress', $methods ), 'exists method getIpAddress' ); - $r = new ReflectionMethod('G', 'getIpAddress'); - $params = $r->getParameters(); - } - - /** - * @covers G::getMacAddress - * @todo Implement testgetMacAddress(). - */ - public function testgetMacAddress() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getMacAddress', $methods ), 'exists method getMacAddress' ); - $r = new ReflectionMethod('G', 'getMacAddress'); - $params = $r->getParameters(); - } - - /** - * @covers G::microtime_float - * @todo Implement testmicrotime_float(). - */ - public function testmicrotime_float() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('microtime_float', $methods ), 'exists method microtime_float' ); - $r = new ReflectionMethod('G', 'microtime_float'); - $params = $r->getParameters(); - } - - /** - * @covers G::setFatalErrorHandler - * @todo Implement testsetFatalErrorHandler(). - */ - /*public function testsetFatalErrorHandler() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setFatalErrorHandler', $methods ), 'exists method setFatalErrorHandler' ); - $r = new ReflectionMethod('G', 'setFatalErrorHandler'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newFatalErrorHandler'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - }*/ - - /** - * @covers G::setErrorHandler - * @todo Implement testsetErrorHandler(). - */ - /*public function testsetErrorHandler() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setErrorHandler', $methods ), 'exists method setErrorHandler' ); - $r = new ReflectionMethod('G', 'setErrorHandler'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newCustomErrorHandler'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - }*/ - - /** - * @covers G::fatalErrorHandler - * @todo Implement testfatalErrorHandler(). - */ - /*public function testfatalErrorHandler() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fatalErrorHandler', $methods ), 'exists method fatalErrorHandler' ); - $r = new ReflectionMethod('G', 'fatalErrorHandler'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'buffer'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - }*/ - - /** - * @covers G::customErrorHandler - * @todo Implement testcustomErrorHandler(). - */ - /*public function testcustomErrorHandler() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('customErrorHandler', $methods ), 'exists method customErrorHandler' ); - $r = new ReflectionMethod('G', 'customErrorHandler'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'errno'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'msg'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'file'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'line'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'context'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - }*/ - - /** - * @covers G::showErrorSource - * @todo Implement testshowErrorSource(). - */ - /*public function testshowErrorSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('showErrorSource', $methods ), 'exists method showErrorSource' ); - $r = new ReflectionMethod('G', 'showErrorSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'msg'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'file'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'line'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - }*/ - - /** - * @covers G::customErrorLog - * @todo Implement testcustomErrorLog(). - */ - /*public function testcustomErrorLog() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('customErrorLog', $methods ), 'exists method customErrorLog' ); - $r = new ReflectionMethod('G', 'customErrorLog'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'msg'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'file'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'line'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - }*/ - - /** - * @covers G::verboseError - * @todo Implement testverboseError(). - */ - /*public function testverboseError() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verboseError', $methods ), 'exists method verboseError' ); - $r = new ReflectionMethod('G', 'verboseError'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'errno'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'msg'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'file'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'line'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'context'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - }*/ - - /** - * @covers G::encrypt - * @todo Implement testencrypt(). - */ - public function testencrypt() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('encrypt', $methods ), 'exists method encrypt' ); - $r = new ReflectionMethod('G', 'encrypt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'key'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::decrypt - * @todo Implement testdecrypt(). - */ - public function testdecrypt() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('decrypt', $methods ), 'exists method decrypt' ); - $r = new ReflectionMethod('G', 'decrypt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'key'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::lookup - * @todo Implement testlookup(). - */ - public function testlookup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('lookup', $methods ), 'exists method lookup' ); - $r = new ReflectionMethod('G', 'lookup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'target'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::mk_dir - * @todo Implement testmk_dir(). - */ - public function testmk_dir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('mk_dir', $methods ), 'exists method mk_dir' ); - $r = new ReflectionMethod('G', 'mk_dir'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strPath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'rights'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '511'); - } - - /** - * @covers G::rm_dir - * @todo Implement testrm_dir(). - */ - public function testrm_dir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('rm_dir', $methods ), 'exists method rm_dir' ); - $r = new ReflectionMethod('G', 'rm_dir'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dirName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::verifyPath - * @todo Implement testverifyPath(). - */ - public function testverifyPath() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyPath', $methods ), 'exists method verifyPath' ); - $r = new ReflectionMethod('G', 'verifyPath'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strPath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'createPath'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers G::expandPath - * @todo Implement testexpandPath(). - */ - public function testexpandPath() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('expandPath', $methods ), 'exists method expandPath' ); - $r = new ReflectionMethod('G', 'expandPath'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strPath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers G::LoadSystem - * @todo Implement testLoadSystem(). - */ - public function testLoadSystem() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadSystem', $methods ), 'exists method LoadSystem' ); - $r = new ReflectionMethod('G', 'LoadSystem'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strClass'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadSystemExist - * @todo Implement testLoadSystemExist(). - */ - public function testLoadSystemExist() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadSystemExist', $methods ), 'exists method LoadSystemExist' ); - $r = new ReflectionMethod('G', 'LoadSystemExist'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strClass'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::RenderPage - * @todo Implement testRenderPage(). - */ - public function testRenderPage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderPage', $methods ), 'exists method RenderPage' ); - $r = new ReflectionMethod('G', 'RenderPage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strTemplate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'default'); - $this->assertTrue( $params[1]->getName() == 'strSkin'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'classic'); - $this->assertTrue( $params[2]->getName() == 'objContent'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'layout'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers G::LoadSkin - * @todo Implement testLoadSkin(). - */ - public function testLoadSkin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadSkin', $methods ), 'exists method LoadSkin' ); - $r = new ReflectionMethod('G', 'LoadSkin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strSkinName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadInclude - * @todo Implement testLoadInclude(). - */ - public function testLoadInclude() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadInclude', $methods ), 'exists method LoadInclude' ); - $r = new ReflectionMethod('G', 'LoadInclude'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strInclude'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadAllModelClasses - * @todo Implement testLoadAllModelClasses(). - */ - public function testLoadAllModelClasses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadAllModelClasses', $methods ), 'exists method LoadAllModelClasses' ); - $r = new ReflectionMethod('G', 'LoadAllModelClasses'); - $params = $r->getParameters(); - } - - /** - * @covers G::LoadAllPluginModelClasses - * @todo Implement testLoadAllPluginModelClasses(). - */ - public function testLoadAllPluginModelClasses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadAllPluginModelClasses', $methods ), 'exists method LoadAllPluginModelClasses' ); - $r = new ReflectionMethod('G', 'LoadAllPluginModelClasses'); - $params = $r->getParameters(); - } - - /** - * @covers G::LoadTemplate - * @todo Implement testLoadTemplate(). - */ - public function testLoadTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadTemplate', $methods ), 'exists method LoadTemplate' ); - $r = new ReflectionMethod('G', 'LoadTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strTemplateName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadClassRBAC - * @todo Implement testLoadClassRBAC(). - */ - public function testLoadClassRBAC() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadClassRBAC', $methods ), 'exists method LoadClassRBAC' ); - $r = new ReflectionMethod('G', 'LoadClassRBAC'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strClass'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadClass - * @todo Implement testLoadClass(). - */ - public function testLoadClass() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadClass', $methods ), 'exists method LoadClass' ); - $r = new ReflectionMethod('G', 'LoadClass'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strClass'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::LoadThirdParty - * @todo Implement testLoadThirdParty(). - */ - public function testLoadThirdParty() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadThirdParty', $methods ), 'exists method LoadThirdParty' ); - $r = new ReflectionMethod('G', 'LoadThirdParty'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sPath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::encryptlink - * @todo Implement testencryptlink(). - */ - public function testencryptlink() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('encryptlink', $methods ), 'exists method encryptlink' ); - $r = new ReflectionMethod('G', 'encryptlink'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::parseURI - * todo Implement testparseURI(). - */ - public function testparseURI() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseURI', $methods ), 'exists method parseURI' ); - $r = new ReflectionMethod('G', 'parseURI'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'uri'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'isRestRequest'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - public function parseNormalUri() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseNormalUri', $methods ), 'exists method parseNormalUri' ); - $r = new ReflectionMethod('G', 'parseNormalUri'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRequestUri'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - public function parseRestUri() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseRestUri', $methods ), 'exists method parseRestUri' ); - $r = new ReflectionMethod('G', 'parseRestUri'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRequestUri'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - public function dispatchRestService() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dispatchRestService', $methods ), 'exists method parseRestUri' ); - $r = new ReflectionMethod('G', 'dispatchRestService'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'uri'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::strip_slashes - * @todo Implement teststrip_slashes(). - */ - public function teststrip_slashes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('strip_slashes', $methods ), 'exists method strip_slashes' ); - $r = new ReflectionMethod('G', 'strip_slashes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'vVar'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::logTimeByPage - * @todo Implement testlogTimeByPage(). - */ - public function testlogTimeByPage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('logTimeByPage', $methods ), 'exists method logTimeByPage' ); - $r = new ReflectionMethod('G', 'logTimeByPage'); - $params = $r->getParameters(); - } - - /** - * @covers G::streamCSSBigFile - * @todo Implement teststreamCSSBigFile(). - */ - public function teststreamCSSBigFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('streamCSSBigFile', $methods ), 'exists method streamCSSBigFile' ); - $r = new ReflectionMethod('G', 'streamCSSBigFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::streamJSTranslationFile - * @todo Implement teststreamJSTranslationFile(). - */ - public function teststreamJSTranslationFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('streamJSTranslationFile', $methods ), 'exists method streamJSTranslationFile' ); - $r = new ReflectionMethod('G', 'streamJSTranslationFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'locale'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'en'); - } - - /** - * @covers G::streamFile - * @todo Implement teststreamFile(). - */ - public function teststreamFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('streamFile', $methods ), 'exists method streamFile' ); - $r = new ReflectionMethod('G', 'streamFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'download'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'downloadFileName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::trimSourceCodeFile - * @todo Implement testtrimSourceCodeFile(). - */ - /*public function testtrimSourceCodeFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('trimSourceCodeFile', $methods ), 'exists method trimSourceCodeFile' ); - $r = new ReflectionMethod('G', 'trimSourceCodeFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - }*/ - - /** - * @covers G::sendHeaders - * @todo Implement testsendHeaders(). - */ - public function testsendHeaders() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendHeaders', $methods ), 'exists method sendHeaders' ); - $r = new ReflectionMethod('G', 'sendHeaders'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'contentType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'download'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'downloadFileName'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers G::virtualURI - * @todo Implement testvirtualURI(). - */ - public function testvirtualURI() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('virtualURI', $methods ), 'exists method virtualURI' ); - $r = new ReflectionMethod('G', 'virtualURI'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'convertionTable'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'realPath'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers G::createUID - * @todo Implement testcreateUID(). - */ - public function testcreateUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createUID', $methods ), 'exists method createUID' ); - $r = new ReflectionMethod('G', 'createUID'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'scope'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'id'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::getUIDName - * @todo Implement testgetUIDName(). - */ - public function testgetUIDName() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUIDName', $methods ), 'exists method getUIDName' ); - $r = new ReflectionMethod('G', 'getUIDName'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'uid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'scope'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers G::formatNumber - * @todo Implement testformatNumber(). - */ - public function testformatNumber() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('formatNumber', $methods ), 'exists method formatNumber' ); - $r = new ReflectionMethod('G', 'formatNumber'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'num'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'latin'); - } - - /** - * @covers G::formatDate - * @todo Implement testformatDate(). - */ - public function testformatDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('formatDate', $methods ), 'exists method formatDate' ); - $r = new ReflectionMethod('G', 'formatDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'datetime'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'format'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'Y-m-d'); - $this->assertTrue( $params[2]->getName() == 'lang'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::getformatedDate - * @todo Implement testgetformatedDate(). - */ - public function testgetformatedDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getformatedDate', $methods ), 'exists method getformatedDate' ); - $r = new ReflectionMethod('G', 'getformatedDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'format'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'yyyy-mm-dd'); - $this->assertTrue( $params[2]->getName() == 'lang'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::arrayDiff - * @todo Implement testarrayDiff(). - */ - public function testarrayDiff() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('arrayDiff', $methods ), 'exists method arrayDiff' ); - $r = new ReflectionMethod('G', 'arrayDiff'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'array1'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'array2'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::complete_field - * @todo Implement testcomplete_field(). - */ - public function testcomplete_field() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('complete_field', $methods ), 'exists method complete_field' ); - $r = new ReflectionMethod('G', 'complete_field'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'campo'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'long'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'tipo'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers G::sqlEscape - * @todo Implement testsqlEscape(). - */ - public function testsqlEscape() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sqlEscape', $methods ), 'exists method sqlEscape' ); - $r = new ReflectionMethod('G', 'sqlEscape'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sqlString'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'DBEngine'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == DB_ADAPTER); - } - - /** - * @covers G::MySQLSintaxis - * @todo Implement testMySQLSintaxis(). - */ - public function testMySQLSintaxis() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('MySQLSintaxis', $methods ), 'exists method MySQLSintaxis' ); - $r = new ReflectionMethod('G', 'MySQLSintaxis'); - $params = $r->getParameters(); - } - - /** - * @covers G::replaceDataField - * @todo Implement testreplaceDataField(). - */ - public function testreplaceDataField() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('replaceDataField', $methods ), 'exists method replaceDataField' ); - $r = new ReflectionMethod('G', 'replaceDataField'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sqlString'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'result'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'DBEngine'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'mysql'); - } - - /** - * @covers G::loadLanguageFile - * @todo Implement testloadLanguageFile(). - */ - public function testloadLanguageFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadLanguageFile', $methods ), 'exists method loadLanguageFile' ); - $r = new ReflectionMethod('G', 'loadLanguageFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'languageId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'forceParse'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::registerLabel - * @todo Implement testregisterLabel(). - */ - public function testregisterLabel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerLabel', $methods ), 'exists method registerLabel' ); - $r = new ReflectionMethod('G', 'registerLabel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'id'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'label'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::LoadMenuXml - * @todo Implement testLoadMenuXml(). - */ - public function testLoadMenuXml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadMenuXml', $methods ), 'exists method LoadMenuXml' ); - $r = new ReflectionMethod('G', 'LoadMenuXml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::SendMessageXml - * @todo Implement testSendMessageXml(). - */ - public function testSendMessageXml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SendMessageXml', $methods ), 'exists method SendMessageXml' ); - $r = new ReflectionMethod('G', 'SendMessageXml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'file'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'labels'); - } - - /** - * @covers G::SendTemporalMessage - * @todo Implement testSendTemporalMessage(). - */ - public function testSendTemporalMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SendTemporalMessage', $methods ), 'exists method SendTemporalMessage' ); - $r = new ReflectionMethod('G', 'SendTemporalMessage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'LABEL'); - $this->assertTrue( $params[3]->getName() == 'time'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'width'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'customLabels'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers G::SendMessage - * @todo Implement testSendMessage(). - */ - public function testSendMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SendMessage', $methods ), 'exists method SendMessage' ); - $r = new ReflectionMethod('G', 'SendMessage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'file'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'labels'); - } - - /** - * @covers G::SendMessageText - * @todo Implement testSendMessageText(). - */ - public function testSendMessageText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SendMessageText', $methods ), 'exists method SendMessageText' ); - $r = new ReflectionMethod('G', 'SendMessageText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'text'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::LoadMessage - * @todo Implement testLoadMessage(). - */ - public function testLoadMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadMessage', $methods ), 'exists method LoadMessage' ); - $r = new ReflectionMethod('G', 'LoadMessage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'file'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'messages'); - } - - /** - * @covers G::LoadXmlLabel - * @todo Implement testLoadXmlLabel(). - */ - public function testLoadXmlLabel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadXmlLabel', $methods ), 'exists method LoadXmlLabel' ); - $r = new ReflectionMethod('G', 'LoadXmlLabel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'file'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'labels'); - } - - /** - * @covers G::LoadMessageXml - * @todo Implement testLoadMessageXml(). - */ - public function testLoadMessageXml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadMessageXml', $methods ), 'exists method LoadMessageXml' ); - $r = new ReflectionMethod('G', 'LoadMessageXml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'file'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'labels'); - } - - /** - * @covers G::LoadTranslationObject - * @todo Implement testLoadTranslationObject(). - */ - public function testLoadTranslationObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadTranslationObject', $methods ), 'exists method LoadTranslationObject' ); - $r = new ReflectionMethod('G', 'LoadTranslationObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'lang'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'en'); - } - - /** - * @covers G::LoadTranslation - * @todo Implement testLoadTranslation(). - */ - public function testLoadTranslation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadTranslation', $methods ), 'exists method LoadTranslation' ); - $r = new ReflectionMethod('G', 'LoadTranslation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'en'); - $this->assertTrue( $params[2]->getName() == 'data'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::getTranslations - * @todo Implement testgetTranslations(). - */ - public function testgetTranslations() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTranslations', $methods ), 'exists method getTranslations' ); - $r = new ReflectionMethod('G', 'getTranslations'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgIDs'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'en'); - } - - /** - * @covers G::LoadArrayFile - * @todo Implement testLoadArrayFile(). - */ - public function testLoadArrayFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('LoadArrayFile', $methods ), 'exists method LoadArrayFile' ); - $r = new ReflectionMethod('G', 'LoadArrayFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers G::expandUri - * @todo Implement testexpandUri(). - */ - public function testexpandUri() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('expandUri', $methods ), 'exists method expandUri' ); - $r = new ReflectionMethod('G', 'expandUri'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'methodPage'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::genericForceLogin - * @todo Implement testgenericForceLogin(). - */ - public function testgenericForceLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('genericForceLogin', $methods ), 'exists method genericForceLogin' ); - $r = new ReflectionMethod('G', 'genericForceLogin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'permission'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'urlNoAccess'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'urlLogin'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'login/login'); - } - - /** - * @covers G::capitalize - * @todo Implement testcapitalize(). - */ - public function testcapitalize() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('capitalize', $methods ), 'exists method capitalize' ); - $r = new ReflectionMethod('G', 'capitalize'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::toUpper - * @todo Implement testtoUpper(). - */ - public function testtoUpper() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toUpper', $methods ), 'exists method toUpper' ); - $r = new ReflectionMethod('G', 'toUpper'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sText'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::toLower - * @todo Implement testtoLower(). - */ - public function testtoLower() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toLower', $methods ), 'exists method toLower' ); - $r = new ReflectionMethod('G', 'toLower'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sText'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::http_build_query - * @todo Implement testhttp_build_query(). - */ - public function testhttp_build_query() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('http_build_query', $methods ), 'exists method http_build_query' ); - $r = new ReflectionMethod('G', 'http_build_query'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'formdata'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'numeric_prefix'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'key'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::header - * @todo Implement testheader(). - */ - public function testheader() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('header', $methods ), 'exists method header' ); - $r = new ReflectionMethod('G', 'header'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'parameter'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::forceLogin - * @todo Implement testforceLogin(). - */ - public function testforceLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('forceLogin', $methods ), 'exists method forceLogin' ); - $r = new ReflectionMethod('G', 'forceLogin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'permission'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'urlNoAccess'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers G::add_slashes - * @todo Implement testadd_slashes(). - */ - public function testadd_slashes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add_slashes', $methods ), 'exists method add_slashes' ); - $r = new ReflectionMethod('G', 'add_slashes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'val_old'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::uploadFile - * @todo Implement testuploadFile(). - */ - public function testuploadFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('uploadFile', $methods ), 'exists method uploadFile' ); - $r = new ReflectionMethod('G', 'uploadFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'path'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'nameToSave'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'permission'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '438'); - } - - /** - * @covers G::resizeImage - * @todo Implement testresizeImage(). - */ - public function testresizeImage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('resizeImage', $methods ), 'exists method resizeImage' ); - $r = new ReflectionMethod('G', 'resizeImage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'resWidth'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'resHeight'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'saveTo'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers G::array_merges - * @todo Implement testarray_merges(). - */ - public function testarray_merges() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('array_merges', $methods ), 'exists method array_merges' ); - $r = new ReflectionMethod('G', 'array_merges'); - $params = $r->getParameters(); - } - - /** - * @covers G::array_merge_2 - * @todo Implement testarray_merge_2(). - */ - public function testarray_merge_2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('array_merge_2', $methods ), 'exists method array_merge_2' ); - $r = new ReflectionMethod('G', 'array_merge_2'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'array'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'array_i'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::generateUniqueID - * @todo Implement testgenerateUniqueID(). - */ - public function testgenerateUniqueID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateUniqueID', $methods ), 'exists method generateUniqueID' ); - $r = new ReflectionMethod('G', 'generateUniqueID'); - $params = $r->getParameters(); - } - - /** - * @covers G::generateCode - * @todo Implement testgenerateCode(). - */ - public function testgenerateCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateCode', $methods ), 'exists method generateCode' ); - $r = new ReflectionMethod('G', 'generateCode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'iDigits'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '4'); - $this->assertTrue( $params[1]->getName() == 'sType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'NUMERIC'); - } - - /** - * @covers G::verifyUniqueID - * @todo Implement testverifyUniqueID(). - */ - public function testverifyUniqueID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyUniqueID', $methods ), 'exists method verifyUniqueID' ); - $r = new ReflectionMethod('G', 'verifyUniqueID'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'uid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::is_utf8 - * @todo Implement testis_utf8(). - */ - public function testis_utf8() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('is_utf8', $methods ), 'exists method is_utf8' ); - $r = new ReflectionMethod('G', 'is_utf8'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::CurDate - * @todo Implement testCurDate(). - */ - public function testCurDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('CurDate', $methods ), 'exists method CurDate' ); - $r = new ReflectionMethod('G', 'CurDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sFormat'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers G::getSystemConstants - * @todo Implement testgetSystemConstants(). - */ - public function testgetSystemConstants() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSystemConstants', $methods ), 'exists method getSystemConstants' ); - $r = new ReflectionMethod('G', 'getSystemConstants'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'params'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers G::capitalizeWords - * @todo Implement testcapitalizeWords(). - */ - public function testcapitalizeWords() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('capitalizeWords', $methods ), 'exists method capitalizeWords' ); - $r = new ReflectionMethod('G', 'capitalizeWords'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'text'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::unhtmlentities - * @todo Implement testunhtmlentities(). - */ - public function testunhtmlentities() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unhtmlentities', $methods ), 'exists method unhtmlentities' ); - $r = new ReflectionMethod('G', 'unhtmlentities'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::xmlParser - * @todo Implement testxmlParser(). - */ - public function testxmlParser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('xmlParser', $methods ), 'exists method xmlParser' ); - $r = new ReflectionMethod('G', 'xmlParser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::_del_p - * @todo Implement test_del_p(). - */ - public function test_del_p() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_del_p', $methods ), 'exists method _del_p' ); - $r = new ReflectionMethod('G', '_del_p'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ary'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::ary2xml - * @todo Implement testary2xml(). - */ - public function testary2xml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ary2xml', $methods ), 'exists method ary2xml' ); - $r = new ReflectionMethod('G', 'ary2xml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'cary'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'd'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'forcetag'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::ins2ary - * @todo Implement testins2ary(). - */ - public function testins2ary() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ins2ary', $methods ), 'exists method ins2ary' ); - $r = new ReflectionMethod('G', 'ins2ary'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ary'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'element'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pos'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers G::evalJScript - * @todo Implement testevalJScript(). - */ - public function testevalJScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('evalJScript', $methods ), 'exists method evalJScript' ); - $r = new ReflectionMethod('G', 'evalJScript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'c'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::inflect - * @todo Implement testinflect(). - */ - public function testinflect() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('inflect', $methods ), 'exists method inflect' ); - $r = new ReflectionMethod('G', 'inflect'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'replacement'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '_'); - $this->assertTrue( $params[2]->getName() == 'map'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == array()); - } - - /** - * @covers G::pr - * @todo Implement testpr(). - */ - public function testpr() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('pr', $methods ), 'exists method pr' ); - $r = new ReflectionMethod('G', 'pr'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'var'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::dump - * @todo Implement testdump(). - */ - public function testdump() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dump', $methods ), 'exists method dump' ); - $r = new ReflectionMethod('G', 'dump'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'var'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::stripCDATA - * @todo Implement teststripCDATA(). - */ - public function teststripCDATA() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stripCDATA', $methods ), 'exists method stripCDATA' ); - $r = new ReflectionMethod('G', 'stripCDATA'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::sys_get_temp_dir - * @todo Implement testsys_get_temp_dir(). - */ - public function testsys_get_temp_dir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sys_get_temp_dir', $methods ), 'exists method sys_get_temp_dir' ); - $r = new ReflectionMethod('G', 'sys_get_temp_dir'); - $params = $r->getParameters(); - } - - /** - * @covers G::PMWSCompositeResponse - * @todo Implement testPMWSCompositeResponse(). - */ - public function testPMWSCompositeResponse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('PMWSCompositeResponse', $methods ), 'exists method PMWSCompositeResponse' ); - $r = new ReflectionMethod('G', 'PMWSCompositeResponse'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oResp'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'prop'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::emailAddress - * @todo Implement testemailAddress(). - */ - public function testemailAddress() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('emailAddress', $methods ), 'exists method emailAddress' ); - $r = new ReflectionMethod('G', 'emailAddress'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sEmail'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::json_encode - * @todo Implement testjson_encode(). - */ - public function testjson_encode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('json_encode', $methods ), 'exists method json_encode' ); - $r = new ReflectionMethod('G', 'json_encode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'Json'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::json_decode - * @todo Implement testjson_decode(). - */ - public function testjson_decode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('json_decode', $methods ), 'exists method json_decode' ); - $r = new ReflectionMethod('G', 'json_decode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'Json'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::isHttpRequest - * @todo Implement testisHttpRequest(). - */ - public function testisHttpRequest() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isHttpRequest', $methods ), 'exists method isHttpRequest' ); - $r = new ReflectionMethod('G', 'isHttpRequest'); - $params = $r->getParameters(); - } - - /** - * @covers G::sendMail - * @todo Implement testsendMail(). - */ - public function testsendMail() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendMail', $methods ), 'exists method sendMail' ); - $r = new ReflectionMethod('G', 'sendMail'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fromName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'address'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'subject'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'body'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } - - /** - * @covers G::envelopEmailAddresses - * @todo Implement testenvelopEmailAddresses(). - */ - public function testenvelopEmailAddresses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('envelopEmailAddresses', $methods ), 'exists method envelopEmailAddresses' ); - $r = new ReflectionMethod('G', 'envelopEmailAddresses'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'address'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::gettype - * @todo Implement testgettype(). - */ - public function testgettype() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('gettype', $methods ), 'exists method gettype' ); - $r = new ReflectionMethod('G', 'gettype'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'var'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::removeComments - * @todo Implement testremoveComments(). - */ - public function testremoveComments() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeComments', $methods ), 'exists method removeComments' ); - $r = new ReflectionMethod('G', 'removeComments'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'buffer'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::getMemoryUsage - * @todo Implement testgetMemoryUsage(). - */ - public function testgetMemoryUsage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getMemoryUsage', $methods ), 'exists method getMemoryUsage' ); - $r = new ReflectionMethod('G', 'getMemoryUsage'); - $params = $r->getParameters(); - } - - /** - * @covers G::getFormatUserList - * @todo Implement testgetFormatUserList(). - */ - public function testgetFormatUserList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFormatUserList', $methods ), 'exists method getFormatUserList' ); - $r = new ReflectionMethod('G', 'getFormatUserList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'format'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aUserInfo'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::getModel - * @todo Implement testgetModel(). - */ - /*public function testgetModel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getModel', $methods ), 'exists method getModel' ); - $r = new ReflectionMethod('G', 'getModel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'model'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - }*/ - - /** - * @covers G::is_rwritable - * @todo Implement testis_rwritable(). - */ - public function testis_rwritable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('is_rwritable', $methods ), 'exists method is_rwritable' ); - $r = new ReflectionMethod('G', 'is_rwritable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pattern'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '*'); - } - - /** - * @covers G::rglob - * @todo Implement testrglob(). - */ - public function testrglob() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('rglob', $methods ), 'exists method rglob' ); - $r = new ReflectionMethod('G', 'rglob'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pattern'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '*'); - $this->assertTrue( $params[1]->getName() == 'flags'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'path'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::browser_detection - * @todo Implement testbrowser_detection(). - */ - public function testbrowser_detection() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('browser_detection', $methods ), 'exists method browser_detection' ); - $r = new ReflectionMethod('G', 'browser_detection'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'which_test'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'test_excludes'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'external_ua_string'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers G::get_os_data - * @todo Implement testget_os_data(). - */ - public function testget_os_data() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get_os_data', $methods ), 'exists method get_os_data' ); - $r = new ReflectionMethod('G', 'get_os_data'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pv_browser_string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pv_browser_name'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pv_version_number'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers G::get_item_version - * @todo Implement testget_item_version(). - */ - public function testget_item_version() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get_item_version', $methods ), 'exists method get_item_version' ); - $r = new ReflectionMethod('G', 'get_item_version'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pv_browser_user_agent'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pv_search_string'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pv_b_break_last'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'pv_extra_search'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers G::get_set_count - * @todo Implement testget_set_count(). - */ - public function testget_set_count() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get_set_count', $methods ), 'exists method get_set_count' ); - $r = new ReflectionMethod('G', 'get_set_count'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pv_type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pv_value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers G::check_is_mobile - * @todo Implement testcheck_is_mobile(). - */ - public function testcheck_is_mobile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('check_is_mobile', $methods ), 'exists method check_is_mobile' ); - $r = new ReflectionMethod('G', 'check_is_mobile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pv_browser_user_agent'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::get_mobile_data - * @todo Implement testget_mobile_data(). - */ - public function testget_mobile_data() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get_mobile_data', $methods ), 'exists method get_mobile_data' ); - $r = new ReflectionMethod('G', 'get_mobile_data'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pv_browser_user_agent'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::getBrowser - * @todo Implement testgetBrowser(). - */ - public function testgetBrowser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getBrowser', $methods ), 'exists method getBrowser' ); - $r = new ReflectionMethod('G', 'getBrowser'); - $params = $r->getParameters(); - } - - /** - * @covers G::script_time - * @todo Implement testscript_time(). - */ - public function testscript_time() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('script_time', $methods ), 'exists method script_time' ); - $r = new ReflectionMethod('G', 'script_time'); - $params = $r->getParameters(); - } - - /** - * @covers G::getDirectorySize - * @todo Implement testgetDirectorySize(). - */ - public function testgetDirectorySize() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDirectorySize', $methods ), 'exists method getDirectorySize' ); - $r = new ReflectionMethod('G', 'getDirectorySize'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'maxmtime'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers G::getCacheFileNameByPattern - * @todo Implement testgetCacheFileNameByPattern(). - */ - public function testgetCacheFileNameByPattern() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCacheFileNameByPattern', $methods ), 'exists method getCacheFileNameByPattern' ); - $r = new ReflectionMethod('G', 'getCacheFileNameByPattern'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pattern'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::getCheckSum - * @todo Implement testgetCheckSum(). - */ - public function testgetCheckSum() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCheckSum', $methods ), 'exists method getCheckSum' ); - $r = new ReflectionMethod('G', 'getCheckSum'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'files'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::parse_ini_string - * @todo Implement testparse_ini_string(). - */ - public function testparse_ini_string() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parse_ini_string', $methods ), 'exists method parse_ini_string' ); - $r = new ReflectionMethod('G', 'parse_ini_string'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::disableEnableINIvariable - * @todo Implement testdisableEnableINIvariable(). - */ - public function testdisableEnableINIvariable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('disableEnableINIvariable', $methods ), 'exists method disableEnableINIvariable' ); - $r = new ReflectionMethod('G', 'disableEnableINIvariable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'inifile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'variable'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::setINIvariable - * @todo Implement testsetINIvariable(). - */ - public function testsetINIvariable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setINIvariable', $methods ), 'exists method setINIvariable' ); - $r = new ReflectionMethod('G', 'setINIvariable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'inifile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'variable'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'value'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers G::write_php_ini - * @todo Implement testwrite_php_ini(). - */ - public function testwrite_php_ini() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('write_php_ini', $methods ), 'exists method write_php_ini' ); - $r = new ReflectionMethod('G', 'write_php_ini'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'array'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::verifyWriteAccess - * @todo Implement testverifyWriteAccess(). - */ - public function testverifyWriteAccess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyWriteAccess', $methods ), 'exists method verifyWriteAccess' ); - $r = new ReflectionMethod('G', 'verifyWriteAccess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'resources'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers G::renderTemplate - * @todo Implement testrenderTemplate(). - */ - public function testrenderTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTemplate', $methods ), 'exists method renderTemplate' ); - $r = new ReflectionMethod('G', 'renderTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'data'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers G::parseTemplate - * @todo Implement testparseTemplate(). - */ - public function testparseTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseTemplate', $methods ), 'exists method parseTemplate' ); - $r = new ReflectionMethod('G', 'parseTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'data'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers G::update_php_ini - * @todo Implement testupdate_php_ini(). - */ - public function testupdate_php_ini() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('update_php_ini', $methods ), 'exists method update_php_ini' ); - $r = new ReflectionMethod('G', 'update_php_ini'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'array'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers G::is_writable_r - * @todo Implement testis_writable_r(). - */ - public function testis_writable_r() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('is_writable_r', $methods ), 'exists method is_writable_r' ); - $r = new ReflectionMethod('G', 'is_writable_r'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'noWritableFiles'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - } diff --git a/tests/automated/gulliver/system/classG_ErrorTest.php b/tests/automated/gulliver/system/classG_ErrorTest.php deleted file mode 100644 index 9dfc61862..000000000 --- a/tests/automated/gulliver/system/classG_ErrorTest.php +++ /dev/null @@ -1,92 +0,0 @@ -object = new G_Error(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('G_Error'); $this->assertTrue( count($methods) == 13); - } - - /** - * @covers G_Error::G_Error - * @todo Implement testG_Error(). - */ - public function testG_Error() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('G_Error', $methods ), 'exists method G_Error' ); - $r = new ReflectionMethod('G_Error', 'G_Error'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'code'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '-100'); - $this->assertTrue( $params[1]->getName() == 'mode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - $this->assertTrue( $params[2]->getName() == 'level'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '1024'); - $this->assertTrue( $params[3]->getName() == 'debuginfo'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers G_Error::errorMessage - * @todo Implement testerrorMessage(). - */ - public function testerrorMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('errorMessage', $methods ), 'exists method errorMessage' ); - $r = new ReflectionMethod('G_Error', 'errorMessage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'code'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classHelperTest.php b/tests/automated/gulliver/system/classHelperTest.php deleted file mode 100644 index ecc63e06b..000000000 --- a/tests/automated/gulliver/system/classHelperTest.php +++ /dev/null @@ -1,158 +0,0 @@ -object = new Helper(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Helper'); $this->assertTrue( count($methods) == 8); - } - - /** - * @covers Helper::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('Helper', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers Helper::addFile - * @todo Implement testaddFile(). - */ - public function testaddFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addFile', $methods ), 'exists method addFile' ); - $r = new ReflectionMethod('Helper', 'addFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Helper::addContent - * @todo Implement testaddContent(). - */ - public function testaddContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addContent', $methods ), 'exists method addContent' ); - $r = new ReflectionMethod('Helper', 'addContent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'content'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Helper::setContentType - * @todo Implement testsetContentType(). - */ - public function testsetContentType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setContentType', $methods ), 'exists method setContentType' ); - $r = new ReflectionMethod('Helper', 'setContentType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ctype'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Helper::init - * @todo Implement testinit(). - */ - public function testinit() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('init', $methods ), 'exists method init' ); - $r = new ReflectionMethod('Helper', 'init'); - $params = $r->getParameters(); - } - - /** - * @covers Helper::minify - * @todo Implement testminify(). - */ - public function testminify() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('minify', $methods ), 'exists method minify' ); - $r = new ReflectionMethod('Helper', 'minify'); - $params = $r->getParameters(); - } - - /** - * @covers Helper::flush - * @todo Implement testflush(). - */ - public function testflush() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('flush', $methods ), 'exists method flush' ); - $r = new ReflectionMethod('Helper', 'flush'); - $params = $r->getParameters(); - } - - /** - * @covers Helper::serve - * @todo Implement testserve(). - */ - public function testserve() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('serve', $methods ), 'exists method serve' ); - $r = new ReflectionMethod('Helper', 'serve'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classHttpProxyControllerTest.php b/tests/automated/gulliver/system/classHttpProxyControllerTest.php deleted file mode 100644 index d24a959b2..000000000 --- a/tests/automated/gulliver/system/classHttpProxyControllerTest.php +++ /dev/null @@ -1,172 +0,0 @@ -object = new HttpProxyController(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('HttpProxyController'); $this->assertTrue( count($methods) == 9); - } - - /** - * @covers HttpProxyController::__set - * @todo Implement test__set(). - */ - public function test__set() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__set', $methods ), 'exists method __set' ); - $r = new ReflectionMethod('HttpProxyController', '__set'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers HttpProxyController::__get - * @todo Implement test__get(). - */ - public function test__get() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__get', $methods ), 'exists method __get' ); - $r = new ReflectionMethod('HttpProxyController', '__get'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::__isset - * @todo Implement test__isset(). - */ - public function test__isset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__isset', $methods ), 'exists method __isset' ); - $r = new ReflectionMethod('HttpProxyController', '__isset'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::__unset - * @todo Implement test__unset(). - */ - public function test__unset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__unset', $methods ), 'exists method __unset' ); - $r = new ReflectionMethod('HttpProxyController', '__unset'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::call - * @todo Implement testcall(). - */ - public function testcall() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('call', $methods ), 'exists method call' ); - $r = new ReflectionMethod('HttpProxyController', 'call'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::setHttpRequestData - * @todo Implement testsetHttpRequestData(). - */ - public function testsetHttpRequestData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setHttpRequestData', $methods ), 'exists method setHttpRequestData' ); - $r = new ReflectionMethod('HttpProxyController', 'setHttpRequestData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::setJsonResponse - * @todo Implement testsetJsonResponse(). - */ - public function testsetJsonResponse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setJsonResponse', $methods ), 'exists method setJsonResponse' ); - $r = new ReflectionMethod('HttpProxyController', 'setJsonResponse'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'bool'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers HttpProxyController::setSendResponse - * @todo Implement testsetSendResponse(). - */ - public function testsetSendResponse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setSendResponse', $methods ), 'exists method setSendResponse' ); - $r = new ReflectionMethod('HttpProxyController', 'setSendResponse'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'val'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classMenuTest.php b/tests/automated/gulliver/system/classMenuTest.php deleted file mode 100644 index 40ca3856c..000000000 --- a/tests/automated/gulliver/system/classMenuTest.php +++ /dev/null @@ -1,270 +0,0 @@ -object = new Menu(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Menu'); $this->assertTrue( count($methods) == 11); - } - - /** - * @covers Menu::SetClass - * @todo Implement testSetClass(). - */ - public function testSetClass() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SetClass', $methods ), 'exists method SetClass' ); - $r = new ReflectionMethod('Menu', 'SetClass'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strClass'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'mnu'); - } - - /** - * @covers Menu::Load - * @todo Implement testLoad(). - */ - public function testLoad() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Load', $methods ), 'exists method Load' ); - $r = new ReflectionMethod('Menu', 'Load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strMenuName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Menu::OptionCount - * @todo Implement testOptionCount(). - */ - public function testOptionCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('OptionCount', $methods ), 'exists method OptionCount' ); - $r = new ReflectionMethod('Menu', 'OptionCount'); - $params = $r->getParameters(); - } - - /** - * @covers Menu::AddOption - * @todo Implement testAddOption(). - */ - public function testAddOption() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddOption', $methods ), 'exists method AddOption' ); - $r = new ReflectionMethod('Menu', 'AddOption'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strLabel'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strURL'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'strType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'plugins'); - } - - /** - * @covers Menu::AddIdOption - * @todo Implement testAddIdOption(). - */ - public function testAddIdOption() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddIdOption', $methods ), 'exists method AddIdOption' ); - $r = new ReflectionMethod('Menu', 'AddIdOption'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strLabel'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'strURL'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'strType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == 'plugins'); - } - - /** - * @covers Menu::AddRawOption - * @todo Implement testAddRawOption(). - */ - public function testAddRawOption() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddRawOption', $methods ), 'exists method AddRawOption' ); - $r = new ReflectionMethod('Menu', 'AddRawOption'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strURL'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'plugins'); - } - - /** - * @covers Menu::AddIdRawOption - * @todo Implement testAddIdRawOption(). - */ - public function testAddIdRawOption() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddIdRawOption', $methods ), 'exists method AddIdRawOption' ); - $r = new ReflectionMethod('Menu', 'AddIdRawOption'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strURL'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'label'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'icon'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'js'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'strType'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == 'plugins'); - $this->assertTrue( $params[6]->getName() == 'elementClass'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - } - - /** - * @covers Menu::DisableOptionPos - * @todo Implement testDisableOptionPos(). - */ - public function testDisableOptionPos() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('DisableOptionPos', $methods ), 'exists method DisableOptionPos' ); - $r = new ReflectionMethod('Menu', 'DisableOptionPos'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Menu::DisableOptionId - * @todo Implement testDisableOptionId(). - */ - public function testDisableOptionId() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('DisableOptionId', $methods ), 'exists method DisableOptionId' ); - $r = new ReflectionMethod('Menu', 'DisableOptionId'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'id'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Menu::RenderOption - * @todo Implement testRenderOption(). - */ - public function testRenderOption() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderOption', $methods ), 'exists method RenderOption' ); - $r = new ReflectionMethod('Menu', 'RenderOption'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Menu::generateArrayForTemplate - * @todo Implement testgenerateArrayForTemplate(). - */ - public function testgenerateArrayForTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateArrayForTemplate', $methods ), 'exists method generateArrayForTemplate' ); - $r = new ReflectionMethod('Menu', 'generateArrayForTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'G_MAIN_MENU'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'classOn'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'classOff'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'G_MENU_SELECTED'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'G_ID_MENU_SELECTED'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classPHPSQLParserTest.php b/tests/automated/gulliver/system/classPHPSQLParserTest.php deleted file mode 100644 index 3857913f9..000000000 --- a/tests/automated/gulliver/system/classPHPSQLParserTest.php +++ /dev/null @@ -1,111 +0,0 @@ -object = new PHPSQLParser(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PHPSQLParser'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers PHPSQLParser::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('PHPSQLParser', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sql'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers PHPSQLParser::parse - * @todo Implement testparse(). - */ - public function testparse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parse', $methods ), 'exists method parse' ); - $r = new ReflectionMethod('PHPSQLParser', 'parse'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sql'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PHPSQLParser::process_insert - * @todo Implement testprocess_insert(). - */ - public function testprocess_insert() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('process_insert', $methods ), 'exists method process_insert' ); - $r = new ReflectionMethod('PHPSQLParser', 'process_insert'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tokens'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'token_category'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'INSERT'); - } - - /** - * @covers PHPSQLParser::load_reserved_words - * @todo Implement testload_reserved_words(). - */ - public function testload_reserved_words() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load_reserved_words', $methods ), 'exists method load_reserved_words' ); - $r = new ReflectionMethod('PHPSQLParser', 'load_reserved_words'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classPMExceptionTest.php b/tests/automated/gulliver/system/classPMExceptionTest.php deleted file mode 100644 index 9c737efc1..000000000 --- a/tests/automated/gulliver/system/classPMExceptionTest.php +++ /dev/null @@ -1,87 +0,0 @@ -object = new PMException($message ); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $class = new ReflectionClass('PMException'); - $methods = $class->getMethods( ReflectionMethod::IS_PUBLIC ); - //$this->assertTrue( count($methods) == 9 ); - } - - /** - * @covers PMException::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('PMException', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'code'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'previous'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers PMException::__toString - * @todo Implement test__toString(). - */ - public function test__toString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' ); - $r = new ReflectionMethod('PMException', '__toString'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classPublisherTest.php b/tests/automated/gulliver/system/classPublisherTest.php deleted file mode 100644 index a87360378..000000000 --- a/tests/automated/gulliver/system/classPublisherTest.php +++ /dev/null @@ -1,133 +0,0 @@ -object = new Publisher(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Publisher'); $this->assertTrue( count($methods) == 3); - } - - /** - * @covers Publisher::AddContent - * @todo Implement testAddContent(). - */ - public function testAddContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddContent', $methods ), 'exists method AddContent' ); - $r = new ReflectionMethod('Publisher', 'AddContent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strType'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'form'); - $this->assertTrue( $params[1]->getName() == 'strLayout'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'form'); - $this->assertTrue( $params[2]->getName() == 'strName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'strContent'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'arrData'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'strTarget'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'ajaxServer'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'mode'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - $this->assertTrue( $params[8]->getName() == 'bAbsolutePath'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - } - - /** - * @covers Publisher::RenderContent - * @todo Implement testRenderContent(). - */ - public function testRenderContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderContent', $methods ), 'exists method RenderContent' ); - $r = new ReflectionMethod('Publisher', 'RenderContent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '0'); - } - - /** - * @covers Publisher::RenderContent0 - * @todo Implement testRenderContent0(). - */ - public function testRenderContent0() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderContent0', $methods ), 'exists method RenderContent0' ); - $r = new ReflectionMethod('Publisher', 'RenderContent0'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '0'); - $this->assertTrue( $params[1]->getName() == 'showXMLFormName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classRBACTest.php b/tests/automated/gulliver/system/classRBACTest.php deleted file mode 100644 index 53379c284..000000000 --- a/tests/automated/gulliver/system/classRBACTest.php +++ /dev/null @@ -1,922 +0,0 @@ -object = new RBAC(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('RBAC'); - $this->assertTrue( count($methods) == 55, "now there are " . count($methods) . " methods."); - } - - /** - * @covers RBAC::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('RBAC', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' ); - $r = new ReflectionMethod('RBAC', 'getSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::initRBAC - * @todo Implement testinitRBAC(). - */ - public function testinitRBAC() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('initRBAC', $methods ), 'exists method initRBAC' ); - $r = new ReflectionMethod('RBAC', 'initRBAC'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::loadUserRolePermission - * @todo Implement testloadUserRolePermission(). - */ - public function testloadUserRolePermission() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadUserRolePermission', $methods ), 'exists method loadUserRolePermission' ); - $r = new ReflectionMethod('RBAC', 'loadUserRolePermission'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSystem'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUser'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::checkAutomaticRegister - * @todo Implement testcheckAutomaticRegister(). - */ - public function testcheckAutomaticRegister() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('checkAutomaticRegister', $methods ), 'exists method checkAutomaticRegister' ); - $r = new ReflectionMethod('RBAC', 'checkAutomaticRegister'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strPass'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::VerifyWithOtherAuthenticationSource - * @todo Implement testVerifyWithOtherAuthenticationSource(). - */ - public function testVerifyWithOtherAuthenticationSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('VerifyWithOtherAuthenticationSource', $methods ), 'exists method VerifyWithOtherAuthenticationSource' ); - $r = new ReflectionMethod('RBAC', 'VerifyWithOtherAuthenticationSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAuthType'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aUserFields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'strPass'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers RBAC::VerifyLogin - * @todo Implement testVerifyLogin(). - */ - public function testVerifyLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('VerifyLogin', $methods ), 'exists method VerifyLogin' ); - $r = new ReflectionMethod('RBAC', 'VerifyLogin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strPass'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::verifyUser - * @todo Implement testverifyUser(). - */ - public function testverifyUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyUser', $methods ), 'exists method verifyUser' ); - $r = new ReflectionMethod('RBAC', 'verifyUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::verifyUserId - * @todo Implement testverifyUserId(). - */ - public function testverifyUserId() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyUserId', $methods ), 'exists method verifyUserId' ); - $r = new ReflectionMethod('RBAC', 'verifyUserId'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strUserId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::userCanAccess - * @todo Implement testuserCanAccess(). - */ - public function testuserCanAccess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('userCanAccess', $methods ), 'exists method userCanAccess' ); - $r = new ReflectionMethod('RBAC', 'userCanAccess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'perm'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::createUser - * @todo Implement testcreateUser(). - */ - public function testcreateUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createUser', $methods ), 'exists method createUser' ); - $r = new ReflectionMethod('RBAC', 'createUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - $this->assertTrue( $params[1]->getName() == 'sRolCode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::updateUser - * @todo Implement testupdateUser(). - */ - public function testupdateUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateUser', $methods ), 'exists method updateUser' ); - $r = new ReflectionMethod('RBAC', 'updateUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - $this->assertTrue( $params[1]->getName() == 'sRolCode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::assignRoleToUser - * @todo Implement testassignRoleToUser(). - */ - public function testassignRoleToUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignRoleToUser', $methods ), 'exists method assignRoleToUser' ); - $r = new ReflectionMethod('RBAC', 'assignRoleToUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sRolCode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::removeRolesFromUser - * @todo Implement testremoveRolesFromUser(). - */ - public function testremoveRolesFromUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeRolesFromUser', $methods ), 'exists method removeRolesFromUser' ); - $r = new ReflectionMethod('RBAC', 'removeRolesFromUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::changeUserStatus - * @todo Implement testchangeUserStatus(). - */ - public function testchangeUserStatus() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('changeUserStatus', $methods ), 'exists method changeUserStatus' ); - $r = new ReflectionMethod('RBAC', 'changeUserStatus'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sStatus'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'ACTIVE'); - } - - /** - * @covers RBAC::removeUser - * @todo Implement testremoveUser(). - */ - public function testremoveUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeUser', $methods ), 'exists method removeUser' ); - $r = new ReflectionMethod('RBAC', 'removeUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('RBAC', 'load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'uid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::createPermision - * @todo Implement testcreatePermision(). - */ - public function testcreatePermision() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createPermision', $methods ), 'exists method createPermision' ); - $r = new ReflectionMethod('RBAC', 'createPermision'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::listAllRoles - * @todo Implement testlistAllRoles(). - */ - public function testlistAllRoles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listAllRoles', $methods ), 'exists method listAllRoles' ); - $r = new ReflectionMethod('RBAC', 'listAllRoles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'systemCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER'); - } - - /** - * @covers RBAC::getAllRoles - * @todo Implement testgetAllRoles(). - */ - public function testgetAllRoles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllRoles', $methods ), 'exists method getAllRoles' ); - $r = new ReflectionMethod('RBAC', 'getAllRoles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'systemCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER'); - } - - /** - * @covers RBAC::getAllRolesFilter - * @todo Implement testgetAllRolesFilter(). - */ - public function testgetAllRolesFilter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllRolesFilter', $methods ), 'exists method getAllRolesFilter' ); - $r = new ReflectionMethod('RBAC', 'getAllRolesFilter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'filter'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers RBAC::listAllPermissions - * @todo Implement testlistAllPermissions(). - */ - public function testlistAllPermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listAllPermissions', $methods ), 'exists method listAllPermissions' ); - $r = new ReflectionMethod('RBAC', 'listAllPermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'systemCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER'); - } - - /** - * @covers RBAC::createRole - * @todo Implement testcreateRole(). - */ - public function testcreateRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createRole', $methods ), 'exists method createRole' ); - $r = new ReflectionMethod('RBAC', 'createRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::removeRole - * @todo Implement testremoveRole(). - */ - public function testremoveRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeRole', $methods ), 'exists method removeRole' ); - $r = new ReflectionMethod('RBAC', 'removeRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::verifyNewRole - * @todo Implement testverifyNewRole(). - */ - public function testverifyNewRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyNewRole', $methods ), 'exists method verifyNewRole' ); - $r = new ReflectionMethod('RBAC', 'verifyNewRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'code'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::updateRole - * @todo Implement testupdateRole(). - */ - public function testupdateRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateRole', $methods ), 'exists method updateRole' ); - $r = new ReflectionMethod('RBAC', 'updateRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'fields'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::loadById - * @todo Implement testloadById(). - */ - public function testloadById() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadById', $methods ), 'exists method loadById' ); - $r = new ReflectionMethod('RBAC', 'loadById'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::getRoleUsers - * @todo Implement testgetRoleUsers(). - */ - public function testgetRoleUsers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRoleUsers', $methods ), 'exists method getRoleUsers' ); - $r = new ReflectionMethod('RBAC', 'getRoleUsers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filter'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::getAllUsersByRole - * @todo Implement testgetAllUsersByRole(). - */ - public function testgetAllUsersByRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUsersByRole', $methods ), 'exists method getAllUsersByRole' ); - $r = new ReflectionMethod('RBAC', 'getAllUsersByRole'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getAllUsersByDepartment - * @todo Implement testgetAllUsersByDepartment(). - */ - public function testgetAllUsersByDepartment() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUsersByDepartment', $methods ), 'exists method getAllUsersByDepartment' ); - $r = new ReflectionMethod('RBAC', 'getAllUsersByDepartment'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getRoleCode - * @todo Implement testgetRoleCode(). - */ - public function testgetRoleCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRoleCode', $methods ), 'exists method getRoleCode' ); - $r = new ReflectionMethod('RBAC', 'getRoleCode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::deleteUserRole - * @todo Implement testdeleteUserRole(). - */ - public function testdeleteUserRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteUserRole', $methods ), 'exists method deleteUserRole' ); - $r = new ReflectionMethod('RBAC', 'deleteUserRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'USR_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::getAllUsers - * @todo Implement testgetAllUsers(). - */ - public function testgetAllUsers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUsers', $methods ), 'exists method getAllUsers' ); - $r = new ReflectionMethod('RBAC', 'getAllUsers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filter'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::assignUserToRole - * @todo Implement testassignUserToRole(). - */ - public function testassignUserToRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignUserToRole', $methods ), 'exists method assignUserToRole' ); - $r = new ReflectionMethod('RBAC', 'assignUserToRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::getRolePermissions - * @todo Implement testgetRolePermissions(). - */ - public function testgetRolePermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRolePermissions', $methods ), 'exists method getRolePermissions' ); - $r = new ReflectionMethod('RBAC', 'getRolePermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filter'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::getAllPermissions - * @todo Implement testgetAllPermissions(). - */ - public function testgetAllPermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllPermissions', $methods ), 'exists method getAllPermissions' ); - $r = new ReflectionMethod('RBAC', 'getAllPermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'PER_SYSTEM'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'filter'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::assignPermissionRole - * @todo Implement testassignPermissionRole(). - */ - public function testassignPermissionRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignPermissionRole', $methods ), 'exists method assignPermissionRole' ); - $r = new ReflectionMethod('RBAC', 'assignPermissionRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::assignPermissionToRole - * @todo Implement testassignPermissionToRole(). - */ - public function testassignPermissionToRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignPermissionToRole', $methods ), 'exists method assignPermissionToRole' ); - $r = new ReflectionMethod('RBAC', 'assignPermissionToRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sRoleUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sPermissionUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::deletePermissionRole - * @todo Implement testdeletePermissionRole(). - */ - public function testdeletePermissionRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deletePermissionRole', $methods ), 'exists method deletePermissionRole' ); - $r = new ReflectionMethod('RBAC', 'deletePermissionRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'PER_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::numUsersWithRole - * @todo Implement testnumUsersWithRole(). - */ - public function testnumUsersWithRole() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('numUsersWithRole', $methods ), 'exists method numUsersWithRole' ); - $r = new ReflectionMethod('RBAC', 'numUsersWithRole'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ROL_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::createSystem - * @todo Implement testcreateSystem(). - */ - public function testcreateSystem() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createSystem', $methods ), 'exists method createSystem' ); - $r = new ReflectionMethod('RBAC', 'createSystem'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::verifyByCode - * @todo Implement testverifyByCode(). - */ - public function testverifyByCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyByCode', $methods ), 'exists method verifyByCode' ); - $r = new ReflectionMethod('RBAC', 'verifyByCode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::getAllAuthSources - * @todo Implement testgetAllAuthSources(). - */ - public function testgetAllAuthSources() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllAuthSources', $methods ), 'exists method getAllAuthSources' ); - $r = new ReflectionMethod('RBAC', 'getAllAuthSources'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getAllAuthSourcesByUser - * @todo Implement testgetAllAuthSourcesByUser(). - */ - public function testgetAllAuthSourcesByUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllAuthSourcesByUser', $methods ), 'exists method getAllAuthSourcesByUser' ); - $r = new ReflectionMethod('RBAC', 'getAllAuthSourcesByUser'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getAuthenticationSources - * @todo Implement testgetAuthenticationSources(). - */ - public function testgetAuthenticationSources() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAuthenticationSources', $methods ), 'exists method getAuthenticationSources' ); - $r = new ReflectionMethod('RBAC', 'getAuthenticationSources'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'filter'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers RBAC::getAuthSource - * @todo Implement testgetAuthSource(). - */ - public function testgetAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAuthSource', $methods ), 'exists method getAuthSource' ); - $r = new ReflectionMethod('RBAC', 'getAuthSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::createAuthSource - * @todo Implement testcreateAuthSource(). - */ - public function testcreateAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createAuthSource', $methods ), 'exists method createAuthSource' ); - $r = new ReflectionMethod('RBAC', 'createAuthSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::updateAuthSource - * @todo Implement testupdateAuthSource(). - */ - public function testupdateAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateAuthSource', $methods ), 'exists method updateAuthSource' ); - $r = new ReflectionMethod('RBAC', 'updateAuthSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::removeAuthSource - * @todo Implement testremoveAuthSource(). - */ - public function testremoveAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeAuthSource', $methods ), 'exists method removeAuthSource' ); - $r = new ReflectionMethod('RBAC', 'removeAuthSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::getAllUsersByAuthSource - * @todo Implement testgetAllUsersByAuthSource(). - */ - public function testgetAllUsersByAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUsersByAuthSource', $methods ), 'exists method getAllUsersByAuthSource' ); - $r = new ReflectionMethod('RBAC', 'getAllUsersByAuthSource'); - $params = $r->getParameters(); - } - - /** - * @covers RBAC::getListUsersByAuthSource - * @todo Implement testgetListUsersByAuthSource(). - */ - public function testgetListUsersByAuthSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getListUsersByAuthSource', $methods ), 'exists method getListUsersByAuthSource' ); - $r = new ReflectionMethod('RBAC', 'getListUsersByAuthSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aSource'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::searchUsers - * @todo Implement testsearchUsers(). - */ - public function testsearchUsers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('searchUsers', $methods ), 'exists method searchUsers' ); - $r = new ReflectionMethod('RBAC', 'searchUsers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sKeyword'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RBAC::requirePermissions - * @todo Implement testrequirePermissions(). - */ - public function testrequirePermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('requirePermissions', $methods ), 'exists method requirePermissions' ); - $r = new ReflectionMethod('RBAC', 'requirePermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'permissions'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RBAC::cleanSessionFiles - * @todo Implement testcleanSessionFiles(). - */ - public function testcleanSessionFiles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('cleanSessionFiles', $methods ), 'exists method cleanSessionFiles' ); - $r = new ReflectionMethod('RBAC', 'cleanSessionFiles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'hours'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '72'); - } - - } diff --git a/tests/automated/gulliver/system/classRestClientTest.php b/tests/automated/gulliver/system/classRestClientTest.php deleted file mode 100644 index 75cbe5bd8..000000000 --- a/tests/automated/gulliver/system/classRestClientTest.php +++ /dev/null @@ -1,394 +0,0 @@ -object = new RestClient(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('RestClient'); $this->assertTrue( count($methods) == 20); - } - - /** - * @covers RestClient::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('RestClient', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::execute - * @todo Implement testexecute(). - */ - public function testexecute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('execute', $methods ), 'exists method execute' ); - $r = new ReflectionMethod('RestClient', 'execute'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::getHeaders - * @todo Implement testgetHeaders(). - */ - public function testgetHeaders() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHeaders', $methods ), 'exists method getHeaders' ); - $r = new ReflectionMethod('RestClient', 'getHeaders'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::getResponse - * @todo Implement testgetResponse(). - */ - public function testgetResponse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getResponse', $methods ), 'exists method getResponse' ); - $r = new ReflectionMethod('RestClient', 'getResponse'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::getResponseCode - * @todo Implement testgetResponseCode(). - */ - public function testgetResponseCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getResponseCode', $methods ), 'exists method getResponseCode' ); - $r = new ReflectionMethod('RestClient', 'getResponseCode'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::getResponseMessage - * @todo Implement testgetResponseMessage(). - */ - public function testgetResponseMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getResponseMessage', $methods ), 'exists method getResponseMessage' ); - $r = new ReflectionMethod('RestClient', 'getResponseMessage'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::getResponseContentType - * @todo Implement testgetResponseContentType(). - */ - public function testgetResponseContentType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getResponseContentType', $methods ), 'exists method getResponseContentType' ); - $r = new ReflectionMethod('RestClient', 'getResponseContentType'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::setNoFollow - * @todo Implement testsetNoFollow(). - */ - public function testsetNoFollow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setNoFollow', $methods ), 'exists method setNoFollow' ); - $r = new ReflectionMethod('RestClient', 'setNoFollow'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::close - * @todo Implement testclose(). - */ - public function testclose() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('close', $methods ), 'exists method close' ); - $r = new ReflectionMethod('RestClient', 'close'); - $params = $r->getParameters(); - } - - /** - * @covers RestClient::setUrl - * @todo Implement testsetUrl(). - */ - public function testsetUrl() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setUrl', $methods ), 'exists method setUrl' ); - $r = new ReflectionMethod('RestClient', 'setUrl'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RestClient::setContentType - * @todo Implement testsetContentType(). - */ - public function testsetContentType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setContentType', $methods ), 'exists method setContentType' ); - $r = new ReflectionMethod('RestClient', 'setContentType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'contentType'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RestClient::setCredentials - * @todo Implement testsetCredentials(). - */ - public function testsetCredentials() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setCredentials', $methods ), 'exists method setCredentials' ); - $r = new ReflectionMethod('RestClient', 'setCredentials'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'user'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pass'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers RestClient::setMethod - * @todo Implement testsetMethod(). - */ - public function testsetMethod() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setMethod', $methods ), 'exists method setMethod' ); - $r = new ReflectionMethod('RestClient', 'setMethod'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'method'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RestClient::setParameters - * @todo Implement testsetParameters(). - */ - public function testsetParameters() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setParameters', $methods ), 'exists method setParameters' ); - $r = new ReflectionMethod('RestClient', 'setParameters'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'params'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers RestClient::createClient - * @todo Implement testcreateClient(). - */ - public function testcreateClient() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createClient', $methods ), 'exists method createClient' ); - $r = new ReflectionMethod('RestClient', 'createClient'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers RestClient::post - * @todo Implement testpost(). - */ - public function testpost() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('post', $methods ), 'exists method post' ); - $r = new ReflectionMethod('RestClient', 'post'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'params'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'user'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'pwd'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'contentType'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == 'multipart/form-data'); - } - - /** - * @covers RestClient::put - * @todo Implement testput(). - */ - public function testput() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('put', $methods ), 'exists method put' ); - $r = new ReflectionMethod('RestClient', 'put'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'body'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'user'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'pwd'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'contentType'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers RestClient::get - * @todo Implement testget(). - */ - public function testget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get', $methods ), 'exists method get' ); - $r = new ReflectionMethod('RestClient', 'get'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'user'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pwd'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'contentType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers RestClient::delete - * @todo Implement testdelete(). - */ - public function testdelete() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('delete', $methods ), 'exists method delete' ); - $r = new ReflectionMethod('RestClient', 'delete'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'user'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'pwd'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'contentType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers RestClient::call - * @todo Implement testcall(). - */ - public function testcall() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('call', $methods ), 'exists method call' ); - $r = new ReflectionMethod('RestClient', 'call'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'method'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'url'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'body'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'user'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'pwd'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'contentType'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classTableTest.php b/tests/automated/gulliver/system/classTableTest.php deleted file mode 100644 index 9f9655a3f..000000000 --- a/tests/automated/gulliver/system/classTableTest.php +++ /dev/null @@ -1,507 +0,0 @@ -object = new Table(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Table'); $this->assertTrue( count($methods) == 23); - } - - /** - * @covers Table::Table - * @todo Implement testTable(). - */ - public function testTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Table', $methods ), 'exists method Table' ); - $r = new ReflectionMethod('Table', 'Table'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'objConnection'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Table::SetTo - * @todo Implement testSetTo(). - */ - public function testSetTo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SetTo', $methods ), 'exists method SetTo' ); - $r = new ReflectionMethod('Table', 'SetTo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'objConnection'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Table::SetSource - * @todo Implement testSetSource(). - */ - public function testSetSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SetSource', $methods ), 'exists method SetSource' ); - $r = new ReflectionMethod('Table', 'SetSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'stQry'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'stDefaultOrder'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'UID'); - $this->assertTrue( $params[2]->getName() == 'stDefaultOrderDir'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'ASC'); - } - - /** - * @covers Table::GetSource - * @todo Implement testGetSource(). - */ - public function testGetSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetSource', $methods ), 'exists method GetSource' ); - $r = new ReflectionMethod('Table', 'GetSource'); - $params = $r->getParameters(); - } - - /** - * @covers Table::TotalCount - * @todo Implement testTotalCount(). - */ - public function testTotalCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('TotalCount', $methods ), 'exists method TotalCount' ); - $r = new ReflectionMethod('Table', 'TotalCount'); - $params = $r->getParameters(); - } - - /** - * @covers Table::Count - * @todo Implement testCount(). - */ - public function testCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Count', $methods ), 'exists method Count' ); - $r = new ReflectionMethod('Table', 'Count'); - $params = $r->getParameters(); - } - - /** - * @covers Table::CurRow - * @todo Implement testCurRow(). - */ - public function testCurRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('CurRow', $methods ), 'exists method CurRow' ); - $r = new ReflectionMethod('Table', 'CurRow'); - $params = $r->getParameters(); - } - - /** - * @covers Table::ColumnCount - * @todo Implement testColumnCount(). - */ - public function testColumnCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ColumnCount', $methods ), 'exists method ColumnCount' ); - $r = new ReflectionMethod('Table', 'ColumnCount'); - $params = $r->getParameters(); - } - - /** - * @covers Table::Read - * @todo Implement testRead(). - */ - public function testRead() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Read', $methods ), 'exists method Read' ); - $r = new ReflectionMethod('Table', 'Read'); - $params = $r->getParameters(); - } - - /** - * @covers Table::Seek - * @todo Implement testSeek(). - */ - public function testSeek() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Seek', $methods ), 'exists method Seek' ); - $r = new ReflectionMethod('Table', 'Seek'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '0'); - } - - /** - * @covers Table::MoveFirst - * @todo Implement testMoveFirst(). - */ - public function testMoveFirst() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('MoveFirst', $methods ), 'exists method MoveFirst' ); - $r = new ReflectionMethod('Table', 'MoveFirst'); - $params = $r->getParameters(); - } - - /** - * @covers Table::EOF - * @todo Implement testEOF(). - */ - public function testEOF() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('EOF', $methods ), 'exists method EOF' ); - $r = new ReflectionMethod('Table', 'EOF'); - $params = $r->getParameters(); - } - - /** - * @covers Table::AddColumn - * @todo Implement testAddColumn(). - */ - public function testAddColumn() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddColumn', $methods ), 'exists method AddColumn' ); - $r = new ReflectionMethod('Table', 'AddColumn'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strLabel'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'strType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'text'); - $this->assertTrue( $params[2]->getName() == 'strName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'strAlign'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == 'left'); - $this->assertTrue( $params[4]->getName() == 'intWidth'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '0'); - $this->assertTrue( $params[5]->getName() == 'strTarget'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'strContent'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - } - - /** - * @covers Table::AddRawColumn - * @todo Implement testAddRawColumn(). - */ - public function testAddRawColumn() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddRawColumn', $methods ), 'exists method AddRawColumn' ); - $r = new ReflectionMethod('Table', 'AddRawColumn'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strType'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'text'); - $this->assertTrue( $params[1]->getName() == 'strName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'strAlign'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'left'); - $this->assertTrue( $params[3]->getName() == 'intWidth'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - $this->assertTrue( $params[4]->getName() == 'strTarget'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'strContent'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'strExtra'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'strCondition'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - $this->assertTrue( $params[8]->getName() == 'orderByThis'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == '1'); - } - - /** - * @covers Table::RenderTitle - * @todo Implement testRenderTitle(). - */ - public function testRenderTitle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderTitle', $methods ), 'exists method RenderTitle' ); - $r = new ReflectionMethod('Table', 'RenderTitle'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pa'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'intPos'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - $this->assertTrue( $params[2]->getName() == 'strClass'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader'); - } - - /** - * @covers Table::RenderTitle_ajax - * @todo Implement testRenderTitle_ajax(). - */ - public function testRenderTitle_ajax() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderTitle_ajax', $methods ), 'exists method RenderTitle_ajax' ); - $r = new ReflectionMethod('Table', 'RenderTitle_ajax'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pa'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'intPos'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - $this->assertTrue( $params[2]->getName() == 'strClass'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader'); - } - - /** - * @covers Table::RenderTitle2 - * @todo Implement testRenderTitle2(). - */ - public function testRenderTitle2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderTitle2', $methods ), 'exists method RenderTitle2' ); - $r = new ReflectionMethod('Table', 'RenderTitle2'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pa'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fil'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'intPos'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'strClass'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == 'tblHeader'); - $this->assertTrue( $params[4]->getName() == 'auxgetval'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Table::RenderColumn - * @todo Implement testRenderColumn(). - */ - public function testRenderColumn() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('RenderColumn', $methods ), 'exists method RenderColumn' ); - $r = new ReflectionMethod('Table', 'RenderColumn'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'intPos'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '0'); - $this->assertTrue( $params[1]->getName() == 'strClass'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'tblCell'); - $this->assertTrue( $params[2]->getName() == 'strClassLink'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'tblCellA'); - $this->assertTrue( $params[3]->getName() == 'number'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - $this->assertTrue( $params[4]->getName() == 'renderTD'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '1'); - } - - /** - * @covers Table::SetAction - * @todo Implement testSetAction(). - */ - public function testSetAction() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SetAction', $methods ), 'exists method SetAction' ); - $r = new ReflectionMethod('Table', 'SetAction'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'strAction'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'strLabel'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'Continue'); - } - - /** - * @covers Table::setTranslate - * @todo Implement testsetTranslate(). - */ - public function testsetTranslate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setTranslate', $methods ), 'exists method setTranslate' ); - $r = new ReflectionMethod('Table', 'setTranslate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'contexto'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tabla'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'nombre'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Table::translateValue - * @todo Implement testtranslateValue(). - */ - public function testtranslateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('translateValue', $methods ), 'exists method translateValue' ); - $r = new ReflectionMethod('Table', 'translateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'contexto'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'valor'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'lang'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Table::setContext - * @todo Implement testsetContext(). - */ - public function testsetContext() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setContext', $methods ), 'exists method setContext' ); - $r = new ReflectionMethod('Table', 'setContext'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'contexto'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Table::ParsingFromHtml - * @todo Implement testParsingFromHtml(). - */ - public function testParsingFromHtml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ParsingFromHtml', $methods ), 'exists method ParsingFromHtml' ); - $r = new ReflectionMethod('Table', 'ParsingFromHtml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'number'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '100000000'); - } - - } diff --git a/tests/automated/gulliver/system/classTemplatePowerParserTest.php b/tests/automated/gulliver/system/classTemplatePowerParserTest.php deleted file mode 100644 index 933706c6d..000000000 --- a/tests/automated/gulliver/system/classTemplatePowerParserTest.php +++ /dev/null @@ -1,181 +0,0 @@ -object = new TemplatePowerParser($tpl_file, $type); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('TemplatePowerParser'); $this->assertTrue( count($methods) == 8); - } - - /** - * @covers TemplatePowerParser::TemplatePowerParser - * @todo Implement testTemplatePowerParser(). - */ - public function testTemplatePowerParser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('TemplatePowerParser', $methods ), 'exists method TemplatePowerParser' ); - $r = new ReflectionMethod('TemplatePowerParser', 'TemplatePowerParser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers TemplatePowerParser::__errorAlert - * @todo Implement test__errorAlert(). - */ - public function test__errorAlert() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__errorAlert', $methods ), 'exists method __errorAlert' ); - $r = new ReflectionMethod('TemplatePowerParser', '__errorAlert'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers TemplatePowerParser::__prepare - * @todo Implement test__prepare(). - */ - public function test__prepare() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__prepare', $methods ), 'exists method __prepare' ); - $r = new ReflectionMethod('TemplatePowerParser', '__prepare'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePowerParser::__cleanUp - * @todo Implement test__cleanUp(). - */ - public function test__cleanUp() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__cleanUp', $methods ), 'exists method __cleanUp' ); - $r = new ReflectionMethod('TemplatePowerParser', '__cleanUp'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePowerParser::__prepareTemplate - * @todo Implement test__prepareTemplate(). - */ - public function test__prepareTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__prepareTemplate', $methods ), 'exists method __prepareTemplate' ); - $r = new ReflectionMethod('TemplatePowerParser', '__prepareTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers TemplatePowerParser::__parseTemplate - * @todo Implement test__parseTemplate(). - */ - public function test__parseTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__parseTemplate', $methods ), 'exists method __parseTemplate' ); - $r = new ReflectionMethod('TemplatePowerParser', '__parseTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tplvar'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'blockname'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'initdev'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers TemplatePowerParser::version - * @todo Implement testversion(). - */ - public function testversion() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('version', $methods ), 'exists method version' ); - $r = new ReflectionMethod('TemplatePowerParser', 'version'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePowerParser::assignInclude - * @todo Implement testassignInclude(). - */ - public function testassignInclude() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignInclude', $methods ), 'exists method assignInclude' ); - $r = new ReflectionMethod('TemplatePowerParser', 'assignInclude'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'iblockname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'type'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - } diff --git a/tests/automated/gulliver/system/classTemplatePowerTest.php b/tests/automated/gulliver/system/classTemplatePowerTest.php deleted file mode 100644 index e870adb7e..000000000 --- a/tests/automated/gulliver/system/classTemplatePowerTest.php +++ /dev/null @@ -1,309 +0,0 @@ -object = new TemplatePower(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('TemplatePower'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers TemplatePower::TemplatePower - * @todo Implement testTemplatePower(). - */ - public function testTemplatePower() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('TemplatePower', $methods ), 'exists method TemplatePower' ); - $r = new ReflectionMethod('TemplatePower', 'TemplatePower'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers TemplatePower::__deSerializeTPL - * @todo Implement test__deSerializeTPL(). - */ - public function test__deSerializeTPL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__deSerializeTPL', $methods ), 'exists method __deSerializeTPL' ); - $r = new ReflectionMethod('TemplatePower', '__deSerializeTPL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'stpl_file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers TemplatePower::__makeContentRoot - * @todo Implement test__makeContentRoot(). - */ - public function test__makeContentRoot() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__makeContentRoot', $methods ), 'exists method __makeContentRoot' ); - $r = new ReflectionMethod('TemplatePower', '__makeContentRoot'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePower::__assign - * @todo Implement test__assign(). - */ - public function test__assign() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__assign', $methods ), 'exists method __assign' ); - $r = new ReflectionMethod('TemplatePower', '__assign'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'varname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers TemplatePower::__assignGlobal - * @todo Implement test__assignGlobal(). - */ - public function test__assignGlobal() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__assignGlobal', $methods ), 'exists method __assignGlobal' ); - $r = new ReflectionMethod('TemplatePower', '__assignGlobal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'varname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers TemplatePower::__outputContent - * @todo Implement test__outputContent(). - */ - public function test__outputContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__outputContent', $methods ), 'exists method __outputContent' ); - $r = new ReflectionMethod('TemplatePower', '__outputContent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'blockname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers TemplatePower::__printVars - * @todo Implement test__printVars(). - */ - public function test__printVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__printVars', $methods ), 'exists method __printVars' ); - $r = new ReflectionMethod('TemplatePower', '__printVars'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePower::serializedBase - * @todo Implement testserializedBase(). - */ - public function testserializedBase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('serializedBase', $methods ), 'exists method serializedBase' ); - $r = new ReflectionMethod('TemplatePower', 'serializedBase'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePower::showUnAssigned - * @todo Implement testshowUnAssigned(). - */ - public function testshowUnAssigned() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('showUnAssigned', $methods ), 'exists method showUnAssigned' ); - $r = new ReflectionMethod('TemplatePower', 'showUnAssigned'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'state'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers TemplatePower::prepare - * @todo Implement testprepare(). - */ - public function testprepare() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' ); - $r = new ReflectionMethod('TemplatePower', 'prepare'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePower::newBlock - * @todo Implement testnewBlock(). - */ - public function testnewBlock() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newBlock', $methods ), 'exists method newBlock' ); - $r = new ReflectionMethod('TemplatePower', 'newBlock'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'blockname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers TemplatePower::assignGlobal - * @todo Implement testassignGlobal(). - */ - public function testassignGlobal() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignGlobal', $methods ), 'exists method assignGlobal' ); - $r = new ReflectionMethod('TemplatePower', 'assignGlobal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'varname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers TemplatePower::assign - * @todo Implement testassign(). - */ - public function testassign() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assign', $methods ), 'exists method assign' ); - $r = new ReflectionMethod('TemplatePower', 'assign'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'varname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers TemplatePower::gotoBlock - * @todo Implement testgotoBlock(). - */ - public function testgotoBlock() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('gotoBlock', $methods ), 'exists method gotoBlock' ); - $r = new ReflectionMethod('TemplatePower', 'gotoBlock'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'blockname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers TemplatePower::getVarValue - * @todo Implement testgetVarValue(). - */ - public function testgetVarValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVarValue', $methods ), 'exists method getVarValue' ); - $r = new ReflectionMethod('TemplatePower', 'getVarValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'varname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers TemplatePower::printToScreen - * @todo Implement testprintToScreen(). - */ - public function testprintToScreen() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printToScreen', $methods ), 'exists method printToScreen' ); - $r = new ReflectionMethod('TemplatePower', 'printToScreen'); - $params = $r->getParameters(); - } - - /** - * @covers TemplatePower::getOutputContent - * @todo Implement testgetOutputContent(). - */ - public function testgetOutputContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOutputContent', $methods ), 'exists method getOutputContent' ); - $r = new ReflectionMethod('TemplatePower', 'getOutputContent'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classTreeTest.php b/tests/automated/gulliver/system/classTreeTest.php deleted file mode 100644 index 524ef02ad..000000000 --- a/tests/automated/gulliver/system/classTreeTest.php +++ /dev/null @@ -1,135 +0,0 @@ -object = new Tree(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Tree'); $this->assertTrue( count($methods) == 14); - } - - /** - * @covers Tree::Tree - * @todo Implement testTree(). - */ - public function testTree() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Tree', $methods ), 'exists method Tree' ); - $r = new ReflectionMethod('Tree', 'Tree'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlnode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Tree::addChild - * @todo Implement testaddChild(). - */ - public function testaddChild() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addChild', $methods ), 'exists method addChild' ); - $r = new ReflectionMethod('Tree', 'addChild'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'label'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'attributes'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == Array()); - } - - /** - * @covers Tree::printPlus - * @todo Implement testprintPlus(). - */ - public function testprintPlus() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printPlus', $methods ), 'exists method printPlus' ); - $r = new ReflectionMethod('Tree', 'printPlus'); - $params = $r->getParameters(); - } - - /** - * @covers Tree::printLabel - * @todo Implement testprintLabel(). - */ - public function testprintLabel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printLabel', $methods ), 'exists method printLabel' ); - $r = new ReflectionMethod('Tree', 'printLabel'); - $params = $r->getParameters(); - } - - /** - * @covers Tree::printContent - * @todo Implement testprintContent(). - */ - public function testprintContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printContent', $methods ), 'exists method printContent' ); - $r = new ReflectionMethod('Tree', 'printContent'); - $params = $r->getParameters(); - } - - /** - * @covers Tree::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('Tree', 'render'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classXmlFormTest.php b/tests/automated/gulliver/system/classXmlFormTest.php deleted file mode 100644 index 7e3f58dc2..000000000 --- a/tests/automated/gulliver/system/classXmlFormTest.php +++ /dev/null @@ -1,116 +0,0 @@ -object = new XmlForm(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers XmlForm::parseFile - * @todo Implement testparseFile(). - */ - public function testparseFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' ); - $r = new ReflectionMethod('XmlForm', 'parseFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'forceParse'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers XmlForm::setValues - * @todo Implement testsetValues(). - */ - public function testsetValues() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setValues', $methods ), 'exists method setValues' ); - $r = new ReflectionMethod('XmlForm', 'setValues'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newValues'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - } - - /** - * @covers XmlForm::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'scriptContent'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm::cloneObject - * @todo Implement testcloneObject(). - */ - public function testcloneObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('cloneObject', $methods ), 'exists method cloneObject' ); - $r = new ReflectionMethod('XmlForm', 'cloneObject'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_FieldTest.php b/tests/automated/gulliver/system/classXmlForm_FieldTest.php deleted file mode 100644 index aae7d36b4..000000000 --- a/tests/automated/gulliver/system/classXmlForm_FieldTest.php +++ /dev/null @@ -1,460 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field::XmlForm_Field - * @todo Implement testXmlForm_Field(). - */ - public function testXmlForm_Field() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field', $methods ), 'exists method XmlForm_Field' ); - $r = new ReflectionMethod('XmlForm_Field', 'XmlForm_Field'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlNode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'en'); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'owner'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field::executeSQL - * @todo Implement testexecuteSQL(). - */ - public function testexecuteSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeSQL', $methods ), 'exists method executeSQL' ); - $r = new ReflectionMethod('XmlForm_Field', 'executeSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'owner'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'row'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '-1'); - } - - /** - * @covers XmlForm_Field::htmlentities - * @todo Implement testhtmlentities(). - */ - public function testhtmlentities() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('htmlentities', $methods ), 'exists method htmlentities' ); - $r = new ReflectionMethod('XmlForm_Field', 'htmlentities'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'flags'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '3'); - $this->assertTrue( $params[2]->getName() == 'encoding'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'utf-8'); - } - - /** - * @covers XmlForm_Field::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'therow'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '-1'); - } - - /** - * @covers XmlForm_Field::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('XmlForm_Field', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::dependentOf - * @todo Implement testdependentOf(). - */ - public function testdependentOf() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dependentOf', $methods ), 'exists method dependentOf' ); - $r = new ReflectionMethod('XmlForm_Field', 'dependentOf'); - $params = $r->getParameters(); - } - - /** - * @covers XmlForm_Field::mask - * @todo Implement testmask(). - */ - public function testmask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('mask', $methods ), 'exists method mask' ); - $r = new ReflectionMethod('XmlForm_Field', 'mask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'format'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field::getAttributes - * @todo Implement testgetAttributes(). - */ - public function testgetAttributes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAttributes', $methods ), 'exists method getAttributes' ); - $r = new ReflectionMethod('XmlForm_Field', 'getAttributes'); - $params = $r->getParameters(); - } - - /** - * @covers XmlForm_Field::getEvents - * @todo Implement testgetEvents(). - */ - public function testgetEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getEvents', $methods ), 'exists method getEvents' ); - $r = new ReflectionMethod('XmlForm_Field', 'getEvents'); - $params = $r->getParameters(); - } - - /** - * @covers XmlForm_Field::attachEvents - * @todo Implement testattachEvents(). - */ - public function testattachEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' ); - $r = new ReflectionMethod('XmlForm_Field', 'attachEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'elementRef'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field::createXmlNode - * @todo Implement testcreateXmlNode(). - */ - public function testcreateXmlNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createXmlNode', $methods ), 'exists method createXmlNode' ); - $r = new ReflectionMethod('XmlForm_Field', 'createXmlNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'includeDefaultValues'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::updateXmlNode - * @todo Implement testupdateXmlNode(). - */ - public function testupdateXmlNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateXmlNode', $methods ), 'exists method updateXmlNode' ); - $r = new ReflectionMethod('XmlForm_Field', 'updateXmlNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'includeDefaultValues'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::getXmlAttributes - * @todo Implement testgetXmlAttributes(). - */ - public function testgetXmlAttributes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXmlAttributes', $methods ), 'exists method getXmlAttributes' ); - $r = new ReflectionMethod('XmlForm_Field', 'getXmlAttributes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'includeDefaultValues'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::maskValue - * @todo Implement testmaskValue(). - */ - public function testmaskValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' ); - $r = new ReflectionMethod('XmlForm_Field', 'maskValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field::cloneObject - * @todo Implement testcloneObject(). - */ - public function testcloneObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('cloneObject', $methods ), 'exists method cloneObject' ); - $r = new ReflectionMethod('XmlForm_Field', 'cloneObject'); - $params = $r->getParameters(); - } - - /** - * @covers XmlForm_Field::getPMTableValue - * @todo Implement testgetPMTableValue(). - */ - public function testgetPMTableValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPMTableValue', $methods ), 'exists method getPMTableValue' ); - $r = new ReflectionMethod('XmlForm_Field', 'getPMTableValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oOwner'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field::NSRequiredValue - * @todo Implement testNSRequiredValue(). - */ - public function testNSRequiredValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('NSRequiredValue', $methods ), 'exists method NSRequiredValue' ); - $r = new ReflectionMethod('XmlForm_Field', 'NSRequiredValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'show'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::NSGridLabel - * @todo Implement testNSGridLabel(). - */ - public function testNSGridLabel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('NSGridLabel', $methods ), 'exists method NSGridLabel' ); - $r = new ReflectionMethod('XmlForm_Field', 'NSGridLabel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'show'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::NSDefaultValue - * @todo Implement testNSDefaultValue(). - */ - public function testNSDefaultValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('NSDefaultValue', $methods ), 'exists method NSDefaultValue' ); - $r = new ReflectionMethod('XmlForm_Field', 'NSDefaultValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'show'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::NSGridType - * @todo Implement testNSGridType(). - */ - public function testNSGridType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('NSGridType', $methods ), 'exists method NSGridType' ); - $r = new ReflectionMethod('XmlForm_Field', 'NSGridType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'show'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::NSDependentFields - * @todo Implement testNSDependentFields(). - */ - public function testNSDependentFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('NSDependentFields', $methods ), 'exists method NSDependentFields' ); - $r = new ReflectionMethod('XmlForm_Field', 'NSDependentFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'show'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field::renderHint - * @todo Implement testrenderHint(). - */ - public function testrenderHint() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderHint', $methods ), 'exists method renderHint' ); - $r = new ReflectionMethod('XmlForm_Field', 'renderHint'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_ButtonTest.php b/tests/automated/gulliver/system/classXmlForm_Field_ButtonTest.php deleted file mode 100644 index 46513cb28..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_ButtonTest.php +++ /dev/null @@ -1,71 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Button($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Button'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Button::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Button', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CaptionCurrencyTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CaptionCurrencyTest.php deleted file mode 100644 index 292de60d7..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CaptionCurrencyTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_CaptionCurrency($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_CaptionCurrency'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_CaptionCurrency::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_CaptionCurrency', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CaptionPercentageTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CaptionPercentageTest.php deleted file mode 100644 index fbc087796..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CaptionPercentageTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_CaptionPercentage($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_CaptionPercentage'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_CaptionPercentage::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_CaptionPercentage', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CaptionTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CaptionTest.php deleted file mode 100644 index 7ded70dfb..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CaptionTest.php +++ /dev/null @@ -1,105 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Caption($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Caption'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Caption::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_Caption', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Caption::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Caption', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'rowId'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'onlyValue'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'row'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '-1'); - $this->assertTrue( $params[5]->getName() == 'therow'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == '-1'); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupTest.php deleted file mode 100644 index 87e8df3d8..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupTest.php +++ /dev/null @@ -1,71 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_CheckGroup($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_CheckGroup'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_CheckGroup::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_CheckGroup', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupViewTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupViewTest.php deleted file mode 100644 index d338e4074..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CheckGroupViewTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_CheckGroupView($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_CheckGroupView'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_CheckGroupView::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_CheckGroupView', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_Checkbox2Test.php b/tests/automated/gulliver/system/classXmlForm_Field_Checkbox2Test.php deleted file mode 100644 index 8e7beaf65..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_Checkbox2Test.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Checkbox2($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Checkbox2'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Checkbox2::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Checkbox2', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CheckboxTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CheckboxTest.php deleted file mode 100644 index 4e5e8ae4a..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CheckboxTest.php +++ /dev/null @@ -1,107 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Checkbox($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Checkbox'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Checkbox::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Checkbox', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Checkbox::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Checkbox', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Checkbox::maskValue - * @todo Implement testmaskValue(). - */ - public function testmaskValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' ); - $r = new ReflectionMethod('XmlForm_Field_Checkbox', 'maskValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CheckboxptTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CheckboxptTest.php deleted file mode 100644 index 74382aed7..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CheckboxptTest.php +++ /dev/null @@ -1,107 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Checkboxpt($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Checkboxpt'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Checkboxpt::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Checkboxpt::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Checkboxpt::maskValue - * @todo Implement testmaskValue(). - */ - public function testmaskValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' ); - $r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'maskValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_CurrencyTest.php b/tests/automated/gulliver/system/classXmlForm_Field_CurrencyTest.php deleted file mode 100644 index c83d34f1b..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_CurrencyTest.php +++ /dev/null @@ -1,89 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Currency($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Currency'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Currency::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Currency', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Currency::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Currency', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_DVEditorTest.php b/tests/automated/gulliver/system/classXmlForm_Field_DVEditorTest.php deleted file mode 100644 index e20918e3b..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_DVEditorTest.php +++ /dev/null @@ -1,85 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_DVEditor($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_DVEditor'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_DVEditor::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_DVEditor', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_DVEditor::attachEvents - * @todo Implement testattachEvents(). - */ - public function testattachEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' ); - $r = new ReflectionMethod('XmlForm_Field_DVEditor', 'attachEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'element'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_Date2Test.php b/tests/automated/gulliver/system/classXmlForm_Field_Date2Test.php deleted file mode 100644 index fecb689a4..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_Date2Test.php +++ /dev/null @@ -1,143 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Date2($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Date2'); $this->assertTrue( count($methods) == 28); - } - - /** - * @covers XmlForm_Field_Date2::verifyDateFormat - * @todo Implement testverifyDateFormat(). - */ - public function testverifyDateFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date2', 'verifyDateFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date2::isvalidBeforeFormat - * @todo Implement testisvalidBeforeFormat(). - */ - public function testisvalidBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date2', 'isvalidBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date2::calculateBeforeFormat - * @todo Implement testcalculateBeforeFormat(). - */ - public function testcalculateBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date2', 'calculateBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sign'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date2::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Date2', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date2::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Date2', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_Date5Test.php b/tests/automated/gulliver/system/classXmlForm_Field_Date5Test.php deleted file mode 100644 index a85dd6694..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_Date5Test.php +++ /dev/null @@ -1,187 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Date5($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Date5'); $this->assertTrue( count($methods) == 30); - } - - /** - * @covers XmlForm_Field_Date5::verifyDateFormat - * @todo Implement testverifyDateFormat(). - */ - public function testverifyDateFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'verifyDateFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'mask'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date5::isvalidBeforeFormat - * @todo Implement testisvalidBeforeFormat(). - */ - public function testisvalidBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'isvalidBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date5::calculateBeforeFormat - * @todo Implement testcalculateBeforeFormat(). - */ - public function testcalculateBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'calculateBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sign'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date5::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date5::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date5::__draw_widget - * @todo Implement test__draw_widget(). - */ - public function test__draw_widget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__draw_widget', $methods ), 'exists method __draw_widget' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', '__draw_widget'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'owner'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date5::getSplitDate - * @todo Implement testgetSplitDate(). - */ - public function testgetSplitDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSplitDate', $methods ), 'exists method getSplitDate' ); - $r = new ReflectionMethod('XmlForm_Field_Date5', 'getSplitDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'mask'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_DateTest.php b/tests/automated/gulliver/system/classXmlForm_Field_DateTest.php deleted file mode 100644 index 62ef67d2c..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_DateTest.php +++ /dev/null @@ -1,165 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Date($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Date'); $this->assertTrue( count($methods) == 29); - } - - /** - * @covers XmlForm_Field_Date::verifyDateFormat - * @todo Implement testverifyDateFormat(). - */ - public function testverifyDateFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date', 'verifyDateFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date::isvalidBeforeFormat - * @todo Implement testisvalidBeforeFormat(). - */ - public function testisvalidBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date', 'isvalidBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date::calculateBeforeFormat - * @todo Implement testcalculateBeforeFormat(). - */ - public function testcalculateBeforeFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' ); - $r = new ReflectionMethod('XmlForm_Field_Date', 'calculateBeforeFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sign'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Date::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Date', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Date', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Date::__draw_widget - * @todo Implement test__draw_widget(). - */ - public function test__draw_widget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__draw_widget', $methods ), 'exists method __draw_widget' ); - $r = new ReflectionMethod('XmlForm_Field_Date', '__draw_widget'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'owner'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_DateViewTest.php b/tests/automated/gulliver/system/classXmlForm_Field_DateViewTest.php deleted file mode 100644 index 79dca5b46..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_DateViewTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_DateView($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_DateView'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_DateView::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_DateView', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_DropdownTest.php b/tests/automated/gulliver/system/classXmlForm_Field_DropdownTest.php deleted file mode 100644 index afc46f48e..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_DropdownTest.php +++ /dev/null @@ -1,133 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Dropdown($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Dropdown'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Dropdown::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_Dropdown', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Dropdown::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Dropdown', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'rowId'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'onlyValue'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'row'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '-1'); - $this->assertTrue( $params[5]->getName() == 'therow'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == '-1'); - } - - /** - * @covers XmlForm_Field_Dropdown::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Dropdown', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'onlyValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'therow'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '-1'); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_DropdownptTest.php b/tests/automated/gulliver/system/classXmlForm_Field_DropdownptTest.php deleted file mode 100644 index f3520e06d..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_DropdownptTest.php +++ /dev/null @@ -1,89 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Dropdownpt($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Dropdownpt'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Dropdownpt::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Dropdownpt', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Dropdownpt::maskValue - * @todo Implement testmaskValue(). - */ - public function testmaskValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' ); - $r = new ReflectionMethod('XmlForm_Field_Dropdownpt', 'maskValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_FastSearchTest.php b/tests/automated/gulliver/system/classXmlForm_Field_FastSearchTest.php deleted file mode 100644 index 2cafcce4e..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_FastSearchTest.php +++ /dev/null @@ -1,51 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_FastSearch($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_FastSearch'); $this->assertTrue( count($methods) == 25); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_FileTest.php b/tests/automated/gulliver/system/classXmlForm_Field_FileTest.php deleted file mode 100644 index b2662d08c..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_FileTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_File($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_File'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_File::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_File', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_GridTest.php b/tests/automated/gulliver/system/classXmlForm_Field_GridTest.php deleted file mode 100644 index cacd36de7..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_GridTest.php +++ /dev/null @@ -1,147 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Grid($fieldNode,'param', 'param'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Grid'); $this->assertTrue( count($methods) == 28); - } - - /** - * @covers XmlForm_Field_Grid::XmlForm_Field_Grid - * @todo Implement testXmlForm_Field_Grid(). - */ - public function testXmlForm_Field_Grid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field_Grid', $methods ), 'exists method XmlForm_Field_Grid' ); - $r = new ReflectionMethod('XmlForm_Field_Grid', 'XmlForm_Field_Grid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlnode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Grid::parseFile - * @todo Implement testparseFile(). - */ - public function testparseFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' ); - $r = new ReflectionMethod('XmlForm_Field_Grid', 'parseFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'home'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Grid::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Grid', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Grid::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Grid', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'therow'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '-1'); - } - - /** - * @covers XmlForm_Field_Grid::flipValues - * @todo Implement testflipValues(). - */ - public function testflipValues() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('flipValues', $methods ), 'exists method flipValues' ); - $r = new ReflectionMethod('XmlForm_Field_Grid', 'flipValues'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arrayData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_HiddenTest.php b/tests/automated/gulliver/system/classXmlForm_Field_HiddenTest.php deleted file mode 100644 index 34339f065..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_HiddenTest.php +++ /dev/null @@ -1,105 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Hidden($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Hidden'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Hidden::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Hidden', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Hidden::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Hidden', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Hidden::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('XmlForm_Field_Hidden', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_ImageTest.php b/tests/automated/gulliver/system/classXmlForm_Field_ImageTest.php deleted file mode 100644 index 99326b5c0..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_ImageTest.php +++ /dev/null @@ -1,70 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Image($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Image'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Image::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Image', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_JavaScriptTest.php b/tests/automated/gulliver/system/classXmlForm_Field_JavaScriptTest.php deleted file mode 100644 index a327030cb..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_JavaScriptTest.php +++ /dev/null @@ -1,127 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_JavaScript($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_JavaScript'); $this->assertTrue( count($methods) == 26); - } - - /** - * @covers XmlForm_Field_JavaScript::XmlForm_Field_JavaScript - * @todo Implement testXmlForm_Field_JavaScript(). - */ - public function testXmlForm_Field_JavaScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field_JavaScript', $methods ), 'exists method XmlForm_Field_JavaScript' ); - $r = new ReflectionMethod('XmlForm_Field_JavaScript', 'XmlForm_Field_JavaScript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlNode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'en'); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_JavaScript::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_JavaScript', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_JavaScript::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_JavaScript', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_JavaScript::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_JavaScript', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_LabelTest.php b/tests/automated/gulliver/system/classXmlForm_Field_LabelTest.php deleted file mode 100644 index fda485b6b..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_LabelTest.php +++ /dev/null @@ -1,51 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Label($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Label'); $this->assertTrue( count($methods) == 25); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_LinkTest.php b/tests/automated/gulliver/system/classXmlForm_Field_LinkTest.php deleted file mode 100644 index 9e14a6dd6..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_LinkTest.php +++ /dev/null @@ -1,123 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Link($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Link'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Link::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Link', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == null); - $this->assertTrue( $params[1]->getName() == 'label'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == null); - $this->assertTrue( $params[2]->getName() == 'owner'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == null); - $this->assertTrue( $params[3]->getName() == 'row'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == -1); - } - - /** - * @covers XmlForm_Field_Link::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Link', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - $this->assertTrue( $params[1]->getName() == 'label'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - $this->assertTrue( $params[2]->getName() == 'owner'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Link::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('XmlForm_Field_Link', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_ListboxTest.php b/tests/automated/gulliver/system/classXmlForm_Field_ListboxTest.php deleted file mode 100644 index 27b73a967..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_ListboxTest.php +++ /dev/null @@ -1,109 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Listbox($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Listbox'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Listbox::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_Listbox', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Listbox::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Listbox', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Listbox::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Listbox', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_PasswordTest.php b/tests/automated/gulliver/system/classXmlForm_Field_PasswordTest.php deleted file mode 100644 index 73c4a63c3..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_PasswordTest.php +++ /dev/null @@ -1,67 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Password($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Password'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Password::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Password', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_PercentageTest.php b/tests/automated/gulliver/system/classXmlForm_Field_PercentageTest.php deleted file mode 100644 index e77fed57b..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_PercentageTest.php +++ /dev/null @@ -1,71 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Percentage($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Percentage'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Percentage::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Percentage', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_PrintTest.php b/tests/automated/gulliver/system/classXmlForm_Field_PrintTest.php deleted file mode 100644 index 4d45886e7..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_PrintTest.php +++ /dev/null @@ -1,71 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Print($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Print'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Print::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Print', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupTest.php b/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupTest.php deleted file mode 100644 index 349278094..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupTest.php +++ /dev/null @@ -1,87 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_RadioGroup($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_RadioGroup'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_RadioGroup::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_RadioGroup', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_RadioGroup::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_RadioGroup', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupViewTest.php b/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupViewTest.php deleted file mode 100644 index 238ce9b38..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_RadioGroupViewTest.php +++ /dev/null @@ -1,71 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_RadioGroupView($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_RadioGroupView'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_RadioGroupView::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_RadioGroupView', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_ResetTest.php b/tests/automated/gulliver/system/classXmlForm_Field_ResetTest.php deleted file mode 100644 index 021550951..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_ResetTest.php +++ /dev/null @@ -1,69 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Reset($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Reset'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Reset::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Reset', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_SimpleTextTest.php b/tests/automated/gulliver/system/classXmlForm_Field_SimpleTextTest.php deleted file mode 100644 index 74933b006..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_SimpleTextTest.php +++ /dev/null @@ -1,87 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_SimpleText($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_SimpleText'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_SimpleText::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_SimpleText', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_SimpleText::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_SimpleText', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_SubmitTest.php b/tests/automated/gulliver/system/classXmlForm_Field_SubmitTest.php deleted file mode 100644 index bd5a5265f..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_SubmitTest.php +++ /dev/null @@ -1,69 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Submit($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Submit'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Submit::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Submit', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_SubtitleTest.php b/tests/automated/gulliver/system/classXmlForm_Field_SubtitleTest.php deleted file mode 100644 index fbade10f4..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_SubtitleTest.php +++ /dev/null @@ -1,82 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Subtitle($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Subtitle'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Subtitle::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Subtitle', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Subtitle::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_Subtitle', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_SuggestTest.php b/tests/automated/gulliver/system/classXmlForm_Field_SuggestTest.php deleted file mode 100644 index 9d4fd1b48..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_SuggestTest.php +++ /dev/null @@ -1,107 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Suggest($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Suggest'); $this->assertTrue( count($methods) == 26); - } - - /** - * @covers XmlForm_Field_Suggest::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Suggest', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Suggest::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Suggest', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Suggest::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('XmlForm_Field_Suggest', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_TextTest.php b/tests/automated/gulliver/system/classXmlForm_Field_TextTest.php deleted file mode 100644 index 9ea9e8e6e..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_TextTest.php +++ /dev/null @@ -1,107 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Text($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Text'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Text::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Text', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_Text::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Text', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Text::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('XmlForm_Field_Text', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_TextareaTest.php b/tests/automated/gulliver/system/classXmlForm_Field_TextareaTest.php deleted file mode 100644 index be5ed50e1..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_TextareaTest.php +++ /dev/null @@ -1,87 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Textarea($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Textarea'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Textarea::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Textarea', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Textarea::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_Textarea', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_TitleTest.php b/tests/automated/gulliver/system/classXmlForm_Field_TitleTest.php deleted file mode 100644 index 80867dcd1..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_TitleTest.php +++ /dev/null @@ -1,84 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_Title($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Title'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_Title::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Title', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_Title::validateValue - * @todo Implement testvalidateValue(). - */ - public function testvalidateValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' ); - $r = new ReflectionMethod('XmlForm_Field_Title', 'validateValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_XmlMenuTest.php b/tests/automated/gulliver/system/classXmlForm_Field_XmlMenuTest.php deleted file mode 100644 index aee17d13d..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_XmlMenuTest.php +++ /dev/null @@ -1,105 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_XmlMenu($fieldNode,'lang','home','owner'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_XmlMenu'); $this->assertTrue( count($methods) == 26); - } - - /** - * @covers XmlForm_Field_XmlMenu::XmlForm_Field_XmlMenu - * @todo Implement testXmlForm_Field_XmlMenu(). - */ - public function testXmlForm_Field_XmlMenu() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field_XmlMenu', $methods ), 'exists method XmlForm_Field_XmlMenu' ); - $r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'XmlForm_Field_XmlMenu'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlNode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[3]->getName() == 'owner'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - } - - /** - * @covers XmlForm_Field_XmlMenu::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_XmlMenu::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_XmlformTest.php b/tests/automated/gulliver/system/classXmlForm_Field_XmlformTest.php deleted file mode 100644 index 40790cb40..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_XmlformTest.php +++ /dev/null @@ -1,106 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $file = PATH_TRUNK . 'workflow/engine/xmlform/login/login'; - $this->object = new XmlForm_Field_Xmlform($fieldNode,'lang',$file,'owner'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_Xmlform'); $this->assertTrue( count($methods) == 27); - } - - /** - * @covers XmlForm_Field_Xmlform::XmlForm_Field_Xmlform - * @todo Implement testXmlForm_Field_Xmlform(). - */ - public function testXmlForm_Field_Xmlform() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field_Xmlform', $methods ), 'exists method XmlForm_Field_Xmlform' ); - $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'XmlForm_Field_Xmlform'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlnode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Xmlform::parseFile - * @todo Implement testparseFile(). - */ - public function testparseFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' ); - $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'parseFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'home'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'language'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_Xmlform::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_YesNoTest.php b/tests/automated/gulliver/system/classXmlForm_Field_YesNoTest.php deleted file mode 100644 index 0d299111a..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_YesNoTest.php +++ /dev/null @@ -1,89 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_YesNo($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_YesNo'); $this->assertTrue( count($methods) == 25); - } - - /** - * @covers XmlForm_Field_YesNo::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_YesNo', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_YesNo::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_YesNo', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - } diff --git a/tests/automated/gulliver/system/classXmlForm_Field_cellMarkTest.php b/tests/automated/gulliver/system/classXmlForm_Field_cellMarkTest.php deleted file mode 100644 index 2853e8789..000000000 --- a/tests/automated/gulliver/system/classXmlForm_Field_cellMarkTest.php +++ /dev/null @@ -1,87 +0,0 @@ -'input'); - $fieldNode = new Xml_Node('testField', 'type', 'value', $attributes); - $this->object = new XmlForm_Field_cellMark($fieldNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_cellMark'); $this->assertTrue( count($methods) == 27); - } - - /** - * @covers XmlForm_Field_cellMark::tdStyle - * @todo Implement testtdStyle(). - */ - public function testtdStyle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('tdStyle', $methods ), 'exists method tdStyle' ); - $r = new ReflectionMethod('XmlForm_Field_cellMark', 'tdStyle'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_cellMark::tdClass - * @todo Implement testtdClass(). - */ - public function testtdClass() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('tdClass', $methods ), 'exists method tdClass' ); - $r = new ReflectionMethod('XmlForm_Field_cellMark', 'tdClass'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classXml_NodeTest.php b/tests/automated/gulliver/system/classXml_NodeTest.php deleted file mode 100644 index 2af6ebb4b..000000000 --- a/tests/automated/gulliver/system/classXml_NodeTest.php +++ /dev/null @@ -1,178 +0,0 @@ -object = new Xml_Node($name, $type, $value, $attributes = array()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Xml_Node'); $this->assertTrue( count($methods) == 8); - } - - /** - * @covers Xml_Node::Xml_Node - * @todo Implement testXml_Node(). - */ - public function testXml_Node() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Xml_Node', $methods ), 'exists method Xml_Node' ); - $r = new ReflectionMethod('Xml_Node', 'Xml_Node'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'value'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'attributes'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == array()); - } - - /** - * @covers Xml_Node::addAttribute - * @todo Implement testaddAttribute(). - */ - public function testaddAttribute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addAttribute', $methods ), 'exists method addAttribute' ); - $r = new ReflectionMethod('Xml_Node', 'addAttribute'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Xml_Node::addChildNode - * @todo Implement testaddChildNode(). - */ - public function testaddChildNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addChildNode', $methods ), 'exists method addChildNode' ); - $r = new ReflectionMethod('Xml_Node', 'addChildNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'childNode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Xml_Node::toTree - * @todo Implement testtoTree(). - */ - public function testtoTree() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toTree', $methods ), 'exists method toTree' ); - $r = new ReflectionMethod('Xml_Node', 'toTree'); - $params = $r->getParameters(); - } - - /** - * @covers Xml_Node::toArray - * @todo Implement testtoArray(). - */ - public function testtoArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toArray', $methods ), 'exists method toArray' ); - $r = new ReflectionMethod('Xml_Node', 'toArray'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'obj'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Xml_Node::findNode - * @todo Implement testfindNode(). - */ - public function testfindNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' ); - $r = new ReflectionMethod('Xml_Node', 'findNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xpath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Xml_Node::getXML - * @todo Implement testgetXML(). - */ - public function testgetXML() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' ); - $r = new ReflectionMethod('Xml_Node', 'getXML'); - $params = $r->getParameters(); - } - - /** - * @covers Xml_Node::getCDATAValue - * @todo Implement testgetCDATAValue(). - */ - public function testgetCDATAValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCDATAValue', $methods ), 'exists method getCDATAValue' ); - $r = new ReflectionMethod('Xml_Node', 'getCDATAValue'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classXml_documentTest.php b/tests/automated/gulliver/system/classXml_documentTest.php deleted file mode 100644 index 41dca49d6..000000000 --- a/tests/automated/gulliver/system/classXml_documentTest.php +++ /dev/null @@ -1,122 +0,0 @@ -object = new Xml_document(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Xml_document'); $this->assertTrue( count($methods) == 11); - } - - /** - * @covers Xml_document::Xml_document - * @todo Implement testXml_document(). - */ - public function testXml_document() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Xml_document', $methods ), 'exists method Xml_document' ); - $r = new ReflectionMethod('Xml_document', 'Xml_document'); - $params = $r->getParameters(); - } - - /** - * @covers Xml_document::parseXmlFile - * @todo Implement testparseXmlFile(). - */ - public function testparseXmlFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseXmlFile', $methods ), 'exists method parseXmlFile' ); - $r = new ReflectionMethod('Xml_document', 'parseXmlFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'content'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Xml_document::findNode - * @todo Implement testfindNode(). - */ - public function testfindNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' ); - $r = new ReflectionMethod('Xml_document', 'findNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xpath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Xml_document::getXML - * @todo Implement testgetXML(). - */ - public function testgetXML() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' ); - $r = new ReflectionMethod('Xml_document', 'getXML'); - $params = $r->getParameters(); - } - - /** - * @covers Xml_document::save - * @todo Implement testsave(). - */ - public function testsave() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('save', $methods ), 'exists method save' ); - $r = new ReflectionMethod('Xml_document', 'save'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classdatabase_baseTest.php b/tests/automated/gulliver/system/classdatabase_baseTest.php deleted file mode 100644 index b837e0637..000000000 --- a/tests/automated/gulliver/system/classdatabase_baseTest.php +++ /dev/null @@ -1,201 +0,0 @@ -object = new database_base(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('database_base'); $this->assertTrue( count($methods) == 8); - } - - /** - * @covers database_base::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('database_base', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sType'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == DB_ADAPTER); - $this->assertTrue( $params[1]->getName() == 'sServer'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == DB_HOST); - $this->assertTrue( $params[2]->getName() == 'sUser'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == DB_USER); - $this->assertTrue( $params[3]->getName() == 'sPass'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == DB_PASS); - $this->assertTrue( $params[4]->getName() == 'sDataBase'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == DB_NAME); - } - - /** - * @covers database_base::generateDropTableSQL - * @todo Implement testgenerateDropTableSQL(). - */ - public function testgenerateDropTableSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateDropTableSQL', $methods ), 'exists method generateDropTableSQL' ); - $r = new ReflectionMethod('database_base', 'generateDropTableSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers database_base::generateCreateTableSQL - * @todo Implement testgenerateCreateTableSQL(). - */ - public function testgenerateCreateTableSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateCreateTableSQL', $methods ), 'exists method generateCreateTableSQL' ); - $r = new ReflectionMethod('database_base', 'generateCreateTableSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aColumns'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers database_base::generateDropColumnSQL - * @todo Implement testgenerateDropColumnSQL(). - */ - public function testgenerateDropColumnSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateDropColumnSQL', $methods ), 'exists method generateDropColumnSQL' ); - $r = new ReflectionMethod('database_base', 'generateDropColumnSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sColumn'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers database_base::generateAddColumnSQL - * @todo Implement testgenerateAddColumnSQL(). - */ - public function testgenerateAddColumnSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateAddColumnSQL', $methods ), 'exists method generateAddColumnSQL' ); - $r = new ReflectionMethod('database_base', 'generateAddColumnSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sColumn'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'aParameters'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers database_base::generateChangeColumnSQL - * @todo Implement testgenerateChangeColumnSQL(). - */ - public function testgenerateChangeColumnSQL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateChangeColumnSQL', $methods ), 'exists method generateChangeColumnSQL' ); - $r = new ReflectionMethod('database_base', 'generateChangeColumnSQL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sColumn'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'aParameters'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers database_base::executeQuery - * @todo Implement testexecuteQuery(). - */ - public function testexecuteQuery() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeQuery', $methods ), 'exists method executeQuery' ); - $r = new ReflectionMethod('database_base', 'executeQuery'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sQuery'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers database_base::close - * @todo Implement testclose(). - */ - public function testclose() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('close', $methods ), 'exists method close' ); - $r = new ReflectionMethod('database_base', 'close'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classdynaFormHandlerTest.php b/tests/automated/gulliver/system/classdynaFormHandlerTest.php deleted file mode 100644 index bd7d2ea05..000000000 --- a/tests/automated/gulliver/system/classdynaFormHandlerTest.php +++ /dev/null @@ -1,444 +0,0 @@ -object = new dynaFormHandler($file); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dynaFormHandler'); $this->assertTrue( count($methods) == 24); - } - - /** - * @covers dynaFormHandler::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('dynaFormHandler', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('dynaFormHandler', 'load'); - $params = $r->getParameters(); - } - - /** - * @covers dynaFormHandler::reload - * @todo Implement testreload(). - */ - public function testreload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reload', $methods ), 'exists method reload' ); - $r = new ReflectionMethod('dynaFormHandler', 'reload'); - $params = $r->getParameters(); - } - - /** - * @covers dynaFormHandler::__cloneEmpty - * @todo Implement test__cloneEmpty(). - */ - public function test__cloneEmpty() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__cloneEmpty', $methods ), 'exists method __cloneEmpty' ); - $r = new ReflectionMethod('dynaFormHandler', '__cloneEmpty'); - $params = $r->getParameters(); - } - - /** - * @covers dynaFormHandler::toString - * @todo Implement testtoString(). - */ - public function testtoString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toString', $methods ), 'exists method toString' ); - $r = new ReflectionMethod('dynaFormHandler', 'toString'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'op'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::getNode - * @todo Implement testgetNode(). - */ - public function testgetNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNode', $methods ), 'exists method getNode' ); - $r = new ReflectionMethod('dynaFormHandler', 'getNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'nodename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::setNode - * @todo Implement testsetNode(). - */ - public function testsetNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setNode', $methods ), 'exists method setNode' ); - $r = new ReflectionMethod('dynaFormHandler', 'setNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::add - * @todo Implement testadd(). - */ - public function testadd() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add', $methods ), 'exists method add' ); - $r = new ReflectionMethod('dynaFormHandler', 'add'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'attributes'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'childs'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'childs_childs'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::replace - * @todo Implement testreplace(). - */ - public function testreplace() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('replace', $methods ), 'exists method replace' ); - $r = new ReflectionMethod('dynaFormHandler', 'replace'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'replaced'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'name'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'attributes'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'childs'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'childs_childs'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::save - * @todo Implement testsave(). - */ - public function testsave() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('save', $methods ), 'exists method save' ); - $r = new ReflectionMethod('dynaFormHandler', 'save'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'fname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::fixXmlFile - * @todo Implement testfixXmlFile(). - */ - public function testfixXmlFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fixXmlFile', $methods ), 'exists method fixXmlFile' ); - $r = new ReflectionMethod('dynaFormHandler', 'fixXmlFile'); - $params = $r->getParameters(); - } - - /** - * @covers dynaFormHandler::setHeaderAttribute - * @todo Implement testsetHeaderAttribute(). - */ - public function testsetHeaderAttribute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setHeaderAttribute', $methods ), 'exists method setHeaderAttribute' ); - $r = new ReflectionMethod('dynaFormHandler', 'setHeaderAttribute'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'att_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'att_value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::modifyHeaderAttribute - * @todo Implement testmodifyHeaderAttribute(). - */ - public function testmodifyHeaderAttribute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('modifyHeaderAttribute', $methods ), 'exists method modifyHeaderAttribute' ); - $r = new ReflectionMethod('dynaFormHandler', 'modifyHeaderAttribute'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'att_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'att_new_value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::updateAttribute - * @todo Implement testupdateAttribute(). - */ - public function testupdateAttribute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateAttribute', $methods ), 'exists method updateAttribute' ); - $r = new ReflectionMethod('dynaFormHandler', 'updateAttribute'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'att_name'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'att_new_value'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::remove - * @todo Implement testremove(). - */ - public function testremove() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('remove', $methods ), 'exists method remove' ); - $r = new ReflectionMethod('dynaFormHandler', 'remove'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'v'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::nodeExists - * @todo Implement testnodeExists(). - */ - public function testnodeExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('nodeExists', $methods ), 'exists method nodeExists' ); - $r = new ReflectionMethod('dynaFormHandler', 'nodeExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::moveUp - * @todo Implement testmoveUp(). - */ - public function testmoveUp() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('moveUp', $methods ), 'exists method moveUp' ); - $r = new ReflectionMethod('dynaFormHandler', 'moveUp'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'selected_node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::moveDown - * @todo Implement testmoveDown(). - */ - public function testmoveDown() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('moveDown', $methods ), 'exists method moveDown' ); - $r = new ReflectionMethod('dynaFormHandler', 'moveDown'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'selected_node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::getFields - * @todo Implement testgetFields(). - */ - public function testgetFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' ); - $r = new ReflectionMethod('dynaFormHandler', 'getFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aFilter'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - } - - /** - * @covers dynaFormHandler::getFieldNames - * @todo Implement testgetFieldNames(). - */ - public function testgetFieldNames() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFieldNames', $methods ), 'exists method getFieldNames' ); - $r = new ReflectionMethod('dynaFormHandler', 'getFieldNames'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aFilter'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - } - - /** - * @covers dynaFormHandler::addChilds - * @todo Implement testaddChilds(). - */ - public function testaddChilds() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addChilds', $methods ), 'exists method addChilds' ); - $r = new ReflectionMethod('dynaFormHandler', 'addChilds'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'childs'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'childs_childs'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers dynaFormHandler::addOrUpdateChild - * @todo Implement testaddOrUpdateChild(). - */ - public function testaddOrUpdateChild() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addOrUpdateChild', $methods ), 'exists method addOrUpdateChild' ); - $r = new ReflectionMethod('dynaFormHandler', 'addOrUpdateChild'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xnode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'childName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'childValue'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'childAttributes'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers dynaFormHandler::getArray - * @todo Implement testgetArray(). - */ - public function testgetArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getArray', $methods ), 'exists method getArray' ); - $r = new ReflectionMethod('dynaFormHandler', 'getArray'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'attributes'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/gulliver/system/classfilterFormTest.php b/tests/automated/gulliver/system/classfilterFormTest.php deleted file mode 100644 index 0adb6e2b8..000000000 --- a/tests/automated/gulliver/system/classfilterFormTest.php +++ /dev/null @@ -1,69 +0,0 @@ -object = new filterForm($template, &$scriptContent); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('filterForm'); $this->assertTrue( count($methods) == 13); - } - - /** - * @covers filterForm::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('filterForm', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'template'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'scriptContent'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classheadPublisherTest.php b/tests/automated/gulliver/system/classheadPublisherTest.php deleted file mode 100644 index db6ca9095..000000000 --- a/tests/automated/gulliver/system/classheadPublisherTest.php +++ /dev/null @@ -1,461 +0,0 @@ -object = new headPublisher(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('headPublisher'); $this->assertTrue( count($methods) == 27); - } - - /** - * @covers headPublisher::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('headPublisher', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' ); - $r = new ReflectionMethod('headPublisher', 'getSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::setTitle - * @todo Implement testsetTitle(). - */ - public function testsetTitle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setTitle', $methods ), 'exists method setTitle' ); - $r = new ReflectionMethod('headPublisher', 'setTitle'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'title'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::addMaborakFile - * @todo Implement testaddMaborakFile(). - */ - /*public function testaddMaborakFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addMaborakFile', $methods ), 'exists method addMaborakFile' ); - $r = new ReflectionMethod('headPublisher', 'addMaborakFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'loader'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - }*/ - - /** - * @covers headPublisher::addScriptFile - * @todo Implement testaddScriptFile(). - */ - public function testaddScriptFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addScriptFile', $methods ), 'exists method addScriptFile' ); - $r = new ReflectionMethod('headPublisher', 'addScriptFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'LoadType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers headPublisher::addInstanceModule - * @todo Implement testaddInstanceModule(). - */ - public function testaddInstanceModule() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addInstanceModule', $methods ), 'exists method addInstanceModule' ); - $r = new ReflectionMethod('headPublisher', 'addInstanceModule'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'instance'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'module'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers headPublisher::addClassModule - * @todo Implement testaddClassModule(). - */ - public function testaddClassModule() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addClassModule', $methods ), 'exists method addClassModule' ); - $r = new ReflectionMethod('headPublisher', 'addClassModule'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'class'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'module'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers headPublisher::addScriptCode - * @todo Implement testaddScriptCode(). - */ - public function testaddScriptCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addScriptCode', $methods ), 'exists method addScriptCode' ); - $r = new ReflectionMethod('headPublisher', 'addScriptCode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'script'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::printHeader - * @todo Implement testprintHeader(). - */ - public function testprintHeader() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printHeader', $methods ), 'exists method printHeader' ); - $r = new ReflectionMethod('headPublisher', 'printHeader'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::printRawHeader - * @todo Implement testprintRawHeader(). - */ - public function testprintRawHeader() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printRawHeader', $methods ), 'exists method printRawHeader' ); - $r = new ReflectionMethod('headPublisher', 'printRawHeader'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::clearScripts - * @todo Implement testclearScripts(). - */ - public function testclearScripts() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('clearScripts', $methods ), 'exists method clearScripts' ); - $r = new ReflectionMethod('headPublisher', 'clearScripts'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::includeExtJs - * @todo Implement testincludeExtJs(). - */ - public function testincludeExtJs() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('includeExtJs', $methods ), 'exists method includeExtJs' ); - $r = new ReflectionMethod('headPublisher', 'includeExtJs'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::getExtJsStylesheets - * @todo Implement testgetExtJsStylesheets(). - */ - public function testgetExtJsStylesheets() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtJsStylesheets', $methods ), 'exists method getExtJsStylesheets' ); - $r = new ReflectionMethod('headPublisher', 'getExtJsStylesheets'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'skinName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::getExtJsScripts - * @todo Implement testgetExtJsScripts(). - */ - public function testgetExtJsScripts() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtJsScripts', $methods ), 'exists method getExtJsScripts' ); - $r = new ReflectionMethod('headPublisher', 'getExtJsScripts'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::getExtJsVariablesScript - * @todo Implement testgetExtJsVariablesScript(). - */ - public function testgetExtJsVariablesScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtJsVariablesScript', $methods ), 'exists method getExtJsVariablesScript' ); - $r = new ReflectionMethod('headPublisher', 'getExtJsVariablesScript'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::getExtJsLibraries - * @todo Implement testgetExtJsLibraries(). - */ - public function testgetExtJsLibraries() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtJsLibraries', $methods ), 'exists method getExtJsLibraries' ); - $r = new ReflectionMethod('headPublisher', 'getExtJsLibraries'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::usingExtJs - * @todo Implement testusingExtJs(). - */ - public function testusingExtJs() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('usingExtJs', $methods ), 'exists method usingExtJs' ); - $r = new ReflectionMethod('headPublisher', 'usingExtJs'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'library'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::setExtSkin - * @todo Implement testsetExtSkin(). - */ - public function testsetExtSkin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setExtSkin', $methods ), 'exists method setExtSkin' ); - $r = new ReflectionMethod('headPublisher', 'setExtSkin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'skin'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::addExtJsScript - * @todo Implement testaddExtJsScript(). - */ - public function testaddExtJsScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addExtJsScript', $methods ), 'exists method addExtJsScript' ); - $r = new ReflectionMethod('headPublisher', 'addExtJsScript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'debug'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'isExternal'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers headPublisher::AddContent - * @todo Implement testAddContent(). - */ - public function testAddContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AddContent', $methods ), 'exists method AddContent' ); - $r = new ReflectionMethod('headPublisher', 'AddContent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'templateHtml'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::getContent - * @todo Implement testgetContent(). - */ - public function testgetContent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getContent', $methods ), 'exists method getContent' ); - $r = new ReflectionMethod('headPublisher', 'getContent'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::Assign - * @todo Implement testAssign(). - */ - public function testAssign() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Assign', $methods ), 'exists method Assign' ); - $r = new ReflectionMethod('headPublisher', 'Assign'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'variable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers headPublisher::AssignVar - * @todo Implement testAssignVar(). - */ - public function testAssignVar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AssignVar', $methods ), 'exists method AssignVar' ); - $r = new ReflectionMethod('headPublisher', 'AssignVar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers headPublisher::getVars - * @todo Implement testgetVars(). - */ - public function testgetVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVars', $methods ), 'exists method getVars' ); - $r = new ReflectionMethod('headPublisher', 'getVars'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::AssignNumber - * @todo Implement testAssignNumber(). - */ - public function testAssignNumber() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('AssignNumber', $methods ), 'exists method AssignNumber' ); - $r = new ReflectionMethod('headPublisher', 'AssignNumber'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'variable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers headPublisher::renderExtJs - * @todo Implement testrenderExtJs(). - */ - public function testrenderExtJs() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderExtJs', $methods ), 'exists method renderExtJs' ); - $r = new ReflectionMethod('headPublisher', 'renderExtJs'); - $params = $r->getParameters(); - } - - /** - * @covers headPublisher::stripCodeQuotes - * @todo Implement teststripCodeQuotes(). - */ - public function teststripCodeQuotes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stripCodeQuotes', $methods ), 'exists method stripCodeQuotes' ); - $r = new ReflectionMethod('headPublisher', 'stripCodeQuotes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sJson'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers headPublisher::disableHeaderScripts - * @todo Implement testdisableHeaderScripts(). - */ - public function testdisableHeaderScripts() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('disableHeaderScripts', $methods ), 'exists method disableHeaderScripts' ); - $r = new ReflectionMethod('headPublisher', 'disableHeaderScripts'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classi18n_POTest.php b/tests/automated/gulliver/system/classi18n_POTest.php deleted file mode 100644 index acaebd127..000000000 --- a/tests/automated/gulliver/system/classi18n_POTest.php +++ /dev/null @@ -1,297 +0,0 @@ -object = new i18n_PO($file); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('i18n_PO'); $this->assertTrue( count($methods) == 17); - } - - /** - * @covers i18n_PO::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('i18n_PO', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::buildInit - * @todo Implement testbuildInit(). - */ - public function testbuildInit() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('buildInit', $methods ), 'exists method buildInit' ); - $r = new ReflectionMethod('i18n_PO', 'buildInit'); - $params = $r->getParameters(); - } - - /** - * @covers i18n_PO::readInit - * @todo Implement testreadInit(). - */ - public function testreadInit() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('readInit', $methods ), 'exists method readInit' ); - $r = new ReflectionMethod('i18n_PO', 'readInit'); - $params = $r->getParameters(); - } - - /** - * @covers i18n_PO::addHeader - * @todo Implement testaddHeader(). - */ - public function testaddHeader() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addHeader', $methods ), 'exists method addHeader' ); - $r = new ReflectionMethod('i18n_PO', 'addHeader'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'id'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers i18n_PO::addTranslatorComment - * @todo Implement testaddTranslatorComment(). - */ - public function testaddTranslatorComment() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addTranslatorComment', $methods ), 'exists method addTranslatorComment' ); - $r = new ReflectionMethod('i18n_PO', 'addTranslatorComment'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::addExtractedComment - * @todo Implement testaddExtractedComment(). - */ - public function testaddExtractedComment() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addExtractedComment', $methods ), 'exists method addExtractedComment' ); - $r = new ReflectionMethod('i18n_PO', 'addExtractedComment'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::addReference - * @todo Implement testaddReference(). - */ - public function testaddReference() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addReference', $methods ), 'exists method addReference' ); - $r = new ReflectionMethod('i18n_PO', 'addReference'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::addFlag - * @todo Implement testaddFlag(). - */ - public function testaddFlag() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addFlag', $methods ), 'exists method addFlag' ); - $r = new ReflectionMethod('i18n_PO', 'addFlag'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::addPreviousUntranslatedString - * @todo Implement testaddPreviousUntranslatedString(). - */ - public function testaddPreviousUntranslatedString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addPreviousUntranslatedString', $methods ), 'exists method addPreviousUntranslatedString' ); - $r = new ReflectionMethod('i18n_PO', 'addPreviousUntranslatedString'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::addTranslation - * @todo Implement testaddTranslation(). - */ - public function testaddTranslation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addTranslation', $methods ), 'exists method addTranslation' ); - $r = new ReflectionMethod('i18n_PO', 'addTranslation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msgid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'msgstr'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers i18n_PO::_writeLine - * @todo Implement test_writeLine(). - */ - public function test_writeLine() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_writeLine', $methods ), 'exists method _writeLine' ); - $r = new ReflectionMethod('i18n_PO', '_writeLine'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::_write - * @todo Implement test_write(). - */ - public function test_write() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_write', $methods ), 'exists method _write' ); - $r = new ReflectionMethod('i18n_PO', '_write'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'str'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers i18n_PO::prepare - * @todo Implement testprepare(). - */ - public function testprepare() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' ); - $r = new ReflectionMethod('i18n_PO', 'prepare'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'string'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'reverse'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers i18n_PO::headerStroke - * @todo Implement testheaderStroke(). - */ - public function testheaderStroke() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('headerStroke', $methods ), 'exists method headerStroke' ); - $r = new ReflectionMethod('i18n_PO', 'headerStroke'); - $params = $r->getParameters(); - } - - /** - * @covers i18n_PO::getHeaders - * @todo Implement testgetHeaders(). - */ - public function testgetHeaders() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHeaders', $methods ), 'exists method getHeaders' ); - $r = new ReflectionMethod('i18n_PO', 'getHeaders'); - $params = $r->getParameters(); - } - - /** - * @covers i18n_PO::getTranslation - * @todo Implement testgetTranslation(). - */ - public function testgetTranslation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTranslation', $methods ), 'exists method getTranslation' ); - $r = new ReflectionMethod('i18n_PO', 'getTranslation'); - $params = $r->getParameters(); - } - - /** - * @covers i18n_PO::__destruct - * @todo Implement test__destruct(). - */ - public function test__destruct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__destruct', $methods ), 'exists method __destruct' ); - $r = new ReflectionMethod('i18n_PO', '__destruct'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classmailerTest.php b/tests/automated/gulliver/system/classmailerTest.php deleted file mode 100644 index 76738d218..000000000 --- a/tests/automated/gulliver/system/classmailerTest.php +++ /dev/null @@ -1,252 +0,0 @@ -object = new mailer(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('mailer'); $this->assertTrue( count($methods) == 7); - } - - /** - * @covers mailer::instanceMailer - * @todo Implement testinstanceMailer(). - */ - public function testinstanceMailer() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('instanceMailer', $methods ), 'exists method instanceMailer' ); - $r = new ReflectionMethod('mailer', 'instanceMailer'); - $params = $r->getParameters(); - } - - /** - * @covers mailer::arpaEMAIL - * @todo Implement testarpaEMAIL(). - */ - public function testarpaEMAIL() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('arpaEMAIL', $methods ), 'exists method arpaEMAIL' ); - $r = new ReflectionMethod('mailer', 'arpaEMAIL'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'address'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers mailer::sendTemplate - * @todo Implement testsendTemplate(). - */ - public function testsendTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendTemplate', $methods ), 'exists method sendTemplate' ); - $r = new ReflectionMethod('mailer', 'sendTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'target'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'cc'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'bcc'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'subject'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'Fields'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == Array()); - $this->assertTrue( $params[6]->getName() == 'templateFile'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == 'empty.html'); - $this->assertTrue( $params[7]->getName() == 'attachs'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == Array()); - $this->assertTrue( $params[8]->getName() == 'plainText'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - $this->assertTrue( $params[9]->getName() == 'returnContent'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == true); - $this->assertTrue( $params[9]->getDefaultValue() == ''); - } - - /** - * @covers mailer::sendHtml - * @todo Implement testsendHtml(). - */ - public function testsendHtml() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendHtml', $methods ), 'exists method sendHtml' ); - $r = new ReflectionMethod('mailer', 'sendHtml'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'target'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'cc'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'bcc'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'subject'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'Fields'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == Array()); - $this->assertTrue( $params[6]->getName() == 'content'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'attachs'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == Array()); - $this->assertTrue( $params[8]->getName() == 'plainText'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - $this->assertTrue( $params[9]->getName() == 'returnContent'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == true); - $this->assertTrue( $params[9]->getDefaultValue() == ''); - } - - /** - * @covers mailer::sendText - * @todo Implement testsendText(). - */ - public function testsendText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendText', $methods ), 'exists method sendText' ); - $r = new ReflectionMethod('mailer', 'sendText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'target'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'cc'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'bcc'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'subject'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'content'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'attachs'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == Array()); - } - - /** - * @covers mailer::replaceFields - * @todo Implement testreplaceFields(). - */ - public function testreplaceFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('replaceFields', $methods ), 'exists method replaceFields' ); - $r = new ReflectionMethod('mailer', 'replaceFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'Fields'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - $this->assertTrue( $params[1]->getName() == 'content'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers mailer::html2text - * @todo Implement testhtml2text(). - */ - public function testhtml2text() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('html2text', $methods ), 'exists method html2text' ); - $r = new ReflectionMethod('mailer', 'html2text'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/gulliver/system/classobjectTemplateTest.php b/tests/automated/gulliver/system/classobjectTemplateTest.php deleted file mode 100644 index d8c55308a..000000000 --- a/tests/automated/gulliver/system/classobjectTemplateTest.php +++ /dev/null @@ -1,81 +0,0 @@ -object = new objectTemplate($templateFile); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('objectTemplate'); - $this->assertTrue( count($methods) == 60); - } - - /** - * @covers objectTemplate::objectTemplate - * @todo Implement testobjectTemplate(). - */ - public function testobjectTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('objectTemplate', $methods ), 'exists method objectTemplate' ); - $r = new ReflectionMethod('objectTemplate', 'objectTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'templateFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers objectTemplate::printObject - * @todo Implement testprintObject(). - */ - public function testprintObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printObject', $methods ), 'exists method printObject' ); - $r = new ReflectionMethod('objectTemplate', 'printObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'object'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classpagedTableTest.php b/tests/automated/gulliver/system/classpagedTableTest.php deleted file mode 100644 index 405a051be..000000000 --- a/tests/automated/gulliver/system/classpagedTableTest.php +++ /dev/null @@ -1,180 +0,0 @@ -object = new pagedTable(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('pagedTable'); $this->assertTrue( count($methods) == 9); - } - - /** - * @covers pagedTable::analizeSql - * @todo Implement testanalizeSql(). - */ - public function testanalizeSql() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('analizeSql', $methods ), 'exists method analizeSql' ); - $r = new ReflectionMethod('pagedTable', 'analizeSql'); - $params = $r->getParameters(); - } - - /** - * @covers pagedTable::prepareQuery - * @todo Implement testprepareQuery(). - */ - public function testprepareQuery() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepareQuery', $methods ), 'exists method prepareQuery' ); - $r = new ReflectionMethod('pagedTable', 'prepareQuery'); - $params = $r->getParameters(); - } - - /** - * @covers pagedTable::setupFromXmlform - * @todo Implement testsetupFromXmlform(). - */ - public function testsetupFromXmlform() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setupFromXmlform', $methods ), 'exists method setupFromXmlform' ); - $r = new ReflectionMethod('pagedTable', 'setupFromXmlform'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlForm'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers pagedTable::count - * @todo Implement testcount(). - */ - public function testcount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('count', $methods ), 'exists method count' ); - $r = new ReflectionMethod('pagedTable', 'count'); - $params = $r->getParameters(); - } - - /** - * @covers pagedTable::renderTitle - * @todo Implement testrenderTitle(). - */ - public function testrenderTitle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTitle', $methods ), 'exists method renderTitle' ); - $r = new ReflectionMethod('pagedTable', 'renderTitle'); - $params = $r->getParameters(); - } - - /** - * @covers pagedTable::renderField - * @todo Implement testrenderField(). - */ - public function testrenderField() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderField', $methods ), 'exists method renderField' ); - $r = new ReflectionMethod('pagedTable', 'renderField'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'row'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'r'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'result'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers pagedTable::defaultStyle - * @todo Implement testdefaultStyle(). - */ - public function testdefaultStyle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('defaultStyle', $methods ), 'exists method defaultStyle' ); - $r = new ReflectionMethod('pagedTable', 'defaultStyle'); - $params = $r->getParameters(); - } - - /** - * @covers pagedTable::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' ); - $r = new ReflectionMethod('pagedTable', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'block'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers pagedTable::printForm - * @todo Implement testprintForm(). - */ - public function testprintForm() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printForm', $methods ), 'exists method printForm' ); - $r = new ReflectionMethod('pagedTable', 'printForm'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'data'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == Array()); - } - - } diff --git a/tests/automated/gulliver/system/classxmlMenuTest.php b/tests/automated/gulliver/system/classxmlMenuTest.php deleted file mode 100644 index 569a51b15..000000000 --- a/tests/automated/gulliver/system/classxmlMenuTest.php +++ /dev/null @@ -1,51 +0,0 @@ -object = new xmlMenu($file, $home); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('xmlMenu'); $this->assertTrue( count($methods) == 13); - } - - } diff --git a/tests/automated/gulliver/system/classxmlformTemplateTest.php b/tests/automated/gulliver/system/classxmlformTemplateTest.php deleted file mode 100644 index c1b77534b..000000000 --- a/tests/automated/gulliver/system/classxmlformTemplateTest.php +++ /dev/null @@ -1,234 +0,0 @@ -object = new xmlformTemplate(&$form, $templateFile); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('xmlformTemplate'); $this->assertTrue( count($methods) == 68); - } - - /** - * @covers xmlformTemplate::xmlformTemplate - * @todo Implement testxmlformTemplate(). - */ - public function testxmlformTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('xmlformTemplate', $methods ), 'exists method xmlformTemplate' ); - $r = new ReflectionMethod('xmlformTemplate', 'xmlformTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'templateFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::printTemplate - * @todo Implement testprintTemplate(). - */ - public function testprintTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printTemplate', $methods ), 'exists method printTemplate' ); - $r = new ReflectionMethod('xmlformTemplate', 'printTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'target'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'smarty'); - } - - /** - * @covers xmlformTemplate::printJavaScript - * @todo Implement testprintJavaScript(). - */ - public function testprintJavaScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printJavaScript', $methods ), 'exists method printJavaScript' ); - $r = new ReflectionMethod('xmlformTemplate', 'printJavaScript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::printJSFile - * @todo Implement testprintJSFile(). - */ - public function testprintJSFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printJSFile', $methods ), 'exists method printJSFile' ); - $r = new ReflectionMethod('xmlformTemplate', 'printJSFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::getFields - * @todo Implement testgetFields(). - */ - public function testgetFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' ); - $r = new ReflectionMethod('xmlformTemplate', 'getFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'therow'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '-1'); - } - - /** - * @covers xmlformTemplate::printObject - * @todo Implement testprintObject(). - */ - public function testprintObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printObject', $methods ), 'exists method printObject' ); - $r = new ReflectionMethod('xmlformTemplate', 'printObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'form'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'therow'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '-1'); - } - - /** - * @covers xmlformTemplate::_get_template - * @todo Implement test_get_template(). - */ - public function test_get_template() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_get_template', $methods ), 'exists method _get_template' ); - $r = new ReflectionMethod('xmlformTemplate', '_get_template'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tpl_source'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'smarty_obj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::_get_timestamp - * @todo Implement test_get_timestamp(). - */ - public function test_get_timestamp() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_get_timestamp', $methods ), 'exists method _get_timestamp' ); - $r = new ReflectionMethod('xmlformTemplate', '_get_timestamp'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tpl_timestamp'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'smarty_obj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::_get_secure - * @todo Implement test_get_secure(). - */ - public function test_get_secure() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_get_secure', $methods ), 'exists method _get_secure' ); - $r = new ReflectionMethod('xmlformTemplate', '_get_secure'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'smarty_obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers xmlformTemplate::_get_trusted - * @todo Implement test_get_trusted(). - */ - public function test_get_trusted() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('_get_trusted', $methods ), 'exists method _get_trusted' ); - $r = new ReflectionMethod('xmlformTemplate', '_get_trusted'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tpl_name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'smarty_obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/gulliver/system/classymlTestCasesTest.php b/tests/automated/gulliver/system/classymlTestCasesTest.php deleted file mode 100644 index 6c3346d6d..000000000 --- a/tests/automated/gulliver/system/classymlTestCasesTest.php +++ /dev/null @@ -1,186 +0,0 @@ -object = new ymlTestCases( $testCaseFile, &$testDomain, &$testLime); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('ymlTestCases'); $this->assertTrue( count($methods) == 6); - } - - /** - * @covers ymlTestCases::ymlTestCases - * @todo Implement testymlTestCases(). - */ - public function testymlTestCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ymlTestCases', $methods ), 'exists method ymlTestCases' ); - $r = new ReflectionMethod('ymlTestCases', 'ymlTestCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'testCaseFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'testDomain'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'testLime'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers ymlTestCases::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('ymlTestCases', 'load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'inputTestCasesIndex'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'TestCases'); - $this->assertTrue( $params[1]->getName() == 'fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers ymlTestCases::addToPlan - * @todo Implement testaddToPlan(). - */ - public function testaddToPlan() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addToPlan', $methods ), 'exists method addToPlan' ); - $r = new ReflectionMethod('ymlTestCases', 'addToPlan'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'count'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '-1'); - $this->assertTrue( $params[1]->getName() == 'start'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers ymlTestCases::run - * @todo Implement testrun(). - */ - public function testrun() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('run', $methods ), 'exists method run' ); - $r = new ReflectionMethod('ymlTestCases', 'run'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'testerObject'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - $this->assertTrue( $params[2]->getName() == 'count'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '-1'); - $this->assertTrue( $params[3]->getName() == 'start'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - } - - /** - * @covers ymlTestCases::runSingle - * @todo Implement testrunSingle(). - */ - public function testrunSingle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('runSingle', $methods ), 'exists method runSingle' ); - $r = new ReflectionMethod('ymlTestCases', 'runSingle'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'testerObject'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers ymlTestCases::runMultiple - * @todo Implement testrunMultiple(). - */ - public function testrunMultiple() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('runMultiple', $methods ), 'exists method runMultiple' ); - $r = new ReflectionMethod('ymlTestCases', 'runMultiple'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'testerObject'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - $this->assertTrue( $params[2]->getName() == 'count'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '-1'); - $this->assertTrue( $params[3]->getName() == 'start'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classAppSolrTest.php b/tests/automated/workflow/engine/classes/classAppSolrTest.php deleted file mode 100644 index 5b195f222..000000000 --- a/tests/automated/workflow/engine/classes/classAppSolrTest.php +++ /dev/null @@ -1,560 +0,0 @@ -object = new AppSolr($SolrEnabled, $SolrHost, $SolrInstance); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('AppSolr'); - $this->assertTrue( count($methods) == 35); - } - - /** - * @covers AppSolr::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('AppSolr', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'SolrEnabled'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'SolrHost'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'SolrInstance'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers AppSolr::isSolrEnabled - * @todo Implement testisSolrEnabled(). - */ - public function testisSolrEnabled() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isSolrEnabled', $methods ), 'exists method isSolrEnabled' ); - $r = new ReflectionMethod('AppSolr', 'isSolrEnabled'); - $params = $r->getParameters(); - } - - /** - * @covers AppSolr::getAppGridData - * @todo Implement testgetAppGridData(). - */ - public function testgetAppGridData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAppGridData', $methods ), 'exists method getAppGridData' ); - $r = new ReflectionMethod('AppSolr', 'getAppGridData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'start'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'limit'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'action'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'filter'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'search'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'process'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'status'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - $this->assertTrue( $params[8]->getName() == 'type'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - $this->assertTrue( $params[9]->getName() == 'dateFrom'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == true); - $this->assertTrue( $params[9]->getDefaultValue() == ''); - $this->assertTrue( $params[10]->getName() == 'dateTo'); - $this->assertTrue( $params[10]->isArray() == false); - $this->assertTrue( $params[10]->isOptional () == true); - $this->assertTrue( $params[10]->getDefaultValue() == ''); - $this->assertTrue( $params[11]->getName() == 'callback'); - $this->assertTrue( $params[11]->isArray() == false); - $this->assertTrue( $params[11]->isOptional () == true); - $this->assertTrue( $params[11]->getDefaultValue() == ''); - $this->assertTrue( $params[12]->getName() == 'dir'); - $this->assertTrue( $params[12]->isArray() == false); - $this->assertTrue( $params[12]->isOptional () == true); - $this->assertTrue( $params[12]->getDefaultValue() == ''); - $this->assertTrue( $params[13]->getName() == 'sort'); - $this->assertTrue( $params[13]->isArray() == false); - $this->assertTrue( $params[13]->isOptional () == true); - $this->assertTrue( $params[13]->getDefaultValue() == 'APP_CACHE_VIEW.APP_NUMBER'); - $this->assertTrue( $params[14]->getName() == 'category'); - $this->assertTrue( $params[14]->isArray() == false); - $this->assertTrue( $params[14]->isOptional () == true); - $this->assertTrue( $params[14]->getDefaultValue() == ''); - $this->assertTrue( $params[15]->getName() == 'doCount'); - $this->assertTrue( $params[15]->isArray() == false); - $this->assertTrue( $params[15]->isOptional () == true); - $this->assertTrue( $params[15]->getDefaultValue() == ''); - } - - /** - * @covers AppSolr::getCasesCount - * @todo Implement testgetCasesCount(). - */ - public function testgetCasesCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCasesCount', $methods ), 'exists method getCasesCount' ); - $r = new ReflectionMethod('AppSolr', 'getCasesCount'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::getUserGroups - * @todo Implement testgetUserGroups(). - */ - public function testgetUserGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUserGroups', $methods ), 'exists method getUserGroups' ); - $r = new ReflectionMethod('AppSolr', 'getUserGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'usrUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::getAppDelegationData - * @todo Implement testgetAppDelegationData(). - */ - public function testgetAppDelegationData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAppDelegationData', $methods ), 'exists method getAppDelegationData' ); - $r = new ReflectionMethod('AppSolr', 'getAppDelegationData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'delIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers AppSolr::getSearchText - * @todo Implement testgetSearchText(). - */ - public function testgetSearchText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSearchText', $methods ), 'exists method getSearchText' ); - $r = new ReflectionMethod('AppSolr', 'getSearchText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'plainSearchText'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::getApplicationDelegationsIndex - * @todo Implement testgetApplicationDelegationsIndex(). - */ - public function testgetApplicationDelegationsIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getApplicationDelegationsIndex', $methods ), 'exists method getApplicationDelegationsIndex' ); - $r = new ReflectionMethod('AppSolr', 'getApplicationDelegationsIndex'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::updateApplicationSearchIndex - * @todo Implement testupdateApplicationSearchIndex(). - */ - public function testupdateApplicationSearchIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateApplicationSearchIndex', $methods ), 'exists method updateApplicationSearchIndex' ); - $r = new ReflectionMethod('AppSolr', 'updateApplicationSearchIndex'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aaAPPUIDs'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::deleteApplicationSearchIndex - * @todo Implement testdeleteApplicationSearchIndex(). - */ - public function testdeleteApplicationSearchIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteApplicationSearchIndex', $methods ), 'exists method deleteApplicationSearchIndex' ); - $r = new ReflectionMethod('AppSolr', 'deleteApplicationSearchIndex'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::createSolrXMLDocument - * @todo Implement testcreateSolrXMLDocument(). - */ - public function testcreateSolrXMLDocument() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createSolrXMLDocument', $methods ), 'exists method createSolrXMLDocument' ); - $r = new ReflectionMethod('AppSolr', 'createSolrXMLDocument'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aaAPPUIDs'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::buildSearchIndexDocumentPMOS2 - * @todo Implement testbuildSearchIndexDocumentPMOS2(). - */ - public function testbuildSearchIndexDocumentPMOS2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('buildSearchIndexDocumentPMOS2', $methods ), 'exists method buildSearchIndexDocumentPMOS2' ); - $r = new ReflectionMethod('AppSolr', 'buildSearchIndexDocumentPMOS2'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'documentData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'dynaformFieldTypes'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'lastUpdateDate'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'maxPriority'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'assignedUsers'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'assignedUsersRead'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - $this->assertTrue( $params[6]->getName() == 'assignedUsersUnread'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == false); - $this->assertTrue( $params[7]->getName() == 'draftUser'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == false); - $this->assertTrue( $params[8]->getName() == 'participatedUsers'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == false); - $this->assertTrue( $params[9]->getName() == 'participatedUsersStartedByUser'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == false); - $this->assertTrue( $params[10]->getName() == 'participatedUsersCompletedByUser'); - $this->assertTrue( $params[10]->isArray() == false); - $this->assertTrue( $params[10]->isOptional () == false); - $this->assertTrue( $params[11]->getName() == 'unassignedUsers'); - $this->assertTrue( $params[11]->isArray() == false); - $this->assertTrue( $params[11]->isOptional () == false); - $this->assertTrue( $params[12]->getName() == 'unassignedGroups'); - $this->assertTrue( $params[12]->isArray() == false); - $this->assertTrue( $params[12]->isOptional () == false); - } - - /** - * @covers AppSolr::getApplicationIndexData - * @todo Implement testgetApplicationIndexData(). - */ - public function testgetApplicationIndexData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getApplicationIndexData', $methods ), 'exists method getApplicationIndexData' ); - $r = new ReflectionMethod('AppSolr', 'getApplicationIndexData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'AppUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::aaGetMaximun - * @todo Implement testaaGetMaximun(). - */ - public function testaaGetMaximun() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('aaGetMaximun', $methods ), 'exists method aaGetMaximun' ); - $r = new ReflectionMethod('AppSolr', 'aaGetMaximun'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arr'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'column'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'columnType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'STRING'); - $this->assertTrue( $params[3]->getName() == 'columnCondition'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'condition'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers AppSolr::aaGetMinimun - * @todo Implement testaaGetMinimun(). - */ - public function testaaGetMinimun() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('aaGetMinimun', $methods ), 'exists method aaGetMinimun' ); - $r = new ReflectionMethod('AppSolr', 'aaGetMinimun'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arr'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'column'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'columnType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'STRING'); - $this->assertTrue( $params[3]->getName() == 'columnCondition'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'condition'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers AppSolr::aaSearchRecords - * @todo Implement testaaSearchRecords(). - */ - public function testaaSearchRecords() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('aaSearchRecords', $methods ), 'exists method aaSearchRecords' ); - $r = new ReflectionMethod('AppSolr', 'aaSearchRecords'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arr'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'andColumnsConditions'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers AppSolr::getApplicationDelegationData - * @todo Implement testgetApplicationDelegationData(). - */ - public function testgetApplicationDelegationData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getApplicationDelegationData', $methods ), 'exists method getApplicationDelegationData' ); - $r = new ReflectionMethod('AppSolr', 'getApplicationDelegationData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'AppUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::getTaskUnassignedUsersGroupsData - * @todo Implement testgetTaskUnassignedUsersGroupsData(). - */ - public function testgetTaskUnassignedUsersGroupsData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTaskUnassignedUsersGroupsData', $methods ), 'exists method getTaskUnassignedUsersGroupsData' ); - $r = new ReflectionMethod('AppSolr', 'getTaskUnassignedUsersGroupsData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ProUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'TaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers AppSolr::getProcessDynaformFileNames - * @todo Implement testgetProcessDynaformFileNames(). - */ - public function testgetProcessDynaformFileNames() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getProcessDynaformFileNames', $methods ), 'exists method getProcessDynaformFileNames' ); - $r = new ReflectionMethod('AppSolr', 'getProcessDynaformFileNames'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ProUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers AppSolr::applicationChangedUpdateSolrQueue - * @todo Implement testapplicationChangedUpdateSolrQueue(). - */ - public function testapplicationChangedUpdateSolrQueue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('applicationChangedUpdateSolrQueue', $methods ), 'exists method applicationChangedUpdateSolrQueue' ); - $r = new ReflectionMethod('AppSolr', 'applicationChangedUpdateSolrQueue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'AppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'updated'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers AppSolr::synchronizePendingApplications - * @todo Implement testsynchronizePendingApplications(). - */ - public function testsynchronizePendingApplications() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('synchronizePendingApplications', $methods ), 'exists method synchronizePendingApplications' ); - $r = new ReflectionMethod('AppSolr', 'synchronizePendingApplications'); - $params = $r->getParameters(); - } - - /** - * @covers AppSolr::getCountApplicationsPMOS2 - * @todo Implement testgetCountApplicationsPMOS2(). - */ - public function testgetCountApplicationsPMOS2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCountApplicationsPMOS2', $methods ), 'exists method getCountApplicationsPMOS2' ); - $r = new ReflectionMethod('AppSolr', 'getCountApplicationsPMOS2'); - $params = $r->getParameters(); - } - - /** - * @covers AppSolr::getCountApplicationsSearchIndex - * @todo Implement testgetCountApplicationsSearchIndex(). - */ - public function testgetCountApplicationsSearchIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCountApplicationsSearchIndex', $methods ), 'exists method getCountApplicationsSearchIndex' ); - $r = new ReflectionMethod('AppSolr', 'getCountApplicationsSearchIndex'); - $params = $r->getParameters(); - } - - /** - * @covers AppSolr::getPagedApplicationUids - * @todo Implement testgetPagedApplicationUids(). - */ - public function testgetPagedApplicationUids() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPagedApplicationUids', $methods ), 'exists method getPagedApplicationUids' ); - $r = new ReflectionMethod('AppSolr', 'getPagedApplicationUids'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'skip'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pagesize'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers AppSolr::reindexAllApplications - * @todo Implement testreindexAllApplications(). - */ - public function testreindexAllApplications() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reindexAllApplications', $methods ), 'exists method reindexAllApplications' ); - $r = new ReflectionMethod('AppSolr', 'reindexAllApplications'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classApplicationWithoutDelegationRecordsExceptionTest.php b/tests/automated/workflow/engine/classes/classApplicationWithoutDelegationRecordsExceptionTest.php deleted file mode 100644 index bdbe7410b..000000000 --- a/tests/automated/workflow/engine/classes/classApplicationWithoutDelegationRecordsExceptionTest.php +++ /dev/null @@ -1,82 +0,0 @@ -object = new ApplicationWithoutDelegationRecordsException('message'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $class = new ReflectionClass('ApplicationWithoutDelegationRecordsException'); - $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC); - //$this->assertTrue( count($methods) == 9); - } - - /** - * @covers ApplicationWithoutDelegationRecordsException::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('ApplicationWithoutDelegationRecordsException', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'code'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers ApplicationWithoutDelegationRecordsException::__toString - * @todo Implement test__toString(). - */ - public function test__toString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' ); - $r = new ReflectionMethod('ApplicationWithoutDelegationRecordsException', '__toString'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classApplicationsTest.php b/tests/automated/workflow/engine/classes/classApplicationsTest.php deleted file mode 100644 index e5867be90..000000000 --- a/tests/automated/workflow/engine/classes/classApplicationsTest.php +++ /dev/null @@ -1,198 +0,0 @@ -object = new Applications(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Applications'); $this->assertTrue( count($methods) == 5); - } - - /** - * @covers Applications::getAll - * @todo Implement testgetAll(). - */ - public function testgetAll() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAll', $methods ), 'exists method getAll' ); - $r = new ReflectionMethod('Applications', 'getAll'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'start'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'limit'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'action'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'filter'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'search'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'process'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'status'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - $this->assertTrue( $params[8]->getName() == 'type'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - $this->assertTrue( $params[9]->getName() == 'dateFrom'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == true); - $this->assertTrue( $params[9]->getDefaultValue() == ''); - $this->assertTrue( $params[10]->getName() == 'dateTo'); - $this->assertTrue( $params[10]->isArray() == false); - $this->assertTrue( $params[10]->isOptional () == true); - $this->assertTrue( $params[10]->getDefaultValue() == ''); - $this->assertTrue( $params[11]->getName() == 'callback'); - $this->assertTrue( $params[11]->isArray() == false); - $this->assertTrue( $params[11]->isOptional () == true); - $this->assertTrue( $params[11]->getDefaultValue() == ''); - $this->assertTrue( $params[12]->getName() == 'dir'); - $this->assertTrue( $params[12]->isArray() == false); - $this->assertTrue( $params[12]->isOptional () == true); - $this->assertTrue( $params[12]->getDefaultValue() == ''); - $this->assertTrue( $params[13]->getName() == 'sort'); - $this->assertTrue( $params[13]->isArray() == false); - $this->assertTrue( $params[13]->isOptional () == true); - $this->assertTrue( $params[13]->getDefaultValue() == 'APP_CACHE_VIEW.APP_NUMBER'); - $this->assertTrue( $params[14]->getName() == 'category'); - $this->assertTrue( $params[14]->isArray() == false); - $this->assertTrue( $params[14]->isOptional () == true); - $this->assertTrue( $params[14]->getDefaultValue() == ''); - } - - /** - * @covers Applications::setDefaultFields - * @todo Implement testsetDefaultFields(). - */ - public function testsetDefaultFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDefaultFields', $methods ), 'exists method setDefaultFields' ); - $r = new ReflectionMethod('Applications', 'setDefaultFields'); - $params = $r->getParameters(); - } - - /** - * @covers Applications::getDefaultFields - * @todo Implement testgetDefaultFields(). - */ - public function testgetDefaultFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDefaultFields', $methods ), 'exists method getDefaultFields' ); - $r = new ReflectionMethod('Applications', 'getDefaultFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'action'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Applications::genericJsonResponse - * @todo Implement testgenericJsonResponse(). - */ - public function testgenericJsonResponse() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('genericJsonResponse', $methods ), 'exists method genericJsonResponse' ); - $r = new ReflectionMethod('Applications', 'genericJsonResponse'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pmtable'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'first'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'second'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'rowsperpage'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'dateFormat'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } - - /** - * @covers Applications::getSteps - * @todo Implement testgetSteps(). - */ - public function testgetSteps() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSteps', $methods ), 'exists method getSteps' ); - $r = new ReflectionMethod('Applications', 'getSteps'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'index'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'tasUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'proUid'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classBpmnEngine_SearchIndexAccess_SolrTest.php b/tests/automated/workflow/engine/classes/classBpmnEngine_SearchIndexAccess_SolrTest.php deleted file mode 100644 index fdc3a3b7b..000000000 --- a/tests/automated/workflow/engine/classes/classBpmnEngine_SearchIndexAccess_SolrTest.php +++ /dev/null @@ -1,234 +0,0 @@ -object = new BpmnEngine_SearchIndexAccess_Solr(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('BpmnEngine_SearchIndexAccess_Solr'); $this->assertTrue( count($methods) == 13); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrIsEnabled'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'solrHost'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::isEnabled - * @todo Implement testisEnabled(). - */ - public function testisEnabled() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isEnabled', $methods ), 'exists method isEnabled' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'isEnabled'); - $params = $r->getParameters(); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::getNumberDocuments - * @todo Implement testgetNumberDocuments(). - */ - public function testgetNumberDocuments() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNumberDocuments', $methods ), 'exists method getNumberDocuments' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getNumberDocuments'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::executeQuery - * @todo Implement testexecuteQuery(). - */ - public function testexecuteQuery() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeQuery', $methods ), 'exists method executeQuery' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'executeQuery'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrRequestData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::updateDocument - * @todo Implement testupdateDocument(). - */ - public function testupdateDocument() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateDocument', $methods ), 'exists method updateDocument' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'updateDocument'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrUpdateDocument'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::commitChanges - * @todo Implement testcommitChanges(). - */ - public function testcommitChanges() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('commitChanges', $methods ), 'exists method commitChanges' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'commitChanges'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::rollbackChanges - * @todo Implement testrollbackChanges(). - */ - public function testrollbackChanges() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('rollbackChanges', $methods ), 'exists method rollbackChanges' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'rollbackChanges'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::optimizeChanges - * @todo Implement testoptimizeChanges(). - */ - public function testoptimizeChanges() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('optimizeChanges', $methods ), 'exists method optimizeChanges' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'optimizeChanges'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::getListIndexedStoredFields - * @todo Implement testgetListIndexedStoredFields(). - */ - public function testgetListIndexedStoredFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getListIndexedStoredFields', $methods ), 'exists method getListIndexedStoredFields' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getListIndexedStoredFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::deleteAllDocuments - * @todo Implement testdeleteAllDocuments(). - */ - public function testdeleteAllDocuments() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteAllDocuments', $methods ), 'exists method deleteAllDocuments' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'deleteAllDocuments'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::deleteDocument - * @todo Implement testdeleteDocument(). - */ - public function testdeleteDocument() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteDocument', $methods ), 'exists method deleteDocument' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'deleteDocument'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'idQuery'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers BpmnEngine_SearchIndexAccess_Solr::getFacetsList - * @todo Implement testgetFacetsList(). - */ - public function testgetFacetsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFacetsList', $methods ), 'exists method getFacetsList' ); - $r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getFacetsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'facetRequest'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classBpmnEngine_Services_SearchIndexTest.php b/tests/automated/workflow/engine/classes/classBpmnEngine_Services_SearchIndexTest.php deleted file mode 100644 index 5b0ced8a9..000000000 --- a/tests/automated/workflow/engine/classes/classBpmnEngine_Services_SearchIndexTest.php +++ /dev/null @@ -1,190 +0,0 @@ -object = new BpmnEngine_Services_SearchIndex(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('BpmnEngine_Services_SearchIndex'); - $this->assertTrue( count($methods) == 10); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrIsEnabled'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'solrHost'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::isEnabled - * @todo Implement testisEnabled(). - */ - public function testisEnabled() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isEnabled', $methods ), 'exists method isEnabled' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'isEnabled'); - $params = $r->getParameters(); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::getFacetsList - * @todo Implement testgetFacetsList(). - */ - public function testgetFacetsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFacetsList', $methods ), 'exists method getFacetsList' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getFacetsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'facetRequestEntity'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::getNumberDocuments - * @todo Implement testgetNumberDocuments(). - */ - public function testgetNumberDocuments() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNumberDocuments', $methods ), 'exists method getNumberDocuments' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getNumberDocuments'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::updateIndexDocument - * @todo Implement testupdateIndexDocument(). - */ - public function testupdateIndexDocument() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateIndexDocument', $methods ), 'exists method updateIndexDocument' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'updateIndexDocument'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrUpdateDocumentEntity'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::deleteDocumentFromIndex - * @todo Implement testdeleteDocumentFromIndex(). - */ - public function testdeleteDocumentFromIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteDocumentFromIndex', $methods ), 'exists method deleteDocumentFromIndex' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'deleteDocumentFromIndex'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'idQuery'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::commitIndexChanges - * @todo Implement testcommitIndexChanges(). - */ - public function testcommitIndexChanges() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('commitIndexChanges', $methods ), 'exists method commitIndexChanges' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'commitIndexChanges'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::getDataTablePaginatedList - * @todo Implement testgetDataTablePaginatedList(). - */ - public function testgetDataTablePaginatedList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDataTablePaginatedList', $methods ), 'exists method getDataTablePaginatedList' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getDataTablePaginatedList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'solrRequestData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers BpmnEngine_Services_SearchIndex::getIndexFields - * @todo Implement testgetIndexFields(). - */ - public function testgetIndexFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getIndexFields', $methods ), 'exists method getIndexFields' ); - $r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getIndexFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classCLITest.php b/tests/automated/workflow/engine/classes/classCLITest.php deleted file mode 100644 index c0975e1f0..000000000 --- a/tests/automated/workflow/engine/classes/classCLITest.php +++ /dev/null @@ -1,267 +0,0 @@ -object = new CLI(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('CLI'); $this->assertTrue( count($methods) == 13); - } - - /** - * @covers CLI::taskName - * @todo Implement testtaskName(). - */ - public function testtaskName() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskName', $methods ), 'exists method taskName' ); - $r = new ReflectionMethod('CLI', 'taskName'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::taskDescription - * @todo Implement testtaskDescription(). - */ - public function testtaskDescription() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskDescription', $methods ), 'exists method taskDescription' ); - $r = new ReflectionMethod('CLI', 'taskDescription'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'description'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::taskArg - * @todo Implement testtaskArg(). - */ - public function testtaskArg() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskArg', $methods ), 'exists method taskArg' ); - $r = new ReflectionMethod('CLI', 'taskArg'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'optional'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - $this->assertTrue( $params[2]->getName() == 'multiple'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers CLI::taskOpt - * @todo Implement testtaskOpt(). - */ - public function testtaskOpt() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskOpt', $methods ), 'exists method taskOpt' ); - $r = new ReflectionMethod('CLI', 'taskOpt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'description'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'short'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'long'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers CLI::taskRun - * @todo Implement testtaskRun(). - */ - public function testtaskRun() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskRun', $methods ), 'exists method taskRun' ); - $r = new ReflectionMethod('CLI', 'taskRun'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'function'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::help - * @todo Implement testhelp(). - */ - public function testhelp() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('help', $methods ), 'exists method help' ); - $r = new ReflectionMethod('CLI', 'help'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'args'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'opts'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers CLI::run - * @todo Implement testrun(). - */ - public function testrun() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('run', $methods ), 'exists method run' ); - $r = new ReflectionMethod('CLI', 'run'); - $params = $r->getParameters(); - } - - /** - * @covers CLI::info - * @todo Implement testinfo(). - */ - public function testinfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('info', $methods ), 'exists method info' ); - $r = new ReflectionMethod('CLI', 'info'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::warning - * @todo Implement testwarning(). - */ - public function testwarning() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('warning', $methods ), 'exists method warning' ); - $r = new ReflectionMethod('CLI', 'warning'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::error - * @todo Implement testerror(). - */ - public function testerror() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('error', $methods ), 'exists method error' ); - $r = new ReflectionMethod('CLI', 'error'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::prompt - * @todo Implement testprompt(). - */ - public function testprompt() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prompt', $methods ), 'exists method prompt' ); - $r = new ReflectionMethod('CLI', 'prompt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::question - * @todo Implement testquestion(). - */ - public function testquestion() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('question', $methods ), 'exists method question' ); - $r = new ReflectionMethod('CLI', 'question'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers CLI::logging - * @todo Implement testlogging(). - */ - public function testlogging() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('logging', $methods ), 'exists method logging' ); - $r = new ReflectionMethod('CLI', 'logging'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/workflow/engine/classes/classCasesTest.php b/tests/automated/workflow/engine/classes/classCasesTest.php deleted file mode 100644 index 892917c27..000000000 --- a/tests/automated/workflow/engine/classes/classCasesTest.php +++ /dev/null @@ -1,1956 +0,0 @@ -object = new Cases('appUid'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Cases'); - $this->assertTrue( count($methods) == 98); - } - - /** - * @covers Cases::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('Cases', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers Cases::canStartCase - * @todo Implement testcanStartCase(). - */ - public function testcanStartCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('canStartCase', $methods ), 'exists method canStartCase' ); - $r = new ReflectionMethod('Cases', 'canStartCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUIDUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getStartCases - * @todo Implement testgetStartCases(). - */ - public function testgetStartCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStartCases', $methods ), 'exists method getStartCases' ); - $r = new ReflectionMethod('Cases', 'getStartCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUIDUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getStartCasesPerType - * @todo Implement testgetStartCasesPerType(). - */ - public function testgetStartCasesPerType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStartCasesPerType', $methods ), 'exists method getStartCasesPerType' ); - $r = new ReflectionMethod('Cases', 'getStartCasesPerType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUIDUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[1]->getName() == 'typeView'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - } - - /** - * @covers Cases::getSelfServiceTasks - * @todo Implement testgetSelfServiceTasks(). - */ - public function testgetSelfServiceTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSelfServiceTasks', $methods ), 'exists method getSelfServiceTasks' ); - $r = new ReflectionMethod('Cases', 'getSelfServiceTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUIDUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Cases::isSelfService - * @todo Implement testisSelfService(). - */ - public function testisSelfService() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isSelfService', $methods ), 'exists method isSelfService' ); - $r = new ReflectionMethod('Cases', 'isSelfService'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'USR_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'TAS_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::loadCase - * @todo Implement testloadCase(). - */ - public function testloadCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadCase', $methods ), 'exists method loadCase' ); - $r = new ReflectionMethod('Cases', 'loadCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers Cases::loadCaseByNumber - * @todo Implement testloadCaseByNumber(). - */ - public function testloadCaseByNumber() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadCaseByNumber', $methods ), 'exists method loadCaseByNumber' ); - $r = new ReflectionMethod('Cases', 'loadCaseByNumber'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCaseNumber'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::refreshCaseLabel - * @todo Implement testrefreshCaseLabel(). - */ - public function testrefreshCaseLabel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('refreshCaseLabel', $methods ), 'exists method refreshCaseLabel' ); - $r = new ReflectionMethod('Cases', 'refreshCaseLabel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aAppData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sLabel'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::refreshCaseTitleAndDescription - * @todo Implement testrefreshCaseTitleAndDescription(). - */ - public function testrefreshCaseTitleAndDescription() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('refreshCaseTitleAndDescription', $methods ), - 'exists method refreshCaseTitleAndDescription' ); - $r = new ReflectionMethod('Cases', 'refreshCaseTitleAndDescription'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aAppData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::newRefreshCaseTitleAndDescription - * @todo Implement testnewRefreshCaseTitleAndDescription(). - */ - public function testnewRefreshCaseTitleAndDescription() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newRefreshCaseTitleAndDescription', $methods ), - 'exists method newRefreshCaseTitleAndDescription' ); - $r = new ReflectionMethod('Cases', 'newRefreshCaseTitleAndDescription'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'aAppData'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::refreshCaseTitle - * @todo Implement testrefreshCaseTitle(). - */ - public function testrefreshCaseTitle() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('refreshCaseTitle', $methods ), 'exists method refreshCaseTitle' ); - $r = new ReflectionMethod('Cases', 'refreshCaseTitle'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aAppData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::refreshCaseDescription - * @todo Implement testrefreshCaseDescription(). - */ - public function testrefreshCaseDescription() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('refreshCaseDescription', $methods ), 'exists method refreshCaseDescription' ); - $r = new ReflectionMethod('Cases', 'refreshCaseDescription'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aAppData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::refreshCaseStatusCode - * @todo Implement testrefreshCaseStatusCode(). - */ - public function testrefreshCaseStatusCode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('refreshCaseStatusCode', $methods ), 'exists method refreshCaseStatusCode' ); - $r = new ReflectionMethod('Cases', 'refreshCaseStatusCode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aAppData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::arrayRecursiveDiff - * @todo Implement testarrayRecursiveDiff(). - */ - public function testarrayRecursiveDiff() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('arrayRecursiveDiff', $methods ), 'exists method arrayRecursiveDiff' ); - $r = new ReflectionMethod('Cases', 'arrayRecursiveDiff'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aArray1'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aArray2'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::updateCase - * @todo Implement testupdateCase(). - */ - public function testupdateCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateCase', $methods ), 'exists method updateCase' ); - $r = new ReflectionMethod('Cases', 'updateCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'Fields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers Cases::removeCase - * @todo Implement testremoveCase(). - */ - public function testremoveCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeCase', $methods ), 'exists method removeCase' ); - $r = new ReflectionMethod('Cases', 'removeCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::setDelInitDate - * @todo Implement testsetDelInitDate(). - */ - public function testsetDelInitDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDelInitDate', $methods ), 'exists method setDelInitDate' ); - $r = new ReflectionMethod('Cases', 'setDelInitDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::setCatchUser - * @todo Implement testsetCatchUser(). - */ - public function testsetCatchUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setCatchUser', $methods ), 'exists method setCatchUser' ); - $r = new ReflectionMethod('Cases', 'setCatchUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'usrId'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::GetOpenThreads - * @todo Implement testGetOpenThreads(). - */ - public function testGetOpenThreads() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetOpenThreads', $methods ), 'exists method GetOpenThreads' ); - $r = new ReflectionMethod('Cases', 'GetOpenThreads'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getSiblingThreads - * @todo Implement testgetSiblingThreads(). - */ - public function testgetSiblingThreads() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSiblingThreads', $methods ), 'exists method getSiblingThreads' ); - $r = new ReflectionMethod('Cases', 'getSiblingThreads'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::getOpenSiblingThreads - * @todo Implement testgetOpenSiblingThreads(). - */ - public function testgetOpenSiblingThreads() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOpenSiblingThreads', $methods ), 'exists method getOpenSiblingThreads' ); - $r = new ReflectionMethod('Cases', 'getOpenSiblingThreads'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNextTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iDelIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sCurrentTask'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Cases::searchOpenPreviousTasks - * @todo Implement testsearchOpenPreviousTasks(). - */ - public function testsearchOpenPreviousTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('searchOpenPreviousTasks', $methods ), 'exists method searchOpenPreviousTasks' ); - $r = new ReflectionMethod('Cases', 'searchOpenPreviousTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'taskUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'aPreviousTasks'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == array()); - } - - /** - * @covers Cases::getReviewedTasks - * @todo Implement testgetReviewedTasks(). - */ - public function testgetReviewedTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getReviewedTasks', $methods ), 'exists method getReviewedTasks' ); - $r = new ReflectionMethod('Cases', 'getReviewedTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'taskUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::CountTotalPreviousTasks - * @todo Implement testCountTotalPreviousTasks(). - */ - public function testCountTotalPreviousTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('CountTotalPreviousTasks', $methods ), 'exists method CountTotalPreviousTasks' ); - $r = new ReflectionMethod('Cases', 'CountTotalPreviousTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getOpenNullDelegations - * @todo Implement testgetOpenNullDelegations(). - */ - public function testgetOpenNullDelegations() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOpenNullDelegations', $methods ), 'exists method getOpenNullDelegations' ); - $r = new ReflectionMethod('Cases', 'getOpenNullDelegations'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTasUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::isRouteOpen - * @todo Implement testisRouteOpen(). - */ - public function testisRouteOpen() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isRouteOpen', $methods ), 'exists method isRouteOpen' ); - $r = new ReflectionMethod('Cases', 'isRouteOpen'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTasUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::newAppDelegation - * @todo Implement testnewAppDelegation(). - */ - public function testnewAppDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newAppDelegation', $methods ), 'exists method newAppDelegation' ); - $r = new ReflectionMethod('Cases', 'newAppDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTasUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sUsrUid'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sPrevious'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'iPriority'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - $this->assertTrue( $params[6]->getName() == 'sDelType'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == false); - $this->assertTrue( $params[7]->getName() == 'iAppThreadIndex'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == '1'); - $this->assertTrue( $params[8]->getName() == 'nextDel'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - } - - /** - * @covers Cases::updateAppDelegation - * @todo Implement testupdateAppDelegation(). - */ - public function testupdateAppDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateAppDelegation', $methods ), 'exists method updateAppDelegation' ); - $r = new ReflectionMethod('Cases', 'updateAppDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iAppThreadIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::GetAllDelegations - * @todo Implement testGetAllDelegations(). - */ - public function testGetAllDelegations() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetAllDelegations', $methods ), 'exists method GetAllDelegations' ); - $r = new ReflectionMethod('Cases', 'GetAllDelegations'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::GetAllThreads - * @todo Implement testGetAllThreads(). - */ - public function testGetAllThreads() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetAllThreads', $methods ), 'exists method GetAllThreads' ); - $r = new ReflectionMethod('Cases', 'GetAllThreads'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::updateAppThread - * @todo Implement testupdateAppThread(). - */ - public function testupdateAppThread() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateAppThread', $methods ), 'exists method updateAppThread' ); - $r = new ReflectionMethod('Cases', 'updateAppThread'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iAppThreadIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iNewDelIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::closeAppThread - * @todo Implement testcloseAppThread(). - */ - public function testcloseAppThread() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('closeAppThread', $methods ), 'exists method closeAppThread' ); - $r = new ReflectionMethod('Cases', 'closeAppThread'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iAppThreadIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::closeAllThreads - * @todo Implement testcloseAllThreads(). - */ - public function testcloseAllThreads() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('closeAllThreads', $methods ), 'exists method closeAllThreads' ); - $r = new ReflectionMethod('Cases', 'closeAllThreads'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::newAppThread - * @todo Implement testnewAppThread(). - */ - public function testnewAppThread() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newAppThread', $methods ), 'exists method newAppThread' ); - $r = new ReflectionMethod('Cases', 'newAppThread'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iNewDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iAppParent'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::closeAllDelegations - * @todo Implement testcloseAllDelegations(). - */ - public function testcloseAllDelegations() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('closeAllDelegations', $methods ), 'exists method closeAllDelegations' ); - $r = new ReflectionMethod('Cases', 'closeAllDelegations'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::CloseCurrentDelegation - * @todo Implement testCloseCurrentDelegation(). - */ - public function testCloseCurrentDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('CloseCurrentDelegation', $methods ), 'exists method CloseCurrentDelegation' ); - $r = new ReflectionMethod('Cases', 'CloseCurrentDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::ReactivateCurrentDelegation - * @todo Implement testReactivateCurrentDelegation(). - */ - public function testReactivateCurrentDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ReactivateCurrentDelegation', $methods ), - 'exists method ReactivateCurrentDelegation' ); - $r = new ReflectionMethod('Cases', 'ReactivateCurrentDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelegation'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::startCase - * @todo Implement teststartCase(). - */ - public function teststartCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('startCase', $methods ), 'exists method startCase' ); - $r = new ReflectionMethod('Cases', 'startCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'isSubprocess'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getNextStep - * @todo Implement testgetNextStep(). - */ - public function testgetNextStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNextStep', $methods ), 'exists method getNextStep' ); - $r = new ReflectionMethod('Cases', 'getNextStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iDelIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - $this->assertTrue( $params[3]->getName() == 'iPosition'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - } - - /** - * @covers Cases::getPreviousStep - * @todo Implement testgetPreviousStep(). - */ - public function testgetPreviousStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPreviousStep', $methods ), 'exists method getPreviousStep' ); - $r = new ReflectionMethod('Cases', 'getPreviousStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sAppUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iDelIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - $this->assertTrue( $params[3]->getName() == 'iPosition'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - } - - /** - * @covers Cases::getNextSupervisorStep - * @todo Implement testgetNextSupervisorStep(). - */ - public function testgetNextSupervisorStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNextSupervisorStep', $methods ), 'exists method getNextSupervisorStep' ); - $r = new ReflectionMethod('Cases', 'getNextSupervisorStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iPosition'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'DYNAFORM'); - } - - /** - * @covers Cases::getPreviousSupervisorStep - * @todo Implement testgetPreviousSupervisorStep(). - */ - public function testgetPreviousSupervisorStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPreviousSupervisorStep', $methods ), - 'exists method getPreviousSupervisorStep' ); - $r = new ReflectionMethod('Cases', 'getPreviousSupervisorStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iPosition'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'DYNAFORM'); - } - - /** - * @covers Cases::getTransferHistoryCriteria - * @todo Implement testgetTransferHistoryCriteria(). - */ - public function testgetTransferHistoryCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTransferHistoryCriteria', $methods ), - 'exists method getTransferHistoryCriteria' ); - $r = new ReflectionMethod('Cases', 'getTransferHistoryCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::prepareCriteriaForToDo - * @todo Implement testprepareCriteriaForToDo(). - */ - public function testprepareCriteriaForToDo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepareCriteriaForToDo', $methods ), 'exists method prepareCriteriaForToDo' ); - $r = new ReflectionMethod('Cases', 'prepareCriteriaForToDo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUIDUserLogged'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getConditionCasesList - * @todo Implement testgetConditionCasesList(). - */ - public function testgetConditionCasesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getConditionCasesList', $methods ), 'exists method getConditionCasesList' ); - $r = new ReflectionMethod('Cases', 'getConditionCasesList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTypeList'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'all'); - $this->assertTrue( $params[1]->getName() == 'sUIDUserLogged'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'ClearSession'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '1'); - $this->assertTrue( $params[3]->getName() == 'aAdditionalFilter'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers Cases::loadCaseInCurrentDelegation - * @todo Implement testloadCaseInCurrentDelegation(). - */ - public function testloadCaseInCurrentDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadCaseInCurrentDelegation', $methods ), - 'exists method loadCaseInCurrentDelegation' ); - $r = new ReflectionMethod('Cases', 'loadCaseInCurrentDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'APP_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::loadCaseByDelegation - * @todo Implement testloadCaseByDelegation(). - */ - public function testloadCaseByDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadCaseByDelegation', $methods ), 'exists method loadCaseByDelegation' ); - $r = new ReflectionMethod('Cases', 'loadCaseByDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'delIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::ThrowUnpauseDaemon - * @todo Implement testThrowUnpauseDaemon(). - */ - public function testThrowUnpauseDaemon() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ThrowUnpauseDaemon', $methods ), 'exists method ThrowUnpauseDaemon' ); - $r = new ReflectionMethod('Cases', 'ThrowUnpauseDaemon'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'today'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::UnpauseRoutedCasesWithPauseFlagEnabled - * @todo Implement testUnpauseRoutedCasesWithPauseFlagEnabled(). - */ - public function testUnpauseRoutedCasesWithPauseFlagEnabled() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('UnpauseRoutedCasesWithPauseFlagEnabled', $methods ), - 'exists method UnpauseRoutedCasesWithPauseFlagEnabled' ); - $r = new ReflectionMethod('Cases', 'UnpauseRoutedCasesWithPauseFlagEnabled'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'usrLogged'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getApplicationUIDByNumber - * @todo Implement testgetApplicationUIDByNumber(). - */ - public function testgetApplicationUIDByNumber() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getApplicationUIDByNumber', $methods ), - 'exists method getApplicationUIDByNumber' ); - $r = new ReflectionMethod('Cases', 'getApplicationUIDByNumber'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'iApplicationNumber'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getCurrentDelegation - * @todo Implement testgetCurrentDelegation(). - */ - public function testgetCurrentDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCurrentDelegation', $methods ), 'exists method getCurrentDelegation' ); - $r = new ReflectionMethod('Cases', 'getCurrentDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sUserUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Cases::loadTriggers - * @todo Implement testloadTriggers(). - */ - public function testloadTriggers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadTriggers', $methods ), 'exists method loadTriggers' ); - $r = new ReflectionMethod('Cases', 'loadTriggers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sStepType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sStepUidObj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sTriggerType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Cases::executeTriggers - * @todo Implement testexecuteTriggers(). - */ - public function testexecuteTriggers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeTriggers', $methods ), 'exists method executeTriggers' ); - $r = new ReflectionMethod('Cases', 'executeTriggers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sStepType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sStepUidObj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sTriggerType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'aFields'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == array()); - } - - /** - * @covers Cases::getTriggerNames - * @todo Implement testgetTriggerNames(). - */ - public function testgetTriggerNames() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTriggerNames', $methods ), 'exists method getTriggerNames' ); - $r = new ReflectionMethod('Cases', 'getTriggerNames'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'triggers'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getInputDocumentsCriteria - * @todo Implement testgetInputDocumentsCriteria(). - */ - public function testgetInputDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getInputDocumentsCriteria', $methods ), - 'exists method getInputDocumentsCriteria' ); - $r = new ReflectionMethod('Cases', 'getInputDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelegation'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sDocumentUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sAppDocuUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getInputDocumentsCriteriaToRevise - * @todo Implement testgetInputDocumentsCriteriaToRevise(). - */ - public function testgetInputDocumentsCriteriaToRevise() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getInputDocumentsCriteriaToRevise', $methods ), - 'exists method getInputDocumentsCriteriaToRevise' ); - $r = new ReflectionMethod('Cases', 'getInputDocumentsCriteriaToRevise'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getOutputDocumentsCriteriaToRevise - * @todo Implement testgetOutputDocumentsCriteriaToRevise(). - */ - public function testgetOutputDocumentsCriteriaToRevise() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOutputDocumentsCriteriaToRevise', $methods ), - 'exists method getOutputDocumentsCriteriaToRevise' ); - $r = new ReflectionMethod('Cases', 'getOutputDocumentsCriteriaToRevise'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getCriteriaProcessCases - * @todo Implement testgetCriteriaProcessCases(). - */ - public function testgetCriteriaProcessCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCriteriaProcessCases', $methods ), 'exists method getCriteriaProcessCases' ); - $r = new ReflectionMethod('Cases', 'getCriteriaProcessCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'PRO_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::pauseCase - * @todo Implement testpauseCase(). - */ - public function testpauseCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('pauseCase', $methods ), 'exists method pauseCase' ); - $r = new ReflectionMethod('Cases', 'pauseCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelegation'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sUserUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sUnpauseDate'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers Cases::unpauseCase - * @todo Implement testunpauseCase(). - */ - public function testunpauseCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unpauseCase', $methods ), 'exists method unpauseCase' ); - $r = new ReflectionMethod('Cases', 'unpauseCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelegation'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sUserUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::cancelCase - * @todo Implement testcancelCase(). - */ - public function testcancelCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('cancelCase', $methods ), 'exists method cancelCase' ); - $r = new ReflectionMethod('Cases', 'cancelCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'user_logged'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::reactivateCase - * @todo Implement testreactivateCase(). - */ - public function testreactivateCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reactivateCase', $methods ), 'exists method reactivateCase' ); - $r = new ReflectionMethod('Cases', 'reactivateCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'user_logged'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::reassignCase - * @todo Implement testreassignCase(). - */ - public function testreassignCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reassignCase', $methods ), 'exists method reassignCase' ); - $r = new ReflectionMethod('Cases', 'reassignCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelegation'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sUserUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'newUserUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sType'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == 'REASSIGN'); - } - - /** - * @covers Cases::getAllDynaformsStepsToRevise - * @todo Implement testgetAllDynaformsStepsToRevise(). - */ - public function testgetAllDynaformsStepsToRevise() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllDynaformsStepsToRevise', $methods ), - 'exists method getAllDynaformsStepsToRevise' ); - $r = new ReflectionMethod('Cases', 'getAllDynaformsStepsToRevise'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'APP_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getAllInputsStepsToRevise - * @todo Implement testgetAllInputsStepsToRevise(). - */ - public function testgetAllInputsStepsToRevise() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllInputsStepsToRevise', $methods ), - 'exists method getAllInputsStepsToRevise' ); - $r = new ReflectionMethod('Cases', 'getAllInputsStepsToRevise'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'APP_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getAllUploadedDocumentsCriteria - * @todo Implement testgetAllUploadedDocumentsCriteria(). - */ - public function testgetAllUploadedDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUploadedDocumentsCriteria', $methods ), - 'exists method getAllUploadedDocumentsCriteria' ); - $r = new ReflectionMethod('Cases', 'getAllUploadedDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTasKUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sUserUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Cases::getAllGeneratedDocumentsCriteria - * @todo Implement testgetAllGeneratedDocumentsCriteria(). - */ - public function testgetAllGeneratedDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllGeneratedDocumentsCriteria', $methods ), - 'exists method getAllGeneratedDocumentsCriteria' ); - $r = new ReflectionMethod('Cases', 'getAllGeneratedDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTasKUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sUserUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Cases::getallDynaformsCriteria - * @todo Implement testgetallDynaformsCriteria(). - */ - public function testgetallDynaformsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getallDynaformsCriteria', $methods ), 'exists method getallDynaformsCriteria' ); - $r = new ReflectionMethod('Cases', 'getallDynaformsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTasKUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sUserUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Cases::sendNotifications - * @todo Implement testsendNotifications(). - */ - public function testsendNotifications() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendNotifications', $methods ), 'exists method sendNotifications' ); - $r = new ReflectionMethod('Cases', 'sendNotifications'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCurrentTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aTasks'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'aFields'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'iDelegation'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'sFrom'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getAllObjects - * @todo Implement testgetAllObjects(). - */ - public function testgetAllObjects() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllObjects', $methods ), 'exists method getAllObjects' ); - $r = new ReflectionMethod('Cases', 'getAllObjects'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'PRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'APP_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'TAS_UID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[3]->getName() == 'USR_UID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - } - - /** - * @covers Cases::getAllObjectsFrom - * @todo Implement testgetAllObjectsFrom(). - */ - public function testgetAllObjectsFrom() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllObjectsFrom', $methods ), 'exists method getAllObjectsFrom' ); - $r = new ReflectionMethod('Cases', 'getAllObjectsFrom'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'PRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'APP_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'TAS_UID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[3]->getName() == 'USR_UID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[4]->getName() == 'ACTION'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Cases::verifyCaseTracker - * @todo Implement testverifyCaseTracker(). - */ - public function testverifyCaseTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyCaseTracker', $methods ), 'exists method verifyCaseTracker' ); - $r = new ReflectionMethod('Cases', 'verifyCaseTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'case'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pin'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::caseTrackerPermissions - * @todo Implement testcaseTrackerPermissions(). - */ - public function testcaseTrackerPermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseTrackerPermissions', $methods ), 'exists method caseTrackerPermissions' ); - $r = new ReflectionMethod('Cases', 'caseTrackerPermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'PRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::verifyTable - * @todo Implement testverifyTable(). - */ - public function testverifyTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyTable', $methods ), 'exists method verifyTable' ); - $r = new ReflectionMethod('Cases', 'verifyTable'); - $params = $r->getParameters(); - } - - /** - * @covers Cases::getAllUploadedDocumentsCriteriaTracker - * @todo Implement testgetAllUploadedDocumentsCriteriaTracker(). - */ - public function testgetAllUploadedDocumentsCriteriaTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUploadedDocumentsCriteriaTracker', $methods ), - 'exists method getAllUploadedDocumentsCriteriaTracker' ); - $r = new ReflectionMethod('Cases', 'getAllUploadedDocumentsCriteriaTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sDocUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::getAllGeneratedDocumentsCriteriaTracker - * @todo Implement testgetAllGeneratedDocumentsCriteriaTracker(). - */ - public function testgetAllGeneratedDocumentsCriteriaTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllGeneratedDocumentsCriteriaTracker', $methods ), - 'exists method getAllGeneratedDocumentsCriteriaTracker' ); - $r = new ReflectionMethod('Cases', 'getAllGeneratedDocumentsCriteriaTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sDocUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Cases::getHistoryMessagesTracker - * @todo Implement testgetHistoryMessagesTracker(). - */ - public function testgetHistoryMessagesTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHistoryMessagesTracker', $methods ), - 'exists method getHistoryMessagesTracker' ); - $r = new ReflectionMethod('Cases', 'getHistoryMessagesTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getHistoryMessagesTrackerExt - * @todo Implement testgetHistoryMessagesTrackerExt(). - */ - public function testgetHistoryMessagesTrackerExt() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHistoryMessagesTrackerExt', $methods ), - 'exists method getHistoryMessagesTrackerExt' ); - $r = new ReflectionMethod('Cases', 'getHistoryMessagesTrackerExt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getHistoryMessagesTrackerView - * @todo Implement testgetHistoryMessagesTrackerView(). - */ - public function testgetHistoryMessagesTrackerView() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getHistoryMessagesTrackerView', $methods ), - 'exists method getHistoryMessagesTrackerView' ); - $r = new ReflectionMethod('Cases', 'getHistoryMessagesTrackerView'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'Msg_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::getAllObjectsFromProcess - * @todo Implement testgetAllObjectsFromProcess(). - */ - public function testgetAllObjectsFromProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllObjectsFromProcess', $methods ), - 'exists method getAllObjectsFromProcess' ); - $r = new ReflectionMethod('Cases', 'getAllObjectsFromProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'PRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'OBJ_TYPE'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '%'); - } - - /** - * @covers Cases::executeTriggersAfterExternal - * @todo Implement testexecuteTriggersAfterExternal(). - */ - public function testexecuteTriggersAfterExternal() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeTriggersAfterExternal', $methods ), - 'exists method executeTriggersAfterExternal' ); - $r = new ReflectionMethod('Cases', 'executeTriggersAfterExternal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcess'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTask'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sApplication'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'iIndex'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'iStepPosition'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'aNewData'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == array()); - } - - /** - * @covers Cases::thisIsTheCurrentUser - * @todo Implement testthisIsTheCurrentUser(). - */ - public function testthisIsTheCurrentUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('thisIsTheCurrentUser', $methods ), 'exists method thisIsTheCurrentUser' ); - $r = new ReflectionMethod('Cases', 'thisIsTheCurrentUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sUserUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sAction'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'sURL'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getCriteriaUsersCases - * @todo Implement testgetCriteriaUsersCases(). - */ - public function testgetCriteriaUsersCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCriteriaUsersCases', $methods ), 'exists method getCriteriaUsersCases' ); - $r = new ReflectionMethod('Cases', 'getCriteriaUsersCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'USR_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::getAdvancedSearch - * @todo Implement testgetAdvancedSearch(). - */ - public function testgetAdvancedSearch() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdvancedSearch', $methods ), 'exists method getAdvancedSearch' ); - $r = new ReflectionMethod('Cases', 'getAdvancedSearch'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCase'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcess'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTask'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sCurrentUser'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sSentby'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'sLastModFrom'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - $this->assertTrue( $params[6]->getName() == 'sLastModTo'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == false); - $this->assertTrue( $params[7]->getName() == 'sStatus'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == false); - $this->assertTrue( $params[8]->getName() == 'permisse'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == false); - $this->assertTrue( $params[9]->getName() == 'userlogged'); - $this->assertTrue( $params[9]->isArray() == false); - $this->assertTrue( $params[9]->isOptional () == false); - $this->assertTrue( $params[10]->getName() == 'aSupervisor'); - $this->assertTrue( $params[10]->isArray() == false); - $this->assertTrue( $params[10]->isOptional () == false); - } - - /** - * @covers Cases::getConditionCasesCount - * @todo Implement testgetConditionCasesCount(). - */ - public function testgetConditionCasesCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getConditionCasesCount', $methods ), 'exists method getConditionCasesCount' ); - $r = new ReflectionMethod('Cases', 'getConditionCasesCount'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'type'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sumary'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Cases::getAllConditionCasesCount - * @todo Implement testgetAllConditionCasesCount(). - */ - public function testgetAllConditionCasesCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllConditionCasesCount', $methods ), - 'exists method getAllConditionCasesCount' ); - $r = new ReflectionMethod('Cases', 'getAllConditionCasesCount'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'types'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sumary'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Cases::userParticipatedInCase - * @todo Implement testuserParticipatedInCase(). - */ - public function testuserParticipatedInCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('userParticipatedInCase', $methods ), 'exists method userParticipatedInCase' ); - $r = new ReflectionMethod('Cases', 'userParticipatedInCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUIDUserLogged'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::getCurrentDelegationCase - * @todo Implement testgetCurrentDelegationCase(). - */ - public function testgetCurrentDelegationCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCurrentDelegationCase', $methods ), 'exists method getCurrentDelegationCase' ); - $r = new ReflectionMethod('Cases', 'getCurrentDelegationCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Cases::clearCaseSessionData - * @todo Implement testclearCaseSessionData(). - */ - public function testclearCaseSessionData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('clearCaseSessionData', $methods ), 'exists method clearCaseSessionData' ); - $r = new ReflectionMethod('Cases', 'clearCaseSessionData'); - $params = $r->getParameters(); - } - - /** - * @covers Cases::jumpToCase - * @todo Implement testjumpToCase(). - */ - public function testjumpToCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('jumpToCase', $methods ), 'exists method jumpToCase' ); - $r = new ReflectionMethod('Cases', 'jumpToCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'APP_NUMBER'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::discriminateCases - * @todo Implement testdiscriminateCases(). - */ - public function testdiscriminateCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('discriminateCases', $methods ), 'exists method discriminateCases' ); - $r = new ReflectionMethod('Cases', 'discriminateCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::GetAllOpenDelegation - * @todo Implement testGetAllOpenDelegation(). - */ - public function testGetAllOpenDelegation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetAllOpenDelegation', $methods ), 'exists method GetAllOpenDelegation' ); - $r = new ReflectionMethod('Cases', 'GetAllOpenDelegation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getUsersToReassign - * @todo Implement testgetUsersToReassign(). - */ - public function testgetUsersToReassign() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUsersToReassign', $methods ), 'exists method getUsersToReassign' ); - $r = new ReflectionMethod('Cases', 'getUsersToReassign'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'TAS_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'USR_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Cases::getUsersParticipatedInCase - * @todo Implement testgetUsersParticipatedInCase(). - */ - public function testgetUsersParticipatedInCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUsersParticipatedInCase', $methods ), - 'exists method getUsersParticipatedInCase' ); - $r = new ReflectionMethod('Cases', 'getUsersParticipatedInCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sAppUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Cases::getCaseNotes - * @todo Implement testgetCaseNotes(). - */ - public function testgetCaseNotes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseNotes', $methods ), 'exists method getCaseNotes' ); - $r = new ReflectionMethod('Cases', 'getCaseNotes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'applicationID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'array'); - $this->assertTrue( $params[2]->getName() == 'userUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } -} - diff --git a/tests/automated/workflow/engine/classes/classConfigurationsTest.php b/tests/automated/workflow/engine/classes/classConfigurationsTest.php deleted file mode 100644 index 5394d098e..000000000 --- a/tests/automated/workflow/engine/classes/classConfigurationsTest.php +++ /dev/null @@ -1,398 +0,0 @@ -object = new Configurations(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Configurations'); $this->assertTrue( count($methods) == 17); - } - - /** - * @covers Configurations::Configurations - * @todo Implement testConfigurations(). - */ - public function testConfigurations() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('Configurations', $methods ), 'exists method Configurations' ); - $r = new ReflectionMethod('Configurations', 'Configurations'); - $params = $r->getParameters(); - } - - /** - * @covers Configurations::arrayClone - * @todo Implement testarrayClone(). - */ - public function testarrayClone() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('arrayClone', $methods ), 'exists method arrayClone' ); - $r = new ReflectionMethod('Configurations', 'arrayClone'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'object'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'cloneObject'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Configurations::configObject - * @todo Implement testconfigObject(). - */ - public function testconfigObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('configObject', $methods ), 'exists method configObject' ); - $r = new ReflectionMethod('Configurations', 'configObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'object'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'from'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Configurations::loadConfig - * @todo Implement testloadConfig(). - */ - public function testloadConfig() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadConfig', $methods ), 'exists method loadConfig' ); - $r = new ReflectionMethod('Configurations', 'loadConfig'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'object'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'cfg'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'obj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'pro'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'usr'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'app'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('Configurations', 'load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'cfg'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'pro'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'usr'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'app'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::saveConfig - * @todo Implement testsaveConfig(). - */ - public function testsaveConfig() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveConfig', $methods ), 'exists method saveConfig' ); - $r = new ReflectionMethod('Configurations', 'saveConfig'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'cfg'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pro'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'usr'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'app'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::saveObject - * @todo Implement testsaveObject(). - */ - public function testsaveObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveObject', $methods ), 'exists method saveObject' ); - $r = new ReflectionMethod('Configurations', 'saveObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'object'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'cfg'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'obj'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'pro'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'usr'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'app'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::loadObject - * @todo Implement testloadObject(). - */ - public function testloadObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadObject', $methods ), 'exists method loadObject' ); - $r = new ReflectionMethod('Configurations', 'loadObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'cfg'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pro'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'usr'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'app'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::getConfiguration - * @todo Implement testgetConfiguration(). - */ - public function testgetConfiguration() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getConfiguration', $methods ), 'exists method getConfiguration' ); - $r = new ReflectionMethod('Configurations', 'getConfiguration'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'cfg'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'obj'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pro'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'usr'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'app'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers Configurations::usersNameFormat - * @todo Implement testusersNameFormat(). - */ - public function testusersNameFormat() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('usersNameFormat', $methods ), 'exists method usersNameFormat' ); - $r = new ReflectionMethod('Configurations', 'usersNameFormat'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'username'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'firstname'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'lastname'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Configurations::getFormats - * @todo Implement testgetFormats(). - */ - public function testgetFormats() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFormats', $methods ), 'exists method getFormats' ); - $r = new ReflectionMethod('Configurations', 'getFormats'); - $params = $r->getParameters(); - } - - /** - * @covers Configurations::setConfig - * @todo Implement testsetConfig(). - */ - public function testsetConfig() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setConfig', $methods ), 'exists method setConfig' ); - $r = new ReflectionMethod('Configurations', 'setConfig'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'route'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'object'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'to'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Configurations::getDateFormats - * @todo Implement testgetDateFormats(). - */ - public function testgetDateFormats() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDateFormats', $methods ), 'exists method getDateFormats' ); - $r = new ReflectionMethod('Configurations', 'getDateFormats'); - $params = $r->getParameters(); - } - - /** - * @covers Configurations::getUserNameFormats - * @todo Implement testgetUserNameFormats(). - */ - public function testgetUserNameFormats() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUserNameFormats', $methods ), 'exists method getUserNameFormats' ); - $r = new ReflectionMethod('Configurations', 'getUserNameFormats'); - $params = $r->getParameters(); - } - - /** - * @covers Configurations::getSystemDate - * @todo Implement testgetSystemDate(). - */ - public function testgetSystemDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSystemDate', $methods ), 'exists method getSystemDate' ); - $r = new ReflectionMethod('Configurations', 'getSystemDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dateTime'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Configurations::getEnvSetting - * @todo Implement testgetEnvSetting(). - */ - public function testgetEnvSetting() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getEnvSetting', $methods ), 'exists method getEnvSetting' ); - $r = new ReflectionMethod('Configurations', 'getEnvSetting'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'data'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/workflow/engine/classes/classDerivationTest.php b/tests/automated/workflow/engine/classes/classDerivationTest.php deleted file mode 100644 index 79ad0352f..000000000 --- a/tests/automated/workflow/engine/classes/classDerivationTest.php +++ /dev/null @@ -1,271 +0,0 @@ -object = new Derivation(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Derivation'); - $this->assertTrue(count($methods) == 14, count($methods)); - } - - /** - * @covers Derivation::prepareInformation - * @todo Implement testprepareInformation(). - */ - public function testprepareInformation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepareInformation', $methods ), 'exists method prepareInformation' ); - $r = new ReflectionMethod('Derivation', 'prepareInformation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Derivation::getRouteCondition - * @todo Implement testgetRouteCondition(). - */ - public function testgetRouteCondition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRouteCondition', $methods ), 'exists method getRouteCondition' ); - $r = new ReflectionMethod('Derivation', 'getRouteCondition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Derivation::GetAppParentIndex - * @todo Implement testGetAppParentIndex(). - */ - public function testGetAppParentIndex() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('GetAppParentIndex', $methods ), 'exists method GetAppParentIndex' ); - $r = new ReflectionMethod('Derivation', 'GetAppParentIndex'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Derivation::getAllUsersFromAnyTask - * @todo Implement testgetAllUsersFromAnyTask(). - */ - public function testgetAllUsersFromAnyTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllUsersFromAnyTask', $methods ), 'exists method getAllUsersFromAnyTask' ); - $r = new ReflectionMethod('Derivation', 'getAllUsersFromAnyTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Derivation::getUsersFullNameFromArray - * @todo Implement testgetUsersFullNameFromArray(). - */ - public function testgetUsersFullNameFromArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getUsersFullNameFromArray', $methods), 'exists method getUsersFullNameFromArray'); - $r = new ReflectionMethod('Derivation', 'getUsersFullNameFromArray'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'aUsers'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers Derivation::getNextAssignedUser - * @todo Implement testgetNextAssignedUser(). - */ - public function testgetNextAssignedUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNextAssignedUser', $methods ), 'exists method getNextAssignedUser' ); - $r = new ReflectionMethod('Derivation', 'getNextAssignedUser'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'tasInfo'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers Derivation::getDenpendentUser - * @todo Implement testgetDenpendentUser(). - */ - public function testgetDenpendentUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDenpendentUser', $methods ), 'exists method getDenpendentUser' ); - $r = new ReflectionMethod('Derivation', 'getDenpendentUser'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'USR_UID'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers Derivation::setTasLastAssigned - * @todo Implement testsetTasLastAssigned(). - */ - public function testsetTasLastAssigned() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setTasLastAssigned', $methods ), 'exists method setTasLastAssigned' ); - $r = new ReflectionMethod('Derivation', 'setTasLastAssigned'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'tasUid'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'usrUid'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers Derivation::derivate - * @todo Implement testderivate(). - */ - public function testderivate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('derivate', $methods ), 'exists method derivate' ); - $r = new ReflectionMethod('Derivation', 'derivate'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'currentDelegation'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == true); - $this->assertTrue($params[0]->getDefaultValue() == array()); - $this->assertTrue($params[1]->getName() == 'nextDelegations'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == array()); - } - - /** - * @covers Derivation::doDerivation - * @todo Implement testdoDerivation(). - */ - public function testdoDerivation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('doDerivation', $methods ), 'exists method doDerivation' ); - $r = new ReflectionMethod('Derivation', 'doDerivation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'currentDelegation'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'nextDel'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'appFields'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'aSP'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers Derivation::verifyIsCaseChild - * @todo Implement testverifyIsCaseChild(). - */ - public function testverifyIsCaseChild() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyIsCaseChild', $methods ), 'exists method verifyIsCaseChild' ); - $r = new ReflectionMethod('Derivation', 'verifyIsCaseChild'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Derivation::getDerivatedCases - * @todo Implement testgetDerivatedCases(). - */ - public function testgetDerivatedCases() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDerivatedCases', $methods ), 'exists method getDerivatedCases' ); - $r = new ReflectionMethod('Derivation', 'getDerivatedCases'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sParentUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sDelIndexParent'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Derivation::getGrpUser - * @todo Implement testgetGrpUser(). - */ - public function testgetGrpUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGrpUser', $methods ), 'exists method getGrpUser' ); - $r = new ReflectionMethod('Derivation', 'getGrpUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classDynaFormFieldTest.php b/tests/automated/workflow/engine/classes/classDynaFormFieldTest.php deleted file mode 100644 index 4761de85b..000000000 --- a/tests/automated/workflow/engine/classes/classDynaFormFieldTest.php +++ /dev/null @@ -1,132 +0,0 @@ -object = new DynaFormField(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('DynaFormField'); - $this->assertTrue(count($methods) == 15); - } - - /** - * @covers DynaFormField::SetTo - * @todo Implement testSetTo(). - */ - public function testSetTo() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('SetTo', $methods), 'exists method SetTo'); - $r = new ReflectionMethod('DynaFormField', 'SetTo'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'objConnection'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers DynaFormField::Load - * @todo Implement testLoad(). - */ - public function testLoad() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('Load', $methods), 'exists method Load'); - $r = new ReflectionMethod('DynaFormField', 'Load'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sUID'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers DynaFormField::Delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('Delete', $methods), 'exists method Delete'); - $r = new ReflectionMethod('DynaFormField', 'Delete'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'uid'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers DynaFormField::Save - * @todo Implement testSave(). - */ - public function testSave() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('Save', $methods), 'exists method Save'); - $r = new ReflectionMethod('DynaFormField', 'Save'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'Fields'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'labels'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == array()); - $this->assertTrue($params[2]->getName() == 'options'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == true); - $this->assertTrue($params[2]->getDefaultValue() == array()); - } - - /** - * @covers DynaFormField::isNew - * @todo Implement testisNew(). - */ - public function testisNew() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('isNew', $methods), 'exists method isNew'); - $r = new ReflectionMethod('DynaFormField', 'isNew'); - $params = $r->getParameters(); - } -} diff --git a/tests/automated/workflow/engine/classes/classFieldValidatorTest.php b/tests/automated/workflow/engine/classes/classFieldValidatorTest.php deleted file mode 100644 index 5c7c64d7d..000000000 --- a/tests/automated/workflow/engine/classes/classFieldValidatorTest.php +++ /dev/null @@ -1,441 +0,0 @@ -object = new FieldValidator(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('FieldValidator'); - $this->assertTrue( count($methods) == 7); - } - - /** - * Test all methods structure - */ - public function testAllMethodsStructure() - { - $methods = get_class_methods($this->object); - - //isInt - $this->assertTrue( in_array('isInt', $methods ), 'exists method isInt' ); - $r = new ReflectionMethod('FieldValidator', 'isInt'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'num'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //isReal - $this->assertTrue( in_array('isReal', $methods ), 'exists method isReal' ); - $r = new ReflectionMethod('FieldValidator', 'isReal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'num'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //isBool - $this->assertTrue( in_array('isBool', $methods ), 'exists method isBool' ); - $r = new ReflectionMethod('FieldValidator', 'isBool'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'bool'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //isUrl - $this->assertTrue( in_array('isUrl', $methods ), 'exists method isUrl' ); - $r = new ReflectionMethod('FieldValidator', 'isUrl'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'url'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //isEmail - $this->assertTrue( in_array('isEmail', $methods ), 'exists method isEmail' ); - $r = new ReflectionMethod('FieldValidator', 'isEmail'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'email'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //isIp - $this->assertTrue( in_array('isIp', $methods ), 'exists method isIp' ); - $r = new ReflectionMethod('FieldValidator', 'isIp'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ip'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - - //validate - $this->assertTrue( in_array('validate', $methods ), 'exists method validate' ); - $r = new ReflectionMethod('FieldValidator', 'validate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arrayData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'arrayDataValidators'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers FieldValidator::isInt - */ - public function testIsInt() - { - $this->assertTrue($this->object->isInt(0)); - $this->assertTrue($this->object->isInt("0")); - $this->assertTrue($this->object->isInt(+0)); - $this->assertTrue($this->object->isInt("+0")); - $this->assertTrue($this->object->isInt(-0)); - $this->assertTrue($this->object->isInt("-0")); - - $this->assertTrue($this->object->isInt(55)); - $this->assertTrue($this->object->isInt("55")); - $this->assertTrue($this->object->isInt(+55)); - $this->assertTrue($this->object->isInt("+55")); - $this->assertTrue($this->object->isInt(-55)); - $this->assertTrue($this->object->isInt("-55")); - - $this->assertFalse($this->object->isInt("")); - - $this->assertFalse($this->object->isInt(55.5)); - $this->assertFalse($this->object->isInt("55.5")); - $this->assertFalse($this->object->isInt(+55.5)); - $this->assertFalse($this->object->isInt("+55.5")); - $this->assertFalse($this->object->isInt(-55.5)); - $this->assertFalse($this->object->isInt("-55.5")); - } - - /** - * @covers FieldValidator::isReal - */ - public function testIsReal() - { - $this->assertTrue($this->object->isReal(0)); - $this->assertTrue($this->object->isReal("0")); - $this->assertTrue($this->object->isReal(+0)); - $this->assertTrue($this->object->isReal("+0")); - $this->assertTrue($this->object->isReal(-0)); - $this->assertTrue($this->object->isReal("-0")); - - $this->assertTrue($this->object->isReal(55)); - $this->assertTrue($this->object->isReal("55")); - $this->assertTrue($this->object->isReal(+55)); - $this->assertTrue($this->object->isReal("+55")); - $this->assertTrue($this->object->isReal(-55)); - $this->assertTrue($this->object->isReal("-55")); - - $this->assertTrue($this->object->isReal(55.5)); - $this->assertTrue($this->object->isReal("55.5")); - $this->assertTrue($this->object->isReal(+55.5)); - $this->assertTrue($this->object->isReal("+55.5")); - $this->assertTrue($this->object->isReal(-55.5)); - $this->assertTrue($this->object->isReal("-55.5")); - - $this->assertFalse($this->object->isReal("")); - - $this->assertFalse($this->object->isReal(".5")); - $this->assertFalse($this->object->isReal("a")); - } - - /** - * @covers FieldValidator::isBool - */ - public function testIsBool() - { - $this->assertTrue($this->object->isBool(true)); - $this->assertTrue($this->object->isBool(false)); - - $this->assertTrue($this->object->isBool("true")); - $this->assertTrue($this->object->isBool("false")); - - $this->assertFalse($this->object->isBool("")); - - $this->assertFalse($this->object->isBool(1)); - $this->assertFalse($this->object->isBool(0)); - $this->assertFalse($this->object->isBool("1")); - $this->assertFalse($this->object->isBool("0")); - } - - /** - * @covers FieldValidator::isUrl - */ - public function testIsUrl() - { - $this->assertTrue($this->object->isUrl("http://www.myweb.com")); - $this->assertTrue($this->object->isUrl("http://www.myweb.com/")); - $this->assertTrue($this->object->isUrl("https://www.myweb.com")); - $this->assertTrue($this->object->isUrl("https://www.myweb.com/")); - $this->assertTrue($this->object->isUrl("https://www.myweb.com.bo")); - $this->assertTrue($this->object->isUrl("https://myweb.com")); - $this->assertTrue($this->object->isUrl("https://myweb.com.bo")); - $this->assertTrue($this->object->isUrl("http://192.168.10.58")); - $this->assertTrue($this->object->isUrl("https://192.168.10.58")); - $this->assertTrue($this->object->isUrl("http://192.168.10.58:8080")); - $this->assertTrue($this->object->isUrl("https://192.168.10.58:8080/")); - $this->assertTrue($this->object->isUrl("http://www.myweb.com/project/01/activity/01/steps")); - $this->assertTrue($this->object->isUrl("http://www.myweb.com/project/01/activity/01/steps.php")); - - $this->assertFalse($this->object->isUrl("")); - - $this->assertFalse($this->object->isUrl("www.myweb.com")); - $this->assertFalse($this->object->isUrl("www.myweb.com.bo")); - $this->assertFalse($this->object->isUrl("http ://www.myweb.com/")); - $this->assertFalse($this->object->isUrl("http://myweb")); - $this->assertFalse($this->object->isUrl("myweb")); - $this->assertFalse($this->object->isUrl("192.168.10.58")); - $this->assertFalse($this->object->isUrl("xttp://192.168.10.58")); - $this->assertFalse($this->object->isUrl("http:://192.168.10.58:8080/")); - $this->assertFalse($this->object->isUrl("http://")); - $this->assertFalse($this->object->isUrl("https://")); - } - - /** - * @covers FieldValidator::isEmail - */ - public function testIsEmail() - { - $this->assertTrue($this->object->isEmail("my-email@myweb.com")); - $this->assertTrue($this->object->isEmail("my.email@myweb.com.bo")); - $this->assertTrue($this->object->isEmail("my-email.sample@myweb.com")); - $this->assertTrue($this->object->isEmail("my-email@my-web.com")); - $this->assertTrue($this->object->isEmail("my-2013-email@my-web.com")); - $this->assertTrue($this->object->isEmail("2013-my-email@my-web.com")); - - $this->assertFalse($this->object->isEmail("")); - - $this->assertFalse($this->object->isEmail(" @myweb.com")); - $this->assertFalse($this->object->isEmail("my@email@myweb.com.bo")); - $this->assertFalse($this->object->isEmail("my-2013-email")); - $this->assertFalse($this->object->isEmail("my-email@myweb")); - $this->assertFalse($this->object->isEmail(".@myweb.com")); - $this->assertFalse($this->object->isEmail("-@myweb.com")); - $this->assertFalse($this->object->isEmail("@myweb.com")); - $this->assertFalse($this->object->isEmail("sample@.com")); - $this->assertFalse($this->object->isEmail("sample.com")); - } - - /** - * @covers FieldValidator::isIp - */ - public function testIsIp() - { - $this->assertTrue($this->object->isIp("255.255.255.255")); - $this->assertTrue($this->object->isIp("0.0.0.0")); - $this->assertTrue($this->object->isIp("127.0.0.1")); - - $this->assertFalse($this->object->isIp("")); - - $this->assertFalse($this->object->isIp("127.o.0.1")); - $this->assertFalse($this->object->isIp("127.0.0.")); - $this->assertFalse($this->object->isIp("127.0.0")); - $this->assertFalse($this->object->isIp(".0.0.1")); - $this->assertFalse($this->object->isIp("127..0.1")); - } - - /** - * @covers FieldValidator::validate - */ - public function testValidate() - { - //Data OK - $arrayField = array( - "name" => "peter", - "lastname" => "parker", - "age" => 33, - "weight" => 56.55, - "website" => "http://www.myweb.com/", - "email" => "spider-man@myweb.com", - "alive" => true - ); - - $arrayValidators = array( - "name" => array( - "type" => "string", - "required" => true, - "min_size" => 5 - ), - "lastname" => array( - "type" => "string", - "min_size" => 2 - ), - "age" => array( - "type" => "int", - "required" => true - ), - "weight" => array( - "type" => "real", - "required" => true - ), - "website" => array( - "validation" => "url" - ), - "email" => array( - "type" => "string", - "required" => false, - "validation" => "email" - ), - "alive" => array( - "type" => "boolean" - ), - "ip" => array( - "validation" => "ip", - "required" => false - ) - ); - - $result = $this->object->validate($arrayField, $arrayValidators); - - $expectedSuccess = true; - $expectedErrors = array(); - - $this->assertEquals($result["success"], $expectedSuccess); - $this->assertEquals($result["errors"], $expectedErrors); - - //Data failed - $arrayField = array( - "name" => "Dan", - "lastname" => "", - "age" => "hello", - "weight" => "", - "website" => "www.myweb.com", - "email" => "spider-man@myweb", - "alive" => 1 - ); - - $arrayValidators = array( - "name" => array( - "type" => "string", - "required" => true, - "min_size" => 4 - ), - "lastname" => array( - "type" => "string", - "required" => true - ), - "age" => array( - "type" => "int" - ), - "weight" => array( - "type" => "real", - "required" => true - ), - "website" => array( - "validation" => "url" - ), - "email" => array( - "type" => "string", - "required" => false, - "validation" => "email" - ), - "alive" => array( - "type" => "boolean" - ), - "ip" => array( - "validation" => "ip", - "required" => false - ) - ); - - $result = $this->object->validate($arrayField, $arrayValidators); - - $expectedSuccess = false; - $expectedErrors = array( - "Field \"name\" should be min 4 chars, 3 given", - "Field \"lastname\" is required", - "Field \"age\" not is an integer number", - "Field \"weight\" not is an real number", - "Field \"weight\" is required", - "Field \"website\" have not an valid URL format", - "Field \"email\" have not an valid email format", - "Field \"alive\" not is an boolean" - ); - - $this->assertEquals($result["success"], $expectedSuccess); - $this->assertEquals($result["errors"], $expectedErrors); - } - - /** - * - */ - public function dataProviderTestValidateExceptionCovers() - { - return array( - array("", array(), false), - array(array(), "", false), - array(array(), array(1), false), - array(array(1), array(), false) - ); - } - - /** - * @covers FieldValidator::validate - * @dataProvider dataProviderTestValidateExceptionCovers - */ - public function testValidateExceptionCovers($arrayData, $arrayDataValidators, $success) - { - $result = $this->object->validate($arrayData, $arrayDataValidators); - - $this->assertEquals($result["success"], $success); - } - - /** - * - */ - public function dataProviderTestValidateRemainingCovers() - { - return array( - array(array("age" => 55.5), array("age" => array("type" => "int")), false), - array(array("pi" => "3_1416"), array("pi" => array("type" => "real")), false), - array(array("flag" => 1), array("flag" => array("type" => "bool")), false), - array(array("name" => "peter"), array("name" => array("type" => "string")), true), - - array(array("email" => "my--email@myweb.com"), array("email" => array("validation" => "email")), false), - array(array("ip" => "127.0.0"), array("ip" => array("validation" => "ip")), false), - - array(array("name" => "peter"), array("name" => array("min_size" => 6)), false), - - array(array("name" => "peter"), array("firstname" => array("required" => true)), false) - ); - } - - /** - * @covers FieldValidator::validate - * @dataProvider dataProviderTestValidateRemainingCovers - */ - public function testValidateRemainingCovers($arrayData, $arrayDataValidators, $success) - { - $result = $this->object->validate($arrayData, $arrayDataValidators); - - $this->assertEquals($result["success"], $success); - } -} - diff --git a/tests/automated/workflow/engine/classes/classFileCacheTest.php b/tests/automated/workflow/engine/classes/classFileCacheTest.php deleted file mode 100644 index 56f494485..000000000 --- a/tests/automated/workflow/engine/classes/classFileCacheTest.php +++ /dev/null @@ -1,117 +0,0 @@ -object = new FileCache(null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('FileCache'); - $this->assertTrue(count($methods) == 6); - } - - /** - * @covers FileCache::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('FileCache', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dir'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers FileCache::get - * @todo Implement testget(). - */ - public function testget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get', $methods ), 'exists method get' ); - $r = new ReflectionMethod('FileCache', 'get'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'expiration'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '3600'); - } - - /** - * @covers FileCache::set - * @todo Implement testset(). - */ - public function testset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('set', $methods ), 'exists method set' ); - $r = new ReflectionMethod('FileCache', 'set'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'data'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers FileCache::clear - * @todo Implement testclear(). - */ - /*public function testclear() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('clear', $methods ), 'exists method clear' ); - $r = new ReflectionMethod('FileCache', 'clear'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - }*/ -} - diff --git a/tests/automated/workflow/engine/classes/classGroupsTest.php b/tests/automated/workflow/engine/classes/classGroupsTest.php deleted file mode 100644 index 657df86f7..000000000 --- a/tests/automated/workflow/engine/classes/classGroupsTest.php +++ /dev/null @@ -1,322 +0,0 @@ -object = new Groups(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Groups'); $this->assertTrue( count($methods) == 17); - } - - /** - * @covers Groups::getUsersOfGroup - * @todo Implement testgetUsersOfGroup(). - */ - public function testgetUsersOfGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUsersOfGroup', $methods ), 'exists method getUsersOfGroup' ); - $r = new ReflectionMethod('Groups', 'getUsersOfGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::getActiveGroupsForAnUser - * @todo Implement testgetActiveGroupsForAnUser(). - */ - public function testgetActiveGroupsForAnUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getActiveGroupsForAnUser', $methods ), 'exists method getActiveGroupsForAnUser' ); - $r = new ReflectionMethod('Groups', 'getActiveGroupsForAnUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::addUserToGroup - * @todo Implement testaddUserToGroup(). - */ - public function testaddUserToGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addUserToGroup', $methods ), 'exists method addUserToGroup' ); - $r = new ReflectionMethod('Groups', 'addUserToGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'GrpUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'UsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Groups::removeUserOfGroup - * @todo Implement testremoveUserOfGroup(). - */ - public function testremoveUserOfGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeUserOfGroup', $methods ), 'exists method removeUserOfGroup' ); - $r = new ReflectionMethod('Groups', 'removeUserOfGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'GrpUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'UsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Groups::getAllGroups - * @todo Implement testgetAllGroups(). - */ - public function testgetAllGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllGroups', $methods ), 'exists method getAllGroups' ); - $r = new ReflectionMethod('Groups', 'getAllGroups'); - $params = $r->getParameters(); - } - - /** - * @covers Groups::getUserGroups - * @todo Implement testgetUserGroups(). - */ - public function testgetUserGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUserGroups', $methods ), 'exists method getUserGroups' ); - $r = new ReflectionMethod('Groups', 'getUserGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::getAvailableGroupsCriteria - * @todo Implement testgetAvailableGroupsCriteria(). - */ - public function testgetAvailableGroupsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableGroupsCriteria', $methods ), 'exists method getAvailableGroupsCriteria' ); - $r = new ReflectionMethod('Groups', 'getAvailableGroupsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filter'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Groups::getAssignedGroupsCriteria - * @todo Implement testgetAssignedGroupsCriteria(). - */ - public function testgetAssignedGroupsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAssignedGroupsCriteria', $methods ), 'exists method getAssignedGroupsCriteria' ); - $r = new ReflectionMethod('Groups', 'getAssignedGroupsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filter'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Groups::getGroupsForUser - * @todo Implement testgetGroupsForUser(). - */ - public function testgetGroupsForUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGroupsForUser', $methods ), 'exists method getGroupsForUser' ); - $r = new ReflectionMethod('Groups', 'getGroupsForUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'usrUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::removeUserOfAllGroups - * @todo Implement testremoveUserOfAllGroups(). - */ - public function testremoveUserOfAllGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeUserOfAllGroups', $methods ), 'exists method removeUserOfAllGroups' ); - $r = new ReflectionMethod('Groups', 'removeUserOfAllGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Groups::getUsersGroupCriteria - * @todo Implement testgetUsersGroupCriteria(). - */ - public function testgetUsersGroupCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUsersGroupCriteria', $methods ), 'exists method getUsersGroupCriteria' ); - $r = new ReflectionMethod('Groups', 'getUsersGroupCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Groups::getUserGroupsCriteria - * @todo Implement testgetUserGroupsCriteria(). - */ - public function testgetUserGroupsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUserGroupsCriteria', $methods ), 'exists method getUserGroupsCriteria' ); - $r = new ReflectionMethod('Groups', 'getUserGroupsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Groups::getNumberGroups - * @todo Implement testgetNumberGroups(). - */ - public function testgetNumberGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNumberGroups', $methods ), 'exists method getNumberGroups' ); - $r = new ReflectionMethod('Groups', 'getNumberGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::getAvailableUsersCriteria - * @todo Implement testgetAvailableUsersCriteria(). - */ - public function testgetAvailableUsersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableUsersCriteria', $methods ), 'exists method getAvailableUsersCriteria' ); - $r = new ReflectionMethod('Groups', 'getAvailableUsersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Groups::verifyUsertoGroup - * @todo Implement testverifyUsertoGroup(). - */ - public function testverifyUsertoGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyUsertoGroup', $methods ), 'exists method verifyUsertoGroup' ); - $r = new ReflectionMethod('Groups', 'verifyUsertoGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'GrpUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'UsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Groups::verifyGroup - * @todo Implement testverifyGroup(). - */ - public function testverifyGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyGroup', $methods ), 'exists method verifyGroup' ); - $r = new ReflectionMethod('Groups', 'verifyGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Groups::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('Groups', 'load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'GrpUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classInstallerTest.php b/tests/automated/workflow/engine/classes/classInstallerTest.php deleted file mode 100644 index 67fe416ba..000000000 --- a/tests/automated/workflow/engine/classes/classInstallerTest.php +++ /dev/null @@ -1,231 +0,0 @@ -object = new Installer(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Installer'); - $this->assertTrue( count($methods) == 11); - } - - /** - * @covers Installer::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('Installer', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers Installer::create_site - * @todo Implement testcreate_site(). - */ - public function testcreate_site() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('create_site', $methods ), 'exists method create_site' ); - $r = new ReflectionMethod('Installer', 'create_site'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'config'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == array()); - $this->assertTrue( $params[1]->getName() == 'confirmed'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Installer::isset_site - * @todo Implement testisset_site(). - */ - public function testisset_site() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isset_site', $methods ), 'exists method isset_site' ); - $r = new ReflectionMethod('Installer', 'isset_site'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == 'workflow'); - } - - /** - * @covers Installer::set_admin - * @todo Implement testset_admin(). - */ - public function testset_admin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('set_admin', $methods ), 'exists method set_admin' ); - $r = new ReflectionMethod('Installer', 'set_admin'); - $params = $r->getParameters(); - } - - /** - * @covers Installer::query_sql_file - * @todo Implement testquery_sql_file(). - */ - public function testquery_sql_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('query_sql_file', $methods ), 'exists method query_sql_file' ); - $r = new ReflectionMethod('Installer', 'query_sql_file'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'connection'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Installer::file_permisions - * @todo Implement testfile_permisions(). - */ - public function testfile_permisions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('file_permisions', $methods ), 'exists method file_permisions' ); - $r = new ReflectionMethod('Installer', 'file_permisions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'def'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '777'); - } - - /** - * @covers Installer::is_dir_writable - * @todo Implement testis_dir_writable(). - */ - public function testis_dir_writable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('is_dir_writable', $methods ), 'exists method is_dir_writable' ); - $r = new ReflectionMethod('Installer', 'is_dir_writable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dir'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Installer::getDirectoryFiles - * @todo Implement testgetDirectoryFiles(). - */ - public function testgetDirectoryFiles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDirectoryFiles', $methods ), 'exists method getDirectoryFiles' ); - $r = new ReflectionMethod('Installer', 'getDirectoryFiles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dir'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'extension'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Installer::check_db_empty - * @todo Implement testcheck_db_empty(). - */ - public function testcheck_db_empty() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('check_db_empty', $methods ), 'exists method check_db_empty' ); - $r = new ReflectionMethod('Installer', 'check_db_empty'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Installer::check_db - * @todo Implement testcheck_db(). - */ - public function testcheck_db() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('check_db', $methods ), 'exists method check_db' ); - $r = new ReflectionMethod('Installer', 'check_db'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Installer::log - * @todo Implement testlog(). - */ - public function testlog() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('log', $methods ), 'exists method log' ); - $r = new ReflectionMethod('Installer', 'log'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'text'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'failed'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } -} - diff --git a/tests/automated/workflow/engine/classes/classInvalidIndexSearchTextExceptionTest.php b/tests/automated/workflow/engine/classes/classInvalidIndexSearchTextExceptionTest.php deleted file mode 100644 index ca4374102..000000000 --- a/tests/automated/workflow/engine/classes/classInvalidIndexSearchTextExceptionTest.php +++ /dev/null @@ -1,82 +0,0 @@ -object = new InvalidIndexSearchTextException('message'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $class = new ReflectionClass('ApplicationWithoutDelegationRecordsException'); - $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC); - //$this->assertTrue( count($methods) == 9); - } - - /** - * @covers InvalidIndexSearchTextException::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('InvalidIndexSearchTextException', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'message'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'code'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - } - - /** - * @covers InvalidIndexSearchTextException::__toString - * @todo Implement test__toString(). - */ - public function test__toString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' ); - $r = new ReflectionMethod('InvalidIndexSearchTextException', '__toString'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classJavaBridgePMTest.php b/tests/automated/workflow/engine/classes/classJavaBridgePMTest.php deleted file mode 100644 index d450f098d..000000000 --- a/tests/automated/workflow/engine/classes/classJavaBridgePMTest.php +++ /dev/null @@ -1,100 +0,0 @@ -object = new JavaBridgePM(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('JavaBridgePM'); $this->assertTrue( count($methods) == 3); - } - - /** - * @covers JavaBridgePM::checkJavaExtension - * @todo Implement testcheckJavaExtension(). - */ - public function testcheckJavaExtension() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('checkJavaExtension', $methods ), 'exists method checkJavaExtension' ); - $r = new ReflectionMethod('JavaBridgePM', 'checkJavaExtension'); - $params = $r->getParameters(); - } - - /** - * @covers JavaBridgePM::convertValue - * @todo Implement testconvertValue(). - */ - public function testconvertValue() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('convertValue', $methods ), 'exists method convertValue' ); - $r = new ReflectionMethod('JavaBridgePM', 'convertValue'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'className'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers JavaBridgePM::generateJrxmlFromDynaform - * @todo Implement testgenerateJrxmlFromDynaform(). - */ - public function testgenerateJrxmlFromDynaform() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generateJrxmlFromDynaform', $methods ), 'exists method generateJrxmlFromDynaform' ); - $r = new ReflectionMethod('JavaBridgePM', 'generateJrxmlFromDynaform'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'outDocUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'dynaformUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'template'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classNETTest.php b/tests/automated/workflow/engine/classes/classNETTest.php deleted file mode 100644 index 23ed8e340..000000000 --- a/tests/automated/workflow/engine/classes/classNETTest.php +++ /dev/null @@ -1,261 +0,0 @@ -object = new NET('192.168.11.21'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('NET'); - $this->assertTrue(count($methods) == 14); - } - - /** - * @covers NET::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('NET', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pHost'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::resolv - * @todo Implement testresolv(). - */ - public function testresolv() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('resolv', $methods), 'exists method resolv'); - $r = new ReflectionMethod('NET', 'resolv'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pHost'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::scannPort - * @todo Implement testscannPort(). - */ - public function testscannPort() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('scannPort', $methods), 'exists method scannPort'); - $r = new ReflectionMethod('NET', 'scannPort'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pPort'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::is_ipaddress - * @todo Implement testis_ipaddress(). - */ - public function testis_ipaddress() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('is_ipaddress', $methods), 'exists method is_ipaddress'); - $r = new ReflectionMethod('NET', 'is_ipaddress'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pHost'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::ping - * @todo Implement testping(). - */ - public function testping() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('ping', $methods), 'exists method ping'); - $r = new ReflectionMethod('NET', 'ping'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pTTL'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == true); - $this->assertTrue($params[0]->getDefaultValue() == '3000'); - } - - /** - * @covers NET::loginDbServer - * @todo Implement testloginDbServer(). - */ - public function testloginDbServer() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('loginDbServer', $methods), 'exists method loginDbServer'); - $r = new ReflectionMethod('NET', 'loginDbServer'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pUser'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'pPasswd'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers NET::setDataBase - * @todo Implement testsetDataBase(). - */ - public function testsetDataBase() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setDataBase', $methods), 'exists method setDataBase'); - $r = new ReflectionMethod('NET', 'setDataBase'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pDb'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'pPort'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == ''); - } - - /** - * @covers NET::tryConnectServer - * @todo Implement testtryConnectServer(). - */ - public function testtryConnectServer() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('tryConnectServer', $methods), 'exists method tryConnectServer'); - $r = new ReflectionMethod('NET', 'tryConnectServer'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pDbDriver'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::tryOpenDataBase - * @todo Implement testtryOpenDataBase(). - */ - public function testtryOpenDataBase() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('tryOpenDataBase', $methods), 'exists method tryOpenDataBase'); - $r = new ReflectionMethod('NET', 'tryOpenDataBase'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pDbDriver'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::getDbServerVersion - * @todo Implement testgetDbServerVersion(). - */ - public function testgetDbServerVersion() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getDbServerVersion', $methods), 'exists method getDbServerVersion'); - $r = new ReflectionMethod('NET', 'getDbServerVersion'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'driver'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::dbName - * @todo Implement testdbName(). - */ - public function testdbName() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('dbName', $methods), 'exists method dbName'); - $r = new ReflectionMethod('NET', 'dbName'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pAdapter'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers NET::showMsg - * @todo Implement testshowMsg(). - */ - public function testshowMsg() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('showMsg', $methods), 'exists method showMsg'); - $r = new ReflectionMethod('NET', 'showMsg'); - $params = $r->getParameters(); - } - - /** - * @covers NET::getErrno - * @todo Implement testgetErrno(). - */ - public function testgetErrno() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getErrno', $methods), 'exists method getErrno'); - $r = new ReflectionMethod('NET', 'getErrno'); - $params = $r->getParameters(); - } - - /** - * @covers NET::getErrmsg - * @todo Implement testgetErrmsg(). - */ - public function testgetErrmsg() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getErrmsg', $methods), 'exists method getErrmsg'); - $r = new ReflectionMethod('NET', 'getErrmsg'); - $params = $r->getParameters(); - } -} - \ No newline at end of file diff --git a/tests/automated/workflow/engine/classes/classObjectCellectionTest.php b/tests/automated/workflow/engine/classes/classObjectCellectionTest.php deleted file mode 100644 index 5735fec6b..000000000 --- a/tests/automated/workflow/engine/classes/classObjectCellectionTest.php +++ /dev/null @@ -1,97 +0,0 @@ -object = new ObjectCellection(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('ObjectCellection'); $this->assertTrue( count($methods) == 3); - } - - /** - * @covers ObjectCellection::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('ObjectCellection', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers ObjectCellection::add - * @todo Implement testadd(). - */ - public function testadd() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add', $methods ), 'exists method add' ); - $r = new ReflectionMethod('ObjectCellection', 'add'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'data'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'origin'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers ObjectCellection::get - * @todo Implement testget(). - */ - public function testget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get', $methods ), 'exists method get' ); - $r = new ReflectionMethod('ObjectCellection', 'get'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classObjectDocumentTest.php b/tests/automated/workflow/engine/classes/classObjectDocumentTest.php deleted file mode 100644 index fa9f04f31..000000000 --- a/tests/automated/workflow/engine/classes/classObjectDocumentTest.php +++ /dev/null @@ -1,61 +0,0 @@ -object = new ObjectDocument(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('ObjectDocument'); $this->assertTrue( count($methods) == 1); - } - - /** - * @covers ObjectDocument::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('ObjectDocument', '__construct'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classPMDashletTest.php b/tests/automated/workflow/engine/classes/classPMDashletTest.php deleted file mode 100644 index bd74b3811..000000000 --- a/tests/automated/workflow/engine/classes/classPMDashletTest.php +++ /dev/null @@ -1,226 +0,0 @@ -object = new PMDashlet(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PMDashlet'); $this->assertTrue( count($methods) == 58); - } - - /** - * @covers PMDashlet::getAdditionalFields - * @todo Implement testgetAdditionalFields(). - */ - public function testgetAdditionalFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' ); - $r = new ReflectionMethod('PMDashlet', 'getAdditionalFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::setup - * @todo Implement testsetup(). - */ - public function testsetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setup', $methods ), 'exists method setup' ); - $r = new ReflectionMethod('PMDashlet', 'setup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dasInsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('PMDashlet', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'width'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '300'); - } - - /** - * @covers PMDashlet::getDashletInstance - * @todo Implement testgetDashletInstance(). - */ - public function testgetDashletInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashletInstance', $methods ), 'exists method getDashletInstance' ); - $r = new ReflectionMethod('PMDashlet', 'getDashletInstance'); - $params = $r->getParameters(); - } - - /** - * @covers PMDashlet::getDashletObject - * @todo Implement testgetDashletObject(). - */ - public function testgetDashletObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashletObject', $methods ), 'exists method getDashletObject' ); - $r = new ReflectionMethod('PMDashlet', 'getDashletObject'); - $params = $r->getParameters(); - } - - /** - * @covers PMDashlet::getDashletsInstances - * @todo Implement testgetDashletsInstances(). - */ - public function testgetDashletsInstances() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashletsInstances', $methods ), 'exists method getDashletsInstances' ); - $r = new ReflectionMethod('PMDashlet', 'getDashletsInstances'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMDashlet::getDashletsInstancesQuantity - * @todo Implement testgetDashletsInstancesQuantity(). - */ - /*public function testgetDashletsInstancesQuantity() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashletsInstancesQuantity', $methods ), 'exists method getDashletsInstancesQuantity' ); - $r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesQuantity'); - $params = $r->getParameters(); - }*/ - - /** - * @covers PMDashlet::loadDashletInstance - * @todo Implement testloadDashletInstance(). - */ - public function testloadDashletInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadDashletInstance', $methods ), 'exists method loadDashletInstance' ); - $r = new ReflectionMethod('PMDashlet', 'loadDashletInstance'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dasInsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::saveDashletInstance - * @todo Implement testsaveDashletInstance(). - */ - public function testsaveDashletInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveDashletInstance', $methods ), 'exists method saveDashletInstance' ); - $r = new ReflectionMethod('PMDashlet', 'saveDashletInstance'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::deleteDashletInstance - * @todo Implement testdeleteDashletInstance(). - */ - public function testdeleteDashletInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteDashletInstance', $methods ), 'exists method deleteDashletInstance' ); - $r = new ReflectionMethod('PMDashlet', 'deleteDashletInstance'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dasInsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::getDashletsInstancesForUser - * @todo Implement testgetDashletsInstancesForUser(). - */ - public function testgetDashletsInstancesForUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashletsInstancesForUser', $methods ), 'exists method getDashletsInstancesForUser' ); - $r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesForUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMDashlet::getXTemplate - * @todo Implement testgetXTemplate(). - */ - public function testgetXTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' ); - $r = new ReflectionMethod('PMDashlet', 'getXTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classPMPluginRegistryTest.php b/tests/automated/workflow/engine/classes/classPMPluginRegistryTest.php deleted file mode 100644 index 9fa138f26..000000000 --- a/tests/automated/workflow/engine/classes/classPMPluginRegistryTest.php +++ /dev/null @@ -1,955 +0,0 @@ -object = new PMPluginRegistry(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PMPluginRegistry'); - $this->assertTrue( count($methods) == 60, count($methods)); - } - - /** - * @covers PMPluginRegistry::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('PMPluginRegistry', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::serializeInstance - * @todo Implement testserializeInstance(). - */ - public function testserializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('serializeInstance', $methods ), 'exists method serializeInstance' ); - $r = new ReflectionMethod('PMPluginRegistry', 'serializeInstance'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::unSerializeInstance - * @todo Implement testunSerializeInstance(). - */ - public function testunSerializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unSerializeInstance', $methods ), 'exists method unSerializeInstance' ); - $r = new ReflectionMethod('PMPluginRegistry', 'unSerializeInstance'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'serialized'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::save - * @todo Implement testsave(). - */ - public function testsave() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('save', $methods ), 'exists method save' ); - $r = new ReflectionMethod('PMPluginRegistry', 'save'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::registerPlugin - * @todo Implement testregisterPlugin(). - */ - public function testregisterPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerPlugin', $methods ), 'exists method registerPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sFilename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMPluginRegistry::getPluginDetails - * @todo Implement testgetPluginDetails(). - */ - public function testgetPluginDetails() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPluginDetails', $methods ), 'exists method getPluginDetails' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getPluginDetails'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sFilename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::enablePlugin - * @todo Implement testenablePlugin(). - */ - public function testenablePlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('enablePlugin', $methods ), 'exists method enablePlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'enablePlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::disablePlugin - * @todo Implement testdisablePlugin(). - */ - public function testdisablePlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('disablePlugin', $methods ), 'exists method disablePlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'disablePlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'eventPlugin'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers PMPluginRegistry::getStatusPlugin - * @todo Implement testgetStatusPlugin(). - */ - public function testgetStatusPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStatusPlugin', $methods ), 'exists method getStatusPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getStatusPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::installPluginArchive - * @todo Implement testinstallPluginArchive(). - */ - public function testinstallPluginArchive() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('installPluginArchive', $methods ), 'exists method installPluginArchive' ); - $r = new ReflectionMethod('PMPluginRegistry', 'installPluginArchive'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pluginName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::uninstallPlugin - * @todo Implement testuninstallPlugin(). - */ - public function testuninstallPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('uninstallPlugin', $methods ), 'exists method uninstallPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'uninstallPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::uninstallPluginWorkspaces - * @todo Implement testuninstallPluginWorkspaces(). - */ - public function testuninstallPluginWorkspaces() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('uninstallPluginWorkspaces', $methods ), 'exists method uninstallPluginWorkspaces' ); - $r = new ReflectionMethod('PMPluginRegistry', 'uninstallPluginWorkspaces'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'arrayPlugin'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::installPlugin - * @todo Implement testinstallPlugin(). - */ - public function testinstallPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('installPlugin', $methods ), 'exists method installPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'installPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerMenu - * @todo Implement testregisterMenu(). - */ - public function testregisterMenu() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerMenu', $methods ), 'exists method registerMenu' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerMenu'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMenuId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sFilename'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerDashlets - * @todo Implement testregisterDashlets(). - */ - public function testregisterDashlets() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerDashlets', $methods ), 'exists method registerDashlets' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerDashlets'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'namespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerCss - * @todo Implement testregisterCss(). - */ - public function testregisterCss() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerCss', $methods ), 'exists method registerCss' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerCss'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sCssFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getRegisteredCss - * @todo Implement testgetRegisteredCss(). - */ - public function testgetRegisteredCss() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRegisteredCss', $methods ), 'exists method getRegisteredCss' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredCss'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::registerJavascript - * @todo Implement testregisterJavascript(). - */ - public function testregisterJavascript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerJavascript', $methods ), 'exists method registerJavascript' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerJavascript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sCoreJsFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'pluginJsFile'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getRegisteredJavascript - * @todo Implement testgetRegisteredJavascript(). - */ - public function testgetRegisteredJavascript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRegisteredJavascript', $methods ), 'exists method getRegisteredJavascript' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredJavascript'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getRegisteredJavascriptBy - * @todo Implement testgetRegisteredJavascriptBy(). - */ - public function testgetRegisteredJavascriptBy() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRegisteredJavascriptBy', $methods ), 'exists method getRegisteredJavascriptBy' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredJavascriptBy'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCoreJsFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sNamespace'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMPluginRegistry::unregisterJavascripts - * @todo Implement testunregisterJavascripts(). - */ - public function testunregisterJavascripts() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unregisterJavascripts', $methods ), 'exists method unregisterJavascripts' ); - $r = new ReflectionMethod('PMPluginRegistry', 'unregisterJavascripts'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sCoreJsFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMPluginRegistry::registerReport - * @todo Implement testregisterReport(). - */ - public function testregisterReport() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerReport', $methods ), 'exists method registerReport' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerReport'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerPmFunction - * @todo Implement testregisterPmFunction(). - */ - public function testregisterPmFunction() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerPmFunction', $methods ), 'exists method registerPmFunction' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerPmFunction'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerRedirectLogin - * @todo Implement testregisterRedirectLogin(). - */ - public function testregisterRedirectLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerRedirectLogin', $methods ), 'exists method registerRedirectLogin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerRedirectLogin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sRole'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sPathMethod'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerFolder - * @todo Implement testregisterFolder(). - */ - public function testregisterFolder() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerFolder', $methods ), 'exists method registerFolder' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerFolder'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sFolderId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sFolderName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerStep - * @todo Implement testregisterStep(). - */ - public function testregisterStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerStep', $methods ), 'exists method registerStep' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sStepId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sStepName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sStepTitle'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'setupStepPage'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers PMPluginRegistry::isRegisteredFolder - * @todo Implement testisRegisteredFolder(). - */ - public function testisRegisteredFolder() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isRegisteredFolder', $methods ), 'exists method isRegisteredFolder' ); - $r = new ReflectionMethod('PMPluginRegistry', 'isRegisteredFolder'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sFolderName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getMenus - * @todo Implement testgetMenus(). - */ - public function testgetMenus() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getMenus', $methods ), 'exists method getMenus' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getMenus'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'menuId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getDashlets - * @todo Implement testgetDashlets(). - */ - public function testgetDashlets() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashlets', $methods ), 'exists method getDashlets' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getDashlets'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getReports - * @todo Implement testgetReports(). - */ - public function testgetReports() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getReports', $methods ), 'exists method getReports' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getReports'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getPmFunctions - * @todo Implement testgetPmFunctions(). - */ - public function testgetPmFunctions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPmFunctions', $methods ), 'exists method getPmFunctions' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getPmFunctions'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getSteps - * @todo Implement testgetSteps(). - */ - public function testgetSteps() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSteps', $methods ), 'exists method getSteps' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getSteps'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getRedirectLogins - * @todo Implement testgetRedirectLogins(). - */ - public function testgetRedirectLogins() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRedirectLogins', $methods ), 'exists method getRedirectLogins' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getRedirectLogins'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::executeTriggers - * @todo Implement testexecuteTriggers(). - */ - public function testexecuteTriggers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeTriggers', $methods ), 'exists method executeTriggers' ); - $r = new ReflectionMethod('PMPluginRegistry', 'executeTriggers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'triggerId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'oData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::existsTrigger - * @todo Implement testexistsTrigger(). - */ - public function testexistsTrigger() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('existsTrigger', $methods ), 'exists method existsTrigger' ); - $r = new ReflectionMethod('PMPluginRegistry', 'existsTrigger'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'triggerId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getTriggerInfo - * @todo Implement testgetTriggerInfo(). - */ - public function testgetTriggerInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTriggerInfo', $methods ), 'exists method getTriggerInfo' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getTriggerInfo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'triggerId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerTrigger - * @todo Implement testregisterTrigger(). - */ - public function testregisterTrigger() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerTrigger', $methods ), 'exists method registerTrigger' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerTrigger'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTriggerId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTriggerName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getPlugin - * @todo Implement testgetPlugin(). - */ - public function testgetPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPlugin', $methods ), 'exists method getPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::setCompanyLogo - * @todo Implement testsetCompanyLogo(). - */ - public function testsetCompanyLogo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setCompanyLogo', $methods ), 'exists method setCompanyLogo' ); - $r = new ReflectionMethod('PMPluginRegistry', 'setCompanyLogo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'filename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getCompanyLogo - * @todo Implement testgetCompanyLogo(). - */ - public function testgetCompanyLogo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCompanyLogo', $methods ), 'exists method getCompanyLogo' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getCompanyLogo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'default'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::setupPlugins - * @todo Implement testsetupPlugins(). - */ - public function testsetupPlugins() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setupPlugins', $methods ), 'exists method setupPlugins' ); - $r = new ReflectionMethod('PMPluginRegistry', 'setupPlugins'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::executeMethod - * @todo Implement testexecuteMethod(). - */ - public function testexecuteMethod() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeMethod', $methods ), 'exists method executeMethod' ); - $r = new ReflectionMethod('PMPluginRegistry', 'executeMethod'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'methodName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'oData'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getFieldsForPageSetup - * @todo Implement testgetFieldsForPageSetup(). - */ - public function testgetFieldsForPageSetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFieldsForPageSetup', $methods ), 'exists method getFieldsForPageSetup' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getFieldsForPageSetup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::updateFieldsForPageSetup - * @todo Implement testupdateFieldsForPageSetup(). - */ - public function testupdateFieldsForPageSetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateFieldsForPageSetup', $methods ), 'exists method updateFieldsForPageSetup' ); - $r = new ReflectionMethod('PMPluginRegistry', 'updateFieldsForPageSetup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'oData'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::eevalidate - * @todo Implement testeevalidate(). - */ - public function testeevalidate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('eevalidate', $methods ), 'exists method eevalidate' ); - $r = new ReflectionMethod('PMPluginRegistry', 'eevalidate'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::registerToolbarFile - * @todo Implement testregisterToolbarFile(). - */ - public function testregisterToolbarFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerToolbarFile', $methods ), 'exists method registerToolbarFile' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerToolbarFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sToolbarId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sFilename'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getToolbarOptions - * @todo Implement testgetToolbarOptions(). - */ - public function testgetToolbarOptions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getToolbarOptions', $methods ), 'exists method getToolbarOptions' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getToolbarOptions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sToolbarId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerCaseSchedulerPlugin - * @todo Implement testregisterCaseSchedulerPlugin(). - */ - public function testregisterCaseSchedulerPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerCaseSchedulerPlugin', $methods ), 'exists method registerCaseSchedulerPlugin' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerCaseSchedulerPlugin'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sActionId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sActionForm'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sActionSave'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sActionExecute'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'sActionGetFields'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getCaseSchedulerPlugins - * @todo Implement testgetCaseSchedulerPlugins(). - */ - public function testgetCaseSchedulerPlugins() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseSchedulerPlugins', $methods ), 'exists method getCaseSchedulerPlugins' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getCaseSchedulerPlugins'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::registerTaskExtendedProperty - * @todo Implement testregisterTaskExtendedProperty(). - */ - public function testregisterTaskExtendedProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerTaskExtendedProperty', $methods ), 'exists method registerTaskExtendedProperty' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerTaskExtendedProperty'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sPage'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sIcon'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::registerDashboardPage - * @todo Implement testregisterDashboardPage(). - */ - public function testregisterDashboardPage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerDashboardPage', $methods ), 'exists method registerDashboardPage' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerDashboardPage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sPage'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sIcon'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers PMPluginRegistry::getDashboardPages - * @todo Implement testgetDashboardPages(). - */ - public function testgetDashboardPages() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDashboardPages', $methods ), 'exists method getDashboardPages' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getDashboardPages'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getTaskExtendedProperties - * @todo Implement testgetTaskExtendedProperties(). - */ - public function testgetTaskExtendedProperties() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTaskExtendedProperties', $methods ), 'exists method getTaskExtendedProperties' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getTaskExtendedProperties'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::registerDashboard - * @todo Implement testregisterDashboard(). - */ - public function testregisterDashboard() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerDashboard', $methods ), 'exists method registerDashboard' ); - $r = new ReflectionMethod('PMPluginRegistry', 'registerDashboard'); - $params = $r->getParameters(); - } - - /** - * @covers PMPluginRegistry::getAttributes - * @todo Implement testgetAttributes(). - */ - public function testgetAttributes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAttributes', $methods ), 'exists method getAttributes' ); - $r = new ReflectionMethod('PMPluginRegistry', 'getAttributes'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classPMPluginTest.php b/tests/automated/workflow/engine/classes/classPMPluginTest.php deleted file mode 100644 index 38898dd47..000000000 --- a/tests/automated/workflow/engine/classes/classPMPluginTest.php +++ /dev/null @@ -1,452 +0,0 @@ -object = new PMPlugin('sNamespace', 'sFilename'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PMPlugin'); - $this->assertTrue(count($methods) == 24, count($methods)); - } - - /** - * @covers PMPlugin::PMPlugin - * @todo Implement testPMPlugin(). - */ - public function testPMPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('PMPlugin', $methods), 'exists method PMPlugin'); - $r = new ReflectionMethod('PMPlugin', 'PMPlugin'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sFilename'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::registerMenu - * @todo Implement testregisterMenu(). - */ - public function testregisterMenu() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerMenu', $methods), 'exists method registerMenu'); - $r = new ReflectionMethod('PMPlugin', 'registerMenu'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'menuId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'menuFilename'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerDashlets - * @todo Implement testregisterDashlets(). - */ - public function testregisterDashlets() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerDashlets', $methods), 'exists method registerDashlets'); - $r = new ReflectionMethod('PMPlugin', 'registerDashlets'); - $params = $r->getParameters(); - } - - /** - * @covers PMPlugin::registerReport - * @todo Implement testregisterReport(). - */ - public function testregisterReport() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerReport', $methods), 'exists method registerReport'); - $r = new ReflectionMethod('PMPlugin', 'registerReport'); - $params = $r->getParameters(); - } - - /** - * @covers PMPlugin::registerPmFunction - * @todo Implement testregisterPmFunction(). - */ - public function testregisterPmFunction() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerPmFunction', $methods), 'exists method registerPmFunction'); - $r = new ReflectionMethod('PMPlugin', 'registerPmFunction'); - $params = $r->getParameters(); - } - - /** - * @covers PMPlugin::setCompanyLogo - * @todo Implement testsetCompanyLogo(). - */ - public function testsetCompanyLogo() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setCompanyLogo', $methods), 'exists method setCompanyLogo'); - $r = new ReflectionMethod('PMPlugin', 'setCompanyLogo'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'filename'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers PMPlugin::redirectLogin - * @todo Implement testredirectLogin(). - */ - public function testredirectLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('redirectLogin', $methods), 'exists method redirectLogin'); - $r = new ReflectionMethod('PMPlugin', 'redirectLogin'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'role'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'pathMethod'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerFolder - * @todo Implement testregisterFolder(). - */ - public function testregisterFolder() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerFolder', $methods), 'exists method registerFolder'); - $r = new ReflectionMethod('PMPlugin', 'registerFolder'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sFolderId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sFolderName'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerStep - * @todo Implement testregisterStep(). - */ - public function testregisterStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerStep', $methods), 'exists method registerStep'); - $r = new ReflectionMethod('PMPlugin', 'registerStep'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sStepId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sStepName'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sStepTitle'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sSetupStepPage'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == true); - $this->assertTrue($params[3]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::registerTrigger - * @todo Implement testregisterTrigger(). - */ - public function testregisterTrigger() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerTrigger', $methods), 'exists method registerTrigger'); - $r = new ReflectionMethod('PMPlugin', 'registerTrigger'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sTriggerId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sTriggerName'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::delete - * @todo Implement testdelete(). - */ - public function testdelete() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('delete', $methods), 'exists method delete'); - $r = new ReflectionMethod('PMPlugin', 'delete'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sFilename'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'bAbsolutePath'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::copy - * @todo Implement testcopy(). - */ - public function testcopy() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('copy', $methods), 'exists method copy'); - $r = new ReflectionMethod('PMPlugin', 'copy'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sSouce'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sTarget'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == true); - $this->assertTrue($params[2]->getDefaultValue() == ''); - $this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == true); - $this->assertTrue($params[3]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::rename - * @todo Implement testrename(). - */ - public function testrename() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('rename', $methods), 'exists method rename'); - $r = new ReflectionMethod('PMPlugin', 'rename'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sSouce'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sTarget'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == true); - $this->assertTrue($params[2]->getDefaultValue() == ''); - $this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == true); - $this->assertTrue($params[3]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::registerBreakPageTemplate - * @todo Implement testregisterBreakPageTemplate(). - */ - public function testregisterBreakPageTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerBreakPageTemplate', $methods), 'exists method registerBreakPageTemplate'); - $r = new ReflectionMethod('PMPlugin', 'registerBreakPageTemplate'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'pageId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'templateFilename'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerCss - * @todo Implement testregisterCss(). - */ - public function testregisterCss() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerCss', $methods), 'exists method registerCss'); - $r = new ReflectionMethod('PMPlugin', 'registerCss'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sCssFile'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerToolbarFile - * @todo Implement testregisterToolbarFile(). - */ - public function testregisterToolbarFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerToolbarFile', $methods), 'exists method registerToolbarFile'); - $r = new ReflectionMethod('PMPlugin', 'registerToolbarFile'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sToolbarId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'filename'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerCaseSchedulerPlugin - * @todo Implement testregisterCaseSchedulerPlugin(). - */ - public function testregisterCaseSchedulerPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerCaseSchedulerPlugin', $methods), - 'exists method registerCaseSchedulerPlugin'); - $r = new ReflectionMethod('PMPlugin', 'registerCaseSchedulerPlugin'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sActionId'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sActionForm'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sActionSave'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sActionExecute'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == false); - $this->assertTrue($params[4]->getName() == 'sActionGetFields'); - $this->assertTrue($params[4]->isArray() == false); - $this->assertTrue($params[4]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerTaskExtendedProperty - * @todo Implement testregisterTaskExtendedProperty(). - */ - public function testregisterTaskExtendedProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerTaskExtendedProperty', $methods), - 'exists method registerTaskExtendedProperty'); - $r = new ReflectionMethod('PMPlugin', 'registerTaskExtendedProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sPage'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sName'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sIcon'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == true); - $this->assertTrue($params[2]->getDefaultValue() == ''); - } - - /** - * @covers PMPlugin::registerJavascript - * @todo Implement testregisterJavascript(). - */ - public function testregisterJavascript() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerJavascript', $methods), 'exists method registerJavascript'); - $r = new ReflectionMethod('PMPlugin', 'registerJavascript'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sCoreJsFile'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'pluginJsFile'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::unregisterJavascript - * @todo Implement testunregisterJavascript(). - */ - public function testunregisterJavascript() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('unregisterJavascript', $methods), 'exists method unregisterJavascript'); - $r = new ReflectionMethod('PMPlugin', 'unregisterJavascript'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sCoreJsFile'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'pluginJsFile'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers PMPlugin::registerDashboard - * @todo Implement testregisterDashboard(). - */ - public function testregisterDashboard() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('registerDashboard', $methods), 'exists method registerDashboard'); - $r = new ReflectionMethod('PMPlugin', 'registerDashboard'); - $params = $r->getParameters(); - } - - /** - * @covers PMPlugin::getExternalStepAction - * @todo Implement testgetExternalStepAction(). - */ - public function testgetExternalStepAction() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getExternalStepAction', $methods), 'exists method getExternalStepAction'); - $r = new ReflectionMethod('PMPlugin', 'getExternalStepAction'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classPMScriptTest.php b/tests/automated/workflow/engine/classes/classPMScriptTest.php deleted file mode 100644 index 04f8825f2..000000000 --- a/tests/automated/workflow/engine/classes/classPMScriptTest.php +++ /dev/null @@ -1,151 +0,0 @@ -object = new PMScript(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PMScript'); - $this->assertTrue(count($methods) == 7); - } - - /** - * @covers PMScript::PMScript - * @todo Implement testPMScript(). - */ - public function testPMScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('PMScript', $methods ), 'exists method PMScript' ); - $r = new ReflectionMethod('PMScript', 'PMScript'); - $params = $r->getParameters(); - } - - /** - * @covers PMScript::setFields - * @todo Implement testsetFields(). - */ - public function testsetFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setFields', $methods ), 'exists method setFields' ); - $r = new ReflectionMethod('PMScript', 'setFields'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'aFields'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == true); - $this->assertTrue($params[0]->getDefaultValue() == array()); - } - - /** - * @covers PMScript::setScript - * @todo Implement testsetScript(). - */ - public function testsetScript() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setScript', $methods ), 'exists method setScript' ); - $r = new ReflectionMethod('PMScript', 'setScript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sScript'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers PMScript::validSyntax - * @todo Implement testvalidSyntax(). - */ - public function testvalidSyntax() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('validSyntax', $methods ), 'exists method validSyntax' ); - $r = new ReflectionMethod('PMScript', 'validSyntax'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sScript'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMScript::executeAndCatchErrors - * @todo Implement testexecuteAndCatchErrors(). - */ - public function testexecuteAndCatchErrors() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeAndCatchErrors', $methods ), 'exists method executeAndCatchErrors' ); - $r = new ReflectionMethod('PMScript', 'executeAndCatchErrors'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sScript'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sCode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMScript::execute - * @todo Implement testexecute(). - */ - public function testexecute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('execute', $methods ), 'exists method execute' ); - $r = new ReflectionMethod('PMScript', 'execute'); - $params = $r->getParameters(); - } - - /** - * @covers PMScript::evaluate - * @todo Implement testevaluate(). - */ - public function testevaluate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('evaluate', $methods ), 'exists method evaluate' ); - $r = new ReflectionMethod('PMScript', 'evaluate'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classPMmemcachedTest.php b/tests/automated/workflow/engine/classes/classPMmemcachedTest.php deleted file mode 100644 index 4ae3a3c3f..000000000 --- a/tests/automated/workflow/engine/classes/classPMmemcachedTest.php +++ /dev/null @@ -1,228 +0,0 @@ -object = new PMmemcached('workflow'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PMmemcached'); - $this->assertTrue( count($methods) == 12); - } - - /** - * @covers PMmemcached::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('PMmemcached', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMmemcached::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' ); - $r = new ReflectionMethod('PMmemcached', 'getSingleton'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMmemcached::__clone - * @todo Implement test__clone(). - */ - public function test__clone() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__clone', $methods ), 'exists method __clone' ); - $r = new ReflectionMethod('PMmemcached', '__clone'); - $params = $r->getParameters(); - } - - /** - * @covers PMmemcached::__wakeup - * @todo Implement test__wakeup(). - */ - public function test__wakeup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__wakeup', $methods ), 'exists method __wakeup' ); - $r = new ReflectionMethod('PMmemcached', '__wakeup'); - $params = $r->getParameters(); - } - - /** - * @covers PMmemcached::set - * @todo Implement testset(). - */ - public function testset() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('set', $methods ), 'exists method set' ); - $r = new ReflectionMethod('PMmemcached', 'set'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'object'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'timeout'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers PMmemcached::get - * @todo Implement testget(). - */ - public function testget() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('get', $methods ), 'exists method get' ); - $r = new ReflectionMethod('PMmemcached', 'get'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMmemcached::add - * @todo Implement testadd(). - */ - public function testadd() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add', $methods ), 'exists method add' ); - $r = new ReflectionMethod('PMmemcached', 'add'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMmemcached::increment - * @todo Implement testincrement(). - */ - public function testincrement() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('increment', $methods ), 'exists method increment' ); - $r = new ReflectionMethod('PMmemcached', 'increment'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PMmemcached::delete - * @todo Implement testdelete(). - */ - public function testdelete() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('delete', $methods ), 'exists method delete' ); - $r = new ReflectionMethod('PMmemcached', 'delete'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'key'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PMmemcached::flush - * @todo Implement testflush(). - */ - public function testflush() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('flush', $methods ), 'exists method flush' ); - $r = new ReflectionMethod('PMmemcached', 'flush'); - $params = $r->getParameters(); - } - - /** - * @covers PMmemcached::getStats - * @todo Implement testgetStats(). - */ - public function testgetStats() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStats', $methods ), 'exists method getStats' ); - $r = new ReflectionMethod('PMmemcached', 'getStats'); - $params = $r->getParameters(); - } - - /** - * @covers PMmemcached::printDetails - * @todo Implement testprintDetails(). - */ - public function testprintDetails() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printDetails', $methods ), 'exists method printDetails' ); - $r = new ReflectionMethod('PMmemcached', 'printDetails'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classPmTableTest.php b/tests/automated/workflow/engine/classes/classPmTableTest.php deleted file mode 100644 index 58e756216..000000000 --- a/tests/automated/workflow/engine/classes/classPmTableTest.php +++ /dev/null @@ -1,418 +0,0 @@ -object = new PmTable(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('PmTable'); - $this->assertTrue( count($methods) == 27); - } - - /** - * @covers PmTable::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('PmTable', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tableName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers PmTable::setColumns - * @todo Implement testsetColumns(). - */ - public function testsetColumns() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setColumns', $methods ), 'exists method setColumns' ); - $r = new ReflectionMethod('PmTable', 'setColumns'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'columns'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PmTable::setDataSource - * @todo Implement testsetDataSource(). - */ - public function testsetDataSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setDataSource', $methods ), 'exists method setDataSource' ); - $r = new ReflectionMethod('PmTable', 'setDataSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PmTable::resolveDbSource - * @todo Implement testresolveDbSource(). - */ - public function testresolveDbSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('resolveDbSource', $methods ), 'exists method resolveDbSource' ); - $r = new ReflectionMethod('PmTable', 'resolveDbSource'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PmTable::getDataSource - * @todo Implement testgetDataSource(). - */ - public function testgetDataSource() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDataSource', $methods ), 'exists method getDataSource' ); - $r = new ReflectionMethod('PmTable', 'getDataSource'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::getDbConfig - * @todo Implement testgetDbConfig(). - */ - public function testgetDbConfig() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDbConfig', $methods ), 'exists method getDbConfig' ); - $r = new ReflectionMethod('PmTable', 'getDbConfig'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::setAlterTable - * @todo Implement testsetAlterTable(). - */ - public function testsetAlterTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setAlterTable', $methods ), 'exists method setAlterTable' ); - $r = new ReflectionMethod('PmTable', 'setAlterTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PmTable::build - * @todo Implement testbuild(). - */ - public function testbuild() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('build', $methods ), 'exists method build' ); - $r = new ReflectionMethod('PmTable', 'build'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::buildModelFor - * @todo Implement testbuildModelFor(). - */ - public function testbuildModelFor() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('buildModelFor', $methods ), 'exists method buildModelFor' ); - $r = new ReflectionMethod('PmTable', 'buildModelFor'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbsUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tablesList'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers PmTable::prepare - * @todo Implement testprepare(). - */ - public function testprepare() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' ); - $r = new ReflectionMethod('PmTable', 'prepare'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'loadSchema'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers PmTable::loadSchema - * @todo Implement testloadSchema(). - */ - public function testloadSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadSchema', $methods ), 'exists method loadSchema' ); - $r = new ReflectionMethod('PmTable', 'loadSchema'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::buildSchema - * @todo Implement testbuildSchema(). - */ - public function testbuildSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('buildSchema', $methods ), 'exists method buildSchema' ); - $r = new ReflectionMethod('PmTable', 'buildSchema'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::remove - * @todo Implement testremove(). - */ - public function testremove() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('remove', $methods ), 'exists method remove' ); - $r = new ReflectionMethod('PmTable', 'remove'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::removeFromSchema - * @todo Implement testremoveFromSchema(). - */ - public function testremoveFromSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeFromSchema', $methods ), 'exists method removeFromSchema' ); - $r = new ReflectionMethod('PmTable', 'removeFromSchema'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::removeModelFiles - * @todo Implement testremoveModelFiles(). - */ - public function testremoveModelFiles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeModelFiles', $methods ), 'exists method removeModelFiles' ); - $r = new ReflectionMethod('PmTable', 'removeModelFiles'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::dropTable - * @todo Implement testdropTable(). - */ - public function testdropTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dropTable', $methods ), 'exists method dropTable' ); - $r = new ReflectionMethod('PmTable', 'dropTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tableName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers PmTable::saveSchema - * @todo Implement testsaveSchema(). - */ - public function testsaveSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveSchema', $methods ), 'exists method saveSchema' ); - $r = new ReflectionMethod('PmTable', 'saveSchema'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::preparePropelIniFile - * @todo Implement testpreparePropelIniFile(). - */ - public function testpreparePropelIniFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('preparePropelIniFile', $methods ), 'exists method preparePropelIniFile' ); - $r = new ReflectionMethod('PmTable', 'preparePropelIniFile'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::upgradeDatabase - * @todo Implement testupgradeDatabase(). - */ - public function testupgradeDatabase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeDatabase', $methods ), 'exists method upgradeDatabase' ); - $r = new ReflectionMethod('PmTable', 'upgradeDatabase'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::upgradeDatabaseFor - * @todo Implement testupgradeDatabaseFor(). - */ - public function testupgradeDatabaseFor() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeDatabaseFor', $methods ), 'exists method upgradeDatabaseFor' ); - $r = new ReflectionMethod('PmTable', 'upgradeDatabaseFor'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dataSource'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tablesList'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers PmTable::hasAutoIncrementPKey - * @todo Implement testhasAutoIncrementPKey(). - */ - public function testhasAutoIncrementPKey() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('hasAutoIncrementPKey', $methods ), 'exists method hasAutoIncrementPKey' ); - $r = new ReflectionMethod('PmTable', 'hasAutoIncrementPKey'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::getPropelSupportedColumnTypes - * @todo Implement testgetPropelSupportedColumnTypes(). - */ - public function testgetPropelSupportedColumnTypes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPropelSupportedColumnTypes', $methods ), - 'exists method getPropelSupportedColumnTypes' ); - $r = new ReflectionMethod('PmTable', 'getPropelSupportedColumnTypes'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::toCamelCase - * @todo Implement testtoCamelCase(). - */ - public function testtoCamelCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('toCamelCase', $methods ), 'exists method toCamelCase' ); - $r = new ReflectionMethod('PmTable', 'toCamelCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers PmTable::phingbuildModel - * @todo Implement testphingbuildModel(). - */ - public function testphingbuildModel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('phingbuildModel', $methods ), 'exists method phingbuildModel' ); - $r = new ReflectionMethod('PmTable', 'phingbuildModel'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::phingbuildSql - * @todo Implement testphingbuildSql(). - */ - public function testphingbuildSql() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('phingbuildSql', $methods ), 'exists method phingbuildSql' ); - $r = new ReflectionMethod('PmTable', 'phingbuildSql'); - $params = $r->getParameters(); - } - - /** - * @covers PmTable::callPhing - * @todo Implement testcallPhing(). - */ - public function testcallPhing() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('callPhing', $methods ), 'exists method callPhing' ); - $r = new ReflectionMethod('PmTable', 'callPhing'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'target'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'buildFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'options'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == array()); - $this->assertTrue( $params[3]->getName() == 'verbose'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '1'); - } -} - diff --git a/tests/automated/workflow/engine/classes/classProcessesTest.php b/tests/automated/workflow/engine/classes/classProcessesTest.php deleted file mode 100644 index 8177d6692..000000000 --- a/tests/automated/workflow/engine/classes/classProcessesTest.php +++ /dev/null @@ -1,2176 +0,0 @@ -object = new Processes(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Processes'); $this->assertTrue( count($methods) == 142); - } - - /** - * @covers Processes::changeStatus - * @todo Implement testchangeStatus(). - */ - public function testchangeStatus() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('changeStatus', $methods ), 'exists method changeStatus' ); - $r = new ReflectionMethod('Processes', 'changeStatus'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::changeDebugMode - * @todo Implement testchangeDebugMode(). - */ - public function testchangeDebugMode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('changeDebugMode', $methods ), 'exists method changeDebugMode' ); - $r = new ReflectionMethod('Processes', 'changeDebugMode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::changeProcessParent - * @todo Implement testchangeProcessParent(). - */ - public function testchangeProcessParent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('changeProcessParent', $methods ), 'exists method changeProcessParent' ); - $r = new ReflectionMethod('Processes', 'changeProcessParent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sParentUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::processExists - * @todo Implement testprocessExists(). - */ - public function testprocessExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('processExists', $methods ), 'exists method processExists' ); - $r = new ReflectionMethod('Processes', 'processExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::getUnusedProcessGUID - * @todo Implement testgetUnusedProcessGUID(). - */ - public function testgetUnusedProcessGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedProcessGUID', $methods ), 'exists method getUnusedProcessGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedProcessGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::taskExists - * @todo Implement testtaskExists(). - */ - public function testtaskExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskExists', $methods ), 'exists method taskExists' ); - $r = new ReflectionMethod('Processes', 'taskExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTasUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::getUnusedTaskGUID - * @todo Implement testgetUnusedTaskGUID(). - */ - public function testgetUnusedTaskGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedTaskGUID', $methods ), 'exists method getUnusedTaskGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedTaskGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::dynaformExists - * @todo Implement testdynaformExists(). - */ - public function testdynaformExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dynaformExists', $methods ), 'exists method dynaformExists' ); - $r = new ReflectionMethod('Processes', 'dynaformExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sDynUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::inputExists - * @todo Implement testinputExists(). - */ - public function testinputExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('inputExists', $methods ), 'exists method inputExists' ); - $r = new ReflectionMethod('Processes', 'inputExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::outputExists - * @todo Implement testoutputExists(). - */ - public function testoutputExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('outputExists', $methods ), 'exists method outputExists' ); - $r = new ReflectionMethod('Processes', 'outputExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::triggerExists - * @todo Implement testtriggerExists(). - */ - public function testtriggerExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('triggerExists', $methods ), 'exists method triggerExists' ); - $r = new ReflectionMethod('Processes', 'triggerExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::SubProcessExists - * @todo Implement testSubProcessExists(). - */ - public function testSubProcessExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('SubProcessExists', $methods ), 'exists method SubProcessExists' ); - $r = new ReflectionMethod('Processes', 'SubProcessExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::caseTrackerObjectExists - * @todo Implement testcaseTrackerObjectExists(). - */ - public function testcaseTrackerObjectExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseTrackerObjectExists', $methods ), 'exists method caseTrackerObjectExists' ); - $r = new ReflectionMethod('Processes', 'caseTrackerObjectExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::caseTrackerExists - * @todo Implement testcaseTrackerExists(). - */ - public function testcaseTrackerExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseTrackerExists', $methods ), 'exists method caseTrackerExists' ); - $r = new ReflectionMethod('Processes', 'caseTrackerExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::dbConnectionExists - * @todo Implement testdbConnectionExists(). - */ - public function testdbConnectionExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dbConnectionExists', $methods ), 'exists method dbConnectionExists' ); - $r = new ReflectionMethod('Processes', 'dbConnectionExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::objectPermissionExists - * @todo Implement testobjectPermissionExists(). - */ - public function testobjectPermissionExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('objectPermissionExists', $methods ), 'exists method objectPermissionExists' ); - $r = new ReflectionMethod('Processes', 'objectPermissionExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::routeExists - * @todo Implement testrouteExists(). - */ - public function testrouteExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('routeExists', $methods ), 'exists method routeExists' ); - $r = new ReflectionMethod('Processes', 'routeExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::stageExists - * @todo Implement teststageExists(). - */ - public function teststageExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stageExists', $methods ), 'exists method stageExists' ); - $r = new ReflectionMethod('Processes', 'stageExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::slExists - * @todo Implement testslExists(). - */ - public function testslExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('slExists', $methods ), 'exists method slExists' ); - $r = new ReflectionMethod('Processes', 'slExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::reportTableExists - * @todo Implement testreportTableExists(). - */ - public function testreportTableExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reportTableExists', $methods ), 'exists method reportTableExists' ); - $r = new ReflectionMethod('Processes', 'reportTableExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::reportVarExists - * @todo Implement testreportVarExists(). - */ - public function testreportVarExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reportVarExists', $methods ), 'exists method reportVarExists' ); - $r = new ReflectionMethod('Processes', 'reportVarExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::fieldsConditionsExists - * @todo Implement testfieldsConditionsExists(). - */ - public function testfieldsConditionsExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fieldsConditionsExists', $methods ), 'exists method fieldsConditionsExists' ); - $r = new ReflectionMethod('Processes', 'fieldsConditionsExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::eventExists - * @todo Implement testeventExists(). - */ - public function testeventExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('eventExists', $methods ), 'exists method eventExists' ); - $r = new ReflectionMethod('Processes', 'eventExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::caseSchedulerExists - * @todo Implement testcaseSchedulerExists(). - */ - public function testcaseSchedulerExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseSchedulerExists', $methods ), 'exists method caseSchedulerExists' ); - $r = new ReflectionMethod('Processes', 'caseSchedulerExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::getUnusedInputGUID - * @todo Implement testgetUnusedInputGUID(). - */ - public function testgetUnusedInputGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedInputGUID', $methods ), 'exists method getUnusedInputGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedInputGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedOutputGUID - * @todo Implement testgetUnusedOutputGUID(). - */ - public function testgetUnusedOutputGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedOutputGUID', $methods ), 'exists method getUnusedOutputGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedOutputGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedTriggerGUID - * @todo Implement testgetUnusedTriggerGUID(). - */ - public function testgetUnusedTriggerGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedTriggerGUID', $methods ), 'exists method getUnusedTriggerGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedTriggerGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedSubProcessGUID - * @todo Implement testgetUnusedSubProcessGUID(). - */ - public function testgetUnusedSubProcessGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedSubProcessGUID', $methods ), 'exists method getUnusedSubProcessGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedSubProcessGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedCaseTrackerObjectGUID - * @todo Implement testgetUnusedCaseTrackerObjectGUID(). - */ - public function testgetUnusedCaseTrackerObjectGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedCaseTrackerObjectGUID', $methods ), 'exists method getUnusedCaseTrackerObjectGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedCaseTrackerObjectGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedDBSourceGUID - * @todo Implement testgetUnusedDBSourceGUID(). - */ - public function testgetUnusedDBSourceGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedDBSourceGUID', $methods ), 'exists method getUnusedDBSourceGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedDBSourceGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedObjectPermissionGUID - * @todo Implement testgetUnusedObjectPermissionGUID(). - */ - public function testgetUnusedObjectPermissionGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedObjectPermissionGUID', $methods ), 'exists method getUnusedObjectPermissionGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedObjectPermissionGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedRouteGUID - * @todo Implement testgetUnusedRouteGUID(). - */ - public function testgetUnusedRouteGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedRouteGUID', $methods ), 'exists method getUnusedRouteGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedRouteGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedStageGUID - * @todo Implement testgetUnusedStageGUID(). - */ - public function testgetUnusedStageGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedStageGUID', $methods ), 'exists method getUnusedStageGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedStageGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedSLGUID - * @todo Implement testgetUnusedSLGUID(). - */ - public function testgetUnusedSLGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedSLGUID', $methods ), 'exists method getUnusedSLGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedSLGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedRTGUID - * @todo Implement testgetUnusedRTGUID(). - */ - public function testgetUnusedRTGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedRTGUID', $methods ), 'exists method getUnusedRTGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedRTGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedRTVGUID - * @todo Implement testgetUnusedRTVGUID(). - */ - public function testgetUnusedRTVGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedRTVGUID', $methods ), 'exists method getUnusedRTVGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedRTVGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::stepExists - * @todo Implement teststepExists(). - */ - public function teststepExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stepExists', $methods ), 'exists method stepExists' ); - $r = new ReflectionMethod('Processes', 'stepExists'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::getUnusedStepGUID - * @todo Implement testgetUnusedStepGUID(). - */ - public function testgetUnusedStepGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedStepGUID', $methods ), 'exists method getUnusedStepGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedStepGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedDynaformGUID - * @todo Implement testgetUnusedDynaformGUID(). - */ - public function testgetUnusedDynaformGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedDynaformGUID', $methods ), 'exists method getUnusedDynaformGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedDynaformGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedFieldConditionGUID - * @todo Implement testgetUnusedFieldConditionGUID(). - */ - public function testgetUnusedFieldConditionGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedFieldConditionGUID', $methods ), 'exists method getUnusedFieldConditionGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedFieldConditionGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedEventGUID - * @todo Implement testgetUnusedEventGUID(). - */ - public function testgetUnusedEventGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedEventGUID', $methods ), 'exists method getUnusedEventGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedEventGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::getUnusedCaseSchedulerGUID - * @todo Implement testgetUnusedCaseSchedulerGUID(). - */ - public function testgetUnusedCaseSchedulerGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUnusedCaseSchedulerGUID', $methods ), 'exists method getUnusedCaseSchedulerGUID' ); - $r = new ReflectionMethod('Processes', 'getUnusedCaseSchedulerGUID'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::setProcessGUID - * @todo Implement testsetProcessGUID(). - */ - public function testsetProcessGUID() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setProcessGUID', $methods ), 'exists method setProcessGUID' ); - $r = new ReflectionMethod('Processes', 'setProcessGUID'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sNewProUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::setProcessParent - * @todo Implement testsetProcessParent(). - */ - public function testsetProcessParent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setProcessParent', $methods ), 'exists method setProcessParent' ); - $r = new ReflectionMethod('Processes', 'setProcessParent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sParentUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::renewAllTaskGuid - * @todo Implement testrenewAllTaskGuid(). - */ - public function testrenewAllTaskGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllTaskGuid', $methods ), 'exists method renewAllTaskGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllTaskGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllDynaformGuid - * @todo Implement testrenewAllDynaformGuid(). - */ - public function testrenewAllDynaformGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllDynaformGuid', $methods ), 'exists method renewAllDynaformGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllDynaformGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getProcessRow - * @todo Implement testgetProcessRow(). - */ - public function testgetProcessRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getProcessRow', $methods ), 'exists method getProcessRow' ); - $r = new ReflectionMethod('Processes', 'getProcessRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'getAllLang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers Processes::createProcessRow - * @todo Implement testcreateProcessRow(). - */ - public function testcreateProcessRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createProcessRow', $methods ), 'exists method createProcessRow' ); - $r = new ReflectionMethod('Processes', 'createProcessRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'row'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::updateProcessRow - * @todo Implement testupdateProcessRow(). - */ - public function testupdateProcessRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateProcessRow', $methods ), 'exists method updateProcessRow' ); - $r = new ReflectionMethod('Processes', 'updateProcessRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'row'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getSubProcessRow - * @todo Implement testgetSubProcessRow(). - */ - public function testgetSubProcessRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSubProcessRow', $methods ), 'exists method getSubProcessRow' ); - $r = new ReflectionMethod('Processes', 'getSubProcessRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getCaseTrackerRow - * @todo Implement testgetCaseTrackerRow(). - */ - public function testgetCaseTrackerRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseTrackerRow', $methods ), 'exists method getCaseTrackerRow' ); - $r = new ReflectionMethod('Processes', 'getCaseTrackerRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getCaseTrackerObjectRow - * @todo Implement testgetCaseTrackerObjectRow(). - */ - public function testgetCaseTrackerObjectRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseTrackerObjectRow', $methods ), 'exists method getCaseTrackerObjectRow' ); - $r = new ReflectionMethod('Processes', 'getCaseTrackerObjectRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getStageRow - * @todo Implement testgetStageRow(). - */ - public function testgetStageRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStageRow', $methods ), 'exists method getStageRow' ); - $r = new ReflectionMethod('Processes', 'getStageRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getFieldCondition - * @todo Implement testgetFieldCondition(). - */ - public function testgetFieldCondition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFieldCondition', $methods ), 'exists method getFieldCondition' ); - $r = new ReflectionMethod('Processes', 'getFieldCondition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getEventRow - * @todo Implement testgetEventRow(). - */ - public function testgetEventRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getEventRow', $methods ), 'exists method getEventRow' ); - $r = new ReflectionMethod('Processes', 'getEventRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getCaseSchedulerRow - * @todo Implement testgetCaseSchedulerRow(). - */ - public function testgetCaseSchedulerRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseSchedulerRow', $methods ), 'exists method getCaseSchedulerRow' ); - $r = new ReflectionMethod('Processes', 'getCaseSchedulerRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getProcessCategoryRow - * @todo Implement testgetProcessCategoryRow(). - */ - public function testgetProcessCategoryRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getProcessCategoryRow', $methods ), 'exists method getProcessCategoryRow' ); - $r = new ReflectionMethod('Processes', 'getProcessCategoryRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getAllLanes - * @todo Implement testgetAllLanes(). - */ - public function testgetAllLanes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllLanes', $methods ), 'exists method getAllLanes' ); - $r = new ReflectionMethod('Processes', 'getAllLanes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getTaskRows - * @todo Implement testgetTaskRows(). - */ - public function testgetTaskRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTaskRows', $methods ), 'exists method getTaskRows' ); - $r = new ReflectionMethod('Processes', 'getTaskRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createTaskRows - * @todo Implement testcreateTaskRows(). - */ - public function testcreateTaskRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createTaskRows', $methods ), 'exists method createTaskRows' ); - $r = new ReflectionMethod('Processes', 'createTaskRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTasks'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::updateTaskRows - * @todo Implement testupdateTaskRows(). - */ - public function testupdateTaskRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateTaskRows', $methods ), 'exists method updateTaskRows' ); - $r = new ReflectionMethod('Processes', 'updateTaskRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTasks'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getRouteRows - * @todo Implement testgetRouteRows(). - */ - public function testgetRouteRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRouteRows', $methods ), 'exists method getRouteRows' ); - $r = new ReflectionMethod('Processes', 'getRouteRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createRouteRows - * @todo Implement testcreateRouteRows(). - */ - public function testcreateRouteRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createRouteRows', $methods ), 'exists method createRouteRows' ); - $r = new ReflectionMethod('Processes', 'createRouteRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRoutes'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::updateRouteRows - * @todo Implement testupdateRouteRows(). - */ - public function testupdateRouteRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateRouteRows', $methods ), 'exists method updateRouteRows' ); - $r = new ReflectionMethod('Processes', 'updateRouteRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRoutes'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getLaneRows - * @todo Implement testgetLaneRows(). - */ - public function testgetLaneRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getLaneRows', $methods ), 'exists method getLaneRows' ); - $r = new ReflectionMethod('Processes', 'getLaneRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getGatewayRows - * @todo Implement testgetGatewayRows(). - */ - public function testgetGatewayRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGatewayRows', $methods ), 'exists method getGatewayRows' ); - $r = new ReflectionMethod('Processes', 'getGatewayRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createGatewayRows - * @todo Implement testcreateGatewayRows(). - */ - public function testcreateGatewayRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createGatewayRows', $methods ), 'exists method createGatewayRows' ); - $r = new ReflectionMethod('Processes', 'createGatewayRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aGateways'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createLaneRows - * @todo Implement testcreateLaneRows(). - */ - public function testcreateLaneRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createLaneRows', $methods ), 'exists method createLaneRows' ); - $r = new ReflectionMethod('Processes', 'createLaneRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aLanes'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createSubProcessRows - * @todo Implement testcreateSubProcessRows(). - */ - public function testcreateSubProcessRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createSubProcessRows', $methods ), 'exists method createSubProcessRows' ); - $r = new ReflectionMethod('Processes', 'createSubProcessRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'SubProcess'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createCaseTrackerRows - * @todo Implement testcreateCaseTrackerRows(). - */ - public function testcreateCaseTrackerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createCaseTrackerRows', $methods ), 'exists method createCaseTrackerRows' ); - $r = new ReflectionMethod('Processes', 'createCaseTrackerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'CaseTracker'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createCaseTrackerObjectRows - * @todo Implement testcreateCaseTrackerObjectRows(). - */ - public function testcreateCaseTrackerObjectRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createCaseTrackerObjectRows', $methods ), 'exists method createCaseTrackerObjectRows' ); - $r = new ReflectionMethod('Processes', 'createCaseTrackerObjectRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'CaseTrackerObject'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createObjectPermissionsRows - * @todo Implement testcreateObjectPermissionsRows(). - */ - public function testcreateObjectPermissionsRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createObjectPermissionsRows', $methods ), 'exists method createObjectPermissionsRows' ); - $r = new ReflectionMethod('Processes', 'createObjectPermissionsRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'ObjectPermissions'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createStageRows - * @todo Implement testcreateStageRows(). - */ - public function testcreateStageRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createStageRows', $methods ), 'exists method createStageRows' ); - $r = new ReflectionMethod('Processes', 'createStageRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'Stage'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createFieldCondition - * @todo Implement testcreateFieldCondition(). - */ - public function testcreateFieldCondition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createFieldCondition', $methods ), 'exists method createFieldCondition' ); - $r = new ReflectionMethod('Processes', 'createFieldCondition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aFieldCondition'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aDynaform'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::createEventRows - * @todo Implement testcreateEventRows(). - */ - public function testcreateEventRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createEventRows', $methods ), 'exists method createEventRows' ); - $r = new ReflectionMethod('Processes', 'createEventRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'Event'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createCaseSchedulerRows - * @todo Implement testcreateCaseSchedulerRows(). - */ - public function testcreateCaseSchedulerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createCaseSchedulerRows', $methods ), 'exists method createCaseSchedulerRows' ); - $r = new ReflectionMethod('Processes', 'createCaseSchedulerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'CaseScheduler'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createProcessCategoryRow - * @todo Implement testcreateProcessCategoryRow(). - */ - public function testcreateProcessCategoryRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createProcessCategoryRow', $methods ), 'exists method createProcessCategoryRow' ); - $r = new ReflectionMethod('Processes', 'createProcessCategoryRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'row'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getInputRows - * @todo Implement testgetInputRows(). - */ - public function testgetInputRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getInputRows', $methods ), 'exists method getInputRows' ); - $r = new ReflectionMethod('Processes', 'getInputRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createInputRows - * @todo Implement testcreateInputRows(). - */ - public function testcreateInputRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createInputRows', $methods ), 'exists method createInputRows' ); - $r = new ReflectionMethod('Processes', 'createInputRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aInput'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllInputGuid - * @todo Implement testrenewAllInputGuid(). - */ - public function testrenewAllInputGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllInputGuid', $methods ), 'exists method renewAllInputGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllInputGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getOutputRows - * @todo Implement testgetOutputRows(). - */ - public function testgetOutputRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOutputRows', $methods ), 'exists method getOutputRows' ); - $r = new ReflectionMethod('Processes', 'getOutputRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createOutputRows - * @todo Implement testcreateOutputRows(). - */ - public function testcreateOutputRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createOutputRows', $methods ), 'exists method createOutputRows' ); - $r = new ReflectionMethod('Processes', 'createOutputRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aOutput'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllOutputGuid - * @todo Implement testrenewAllOutputGuid(). - */ - public function testrenewAllOutputGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllOutputGuid', $methods ), 'exists method renewAllOutputGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllOutputGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllTriggerGuid - * @todo Implement testrenewAllTriggerGuid(). - */ - public function testrenewAllTriggerGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllTriggerGuid', $methods ), 'exists method renewAllTriggerGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllTriggerGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllSubProcessGuid - * @todo Implement testrenewAllSubProcessGuid(). - */ - public function testrenewAllSubProcessGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllSubProcessGuid', $methods ), 'exists method renewAllSubProcessGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllSubProcessGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllCaseTrackerObjectGuid - * @todo Implement testrenewAllCaseTrackerObjectGuid(). - */ - public function testrenewAllCaseTrackerObjectGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllCaseTrackerObjectGuid', $methods ), 'exists method renewAllCaseTrackerObjectGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllCaseTrackerObjectGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllDBSourceGuid - * @todo Implement testrenewAllDBSourceGuid(). - */ - public function testrenewAllDBSourceGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllDBSourceGuid', $methods ), 'exists method renewAllDBSourceGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllDBSourceGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllObjectPermissionGuid - * @todo Implement testrenewAllObjectPermissionGuid(). - */ - public function testrenewAllObjectPermissionGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllObjectPermissionGuid', $methods ), 'exists method renewAllObjectPermissionGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllObjectPermissionGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllRouteGuid - * @todo Implement testrenewAllRouteGuid(). - */ - public function testrenewAllRouteGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllRouteGuid', $methods ), 'exists method renewAllRouteGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllRouteGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllStageGuid - * @todo Implement testrenewAllStageGuid(). - */ - public function testrenewAllStageGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllStageGuid', $methods ), 'exists method renewAllStageGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllStageGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllSwimlanesElementsGuid - * @todo Implement testrenewAllSwimlanesElementsGuid(). - */ - public function testrenewAllSwimlanesElementsGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllSwimlanesElementsGuid', $methods ), 'exists method renewAllSwimlanesElementsGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllSwimlanesElementsGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllReportTableGuid - * @todo Implement testrenewAllReportTableGuid(). - */ - public function testrenewAllReportTableGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllReportTableGuid', $methods ), 'exists method renewAllReportTableGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllReportTableGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllReportVarGuid - * @todo Implement testrenewAllReportVarGuid(). - */ - public function testrenewAllReportVarGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllReportVarGuid', $methods ), 'exists method renewAllReportVarGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllReportVarGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllFieldCondition - * @todo Implement testrenewAllFieldCondition(). - */ - public function testrenewAllFieldCondition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllFieldCondition', $methods ), 'exists method renewAllFieldCondition' ); - $r = new ReflectionMethod('Processes', 'renewAllFieldCondition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllEvent - * @todo Implement testrenewAllEvent(). - */ - public function testrenewAllEvent() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllEvent', $methods ), 'exists method renewAllEvent' ); - $r = new ReflectionMethod('Processes', 'renewAllEvent'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllCaseScheduler - * @todo Implement testrenewAllCaseScheduler(). - */ - public function testrenewAllCaseScheduler() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllCaseScheduler', $methods ), 'exists method renewAllCaseScheduler' ); - $r = new ReflectionMethod('Processes', 'renewAllCaseScheduler'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAll - * @todo Implement testrenewAll(). - */ - public function testrenewAll() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAll', $methods ), 'exists method renewAll' ); - $r = new ReflectionMethod('Processes', 'renewAll'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getStepRows - * @todo Implement testgetStepRows(). - */ - public function testgetStepRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepRows', $methods ), 'exists method getStepRows' ); - $r = new ReflectionMethod('Processes', 'getStepRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createStepRows - * @todo Implement testcreateStepRows(). - */ - public function testcreateStepRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createStepRows', $methods ), 'exists method createStepRows' ); - $r = new ReflectionMethod('Processes', 'createStepRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aStep'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createStepSupervisorRows - * @todo Implement testcreateStepSupervisorRows(). - */ - public function testcreateStepSupervisorRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createStepSupervisorRows', $methods ), 'exists method createStepSupervisorRows' ); - $r = new ReflectionMethod('Processes', 'createStepSupervisorRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aStepSupervisor'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renewAllStepGuid - * @todo Implement testrenewAllStepGuid(). - */ - public function testrenewAllStepGuid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renewAllStepGuid', $methods ), 'exists method renewAllStepGuid' ); - $r = new ReflectionMethod('Processes', 'renewAllStepGuid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getDynaformRows - * @todo Implement testgetDynaformRows(). - */ - public function testgetDynaformRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDynaformRows', $methods ), 'exists method getDynaformRows' ); - $r = new ReflectionMethod('Processes', 'getDynaformRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getObjectPermissionRows - * @todo Implement testgetObjectPermissionRows(). - */ - public function testgetObjectPermissionRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getObjectPermissionRows', $methods ), 'exists method getObjectPermissionRows' ); - $r = new ReflectionMethod('Processes', 'getObjectPermissionRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createDynaformRows - * @todo Implement testcreateDynaformRows(). - */ - public function testcreateDynaformRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createDynaformRows', $methods ), 'exists method createDynaformRows' ); - $r = new ReflectionMethod('Processes', 'createDynaformRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aDynaform'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createStepTriggerRows - * @todo Implement testcreateStepTriggerRows(). - */ - public function testcreateStepTriggerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createStepTriggerRows', $methods ), 'exists method createStepTriggerRows' ); - $r = new ReflectionMethod('Processes', 'createStepTriggerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aStepTrigger'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getStepTriggerRows - * @todo Implement testgetStepTriggerRows(). - */ - public function testgetStepTriggerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepTriggerRows', $methods ), 'exists method getStepTriggerRows' ); - $r = new ReflectionMethod('Processes', 'getStepTriggerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getTriggerRows - * @todo Implement testgetTriggerRows(). - */ - public function testgetTriggerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTriggerRows', $methods ), 'exists method getTriggerRows' ); - $r = new ReflectionMethod('Processes', 'getTriggerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createTriggerRows - * @todo Implement testcreateTriggerRows(). - */ - public function testcreateTriggerRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createTriggerRows', $methods ), 'exists method createTriggerRows' ); - $r = new ReflectionMethod('Processes', 'createTriggerRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTrigger'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getGroupwfRows - * @todo Implement testgetGroupwfRows(). - */ - public function testgetGroupwfRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGroupwfRows', $methods ), 'exists method getGroupwfRows' ); - $r = new ReflectionMethod('Processes', 'getGroupwfRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aGroups'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getDBConnectionsRows - * @todo Implement testgetDBConnectionsRows(). - */ - public function testgetDBConnectionsRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDBConnectionsRows', $methods ), 'exists method getDBConnectionsRows' ); - $r = new ReflectionMethod('Processes', 'getDBConnectionsRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getStepSupervisorRows - * @todo Implement testgetStepSupervisorRows(). - */ - public function testgetStepSupervisorRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepSupervisorRows', $methods ), 'exists method getStepSupervisorRows' ); - $r = new ReflectionMethod('Processes', 'getStepSupervisorRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getReportTablesRows - * @todo Implement testgetReportTablesRows(). - */ - public function testgetReportTablesRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getReportTablesRows', $methods ), 'exists method getReportTablesRows' ); - $r = new ReflectionMethod('Processes', 'getReportTablesRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getReportTablesVarsRows - * @todo Implement testgetReportTablesVarsRows(). - */ - public function testgetReportTablesVarsRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getReportTablesVarsRows', $methods ), 'exists method getReportTablesVarsRows' ); - $r = new ReflectionMethod('Processes', 'getReportTablesVarsRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getTaskUserRows - * @todo Implement testgetTaskUserRows(). - */ - public function testgetTaskUserRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTaskUserRows', $methods ), 'exists method getTaskUserRows' ); - $r = new ReflectionMethod('Processes', 'getTaskUserRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createTaskUserRows - * @todo Implement testcreateTaskUserRows(). - */ - public function testcreateTaskUserRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createTaskUserRows', $methods ), 'exists method createTaskUserRows' ); - $r = new ReflectionMethod('Processes', 'createTaskUserRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTaskUser'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createGroupRow - * @todo Implement testcreateGroupRow(). - */ - public function testcreateGroupRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createGroupRow', $methods ), 'exists method createGroupRow' ); - $r = new ReflectionMethod('Processes', 'createGroupRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aGroupwf'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createDBConnectionsRows - * @todo Implement testcreateDBConnectionsRows(). - */ - public function testcreateDBConnectionsRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createDBConnectionsRows', $methods ), 'exists method createDBConnectionsRows' ); - $r = new ReflectionMethod('Processes', 'createDBConnectionsRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aConnections'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createReportTables - * @todo Implement testcreateReportTables(). - */ - public function testcreateReportTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createReportTables', $methods ), 'exists method createReportTables' ); - $r = new ReflectionMethod('Processes', 'createReportTables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aReportTables'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aReportTablesVars'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::updateReportTables - * @todo Implement testupdateReportTables(). - */ - public function testupdateReportTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateReportTables', $methods ), 'exists method updateReportTables' ); - $r = new ReflectionMethod('Processes', 'updateReportTables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aReportTables'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'aReportTablesVars'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::createReportTablesVars - * @todo Implement testcreateReportTablesVars(). - */ - public function testcreateReportTablesVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createReportTablesVars', $methods ), 'exists method createReportTablesVars' ); - $r = new ReflectionMethod('Processes', 'createReportTablesVars'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aReportTablesVars'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::cleanupReportTablesReferences - * @todo Implement testcleanupReportTablesReferences(). - */ - public function testcleanupReportTablesReferences() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('cleanupReportTablesReferences', $methods ), 'exists method cleanupReportTablesReferences' ); - $r = new ReflectionMethod('Processes', 'cleanupReportTablesReferences'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aReportTables'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::serializeProcess - * @todo Implement testserializeProcess(). - */ - public function testserializeProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('serializeProcess', $methods ), 'exists method serializeProcess' ); - $r = new ReflectionMethod('Processes', 'serializeProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Processes::saveSerializedProcess - * @todo Implement testsaveSerializedProcess(). - */ - public function testsaveSerializedProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveSerializedProcess', $methods ), 'exists method saveSerializedProcess' ); - $r = new ReflectionMethod('Processes', 'saveSerializedProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getProcessData - * @todo Implement testgetProcessData(). - */ - public function testgetProcessData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getProcessData', $methods ), 'exists method getProcessData' ); - $r = new ReflectionMethod('Processes', 'getProcessData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'pmFilename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::checkExistingGroups - * @todo Implement testcheckExistingGroups(). - */ - public function testcheckExistingGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('checkExistingGroups', $methods ), 'exists method checkExistingGroups' ); - $r = new ReflectionMethod('Processes', 'checkExistingGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupList'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::renameExistingGroups - * @todo Implement testrenameExistingGroups(). - */ - public function testrenameExistingGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renameExistingGroups', $methods ), 'exists method renameExistingGroups' ); - $r = new ReflectionMethod('Processes', 'renameExistingGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupList'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::mergeExistingGroups - * @todo Implement testmergeExistingGroups(). - */ - public function testmergeExistingGroups() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('mergeExistingGroups', $methods ), 'exists method mergeExistingGroups' ); - $r = new ReflectionMethod('Processes', 'mergeExistingGroups'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGroupList'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::mergeExistingUsers - * @todo Implement testmergeExistingUsers(). - */ - public function testmergeExistingUsers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('mergeExistingUsers', $methods ), 'exists method mergeExistingUsers' ); - $r = new ReflectionMethod('Processes', 'mergeExistingUsers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sBaseGroupList'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sGroupList'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTaskUserList'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Processes::disablePreviousProcesses - * @todo Implement testdisablePreviousProcesses(). - */ - public function testdisablePreviousProcesses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('disablePreviousProcesses', $methods ), 'exists method disablePreviousProcesses' ); - $r = new ReflectionMethod('Processes', 'disablePreviousProcesses'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createFiles - * @todo Implement testcreateFiles(). - */ - public function testcreateFiles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createFiles', $methods ), 'exists method createFiles' ); - $r = new ReflectionMethod('Processes', 'createFiles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pmFilename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::removeProcessRows - * @todo Implement testremoveProcessRows(). - */ - public function testremoveProcessRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeProcessRows', $methods ), 'exists method removeProcessRows' ); - $r = new ReflectionMethod('Processes', 'removeProcessRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::createProcessFromData - * @todo Implement testcreateProcessFromData(). - */ - public function testcreateProcessFromData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createProcessFromData', $methods ), 'exists method createProcessFromData' ); - $r = new ReflectionMethod('Processes', 'createProcessFromData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pmFilename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::updateProcessFromData - * @todo Implement testupdateProcessFromData(). - */ - public function testupdateProcessFromData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateProcessFromData', $methods ), 'exists method updateProcessFromData' ); - $r = new ReflectionMethod('Processes', 'updateProcessFromData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pmFilename'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::getStartingTaskForUser - * @todo Implement testgetStartingTaskForUser(). - */ - public function testgetStartingTaskForUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStartingTaskForUser', $methods ), 'exists method getStartingTaskForUser' ); - $r = new ReflectionMethod('Processes', 'getStartingTaskForUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::ws_open - * @todo Implement testws_open(). - */ - public function testws_open() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ws_open', $methods ), 'exists method ws_open' ); - $r = new ReflectionMethod('Processes', 'ws_open'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'user'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'pass'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Processes::ws_open_public - * @todo Implement testws_open_public(). - */ - public function testws_open_public() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ws_open_public', $methods ), 'exists method ws_open_public' ); - $r = new ReflectionMethod('Processes', 'ws_open_public'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::ws_processList - * @todo Implement testws_processList(). - */ - public function testws_processList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ws_processList', $methods ), 'exists method ws_processList' ); - $r = new ReflectionMethod('Processes', 'ws_processList'); - $params = $r->getParameters(); - } - - /** - * @covers Processes::downloadFile - * @todo Implement testdownloadFile(). - */ - public function testdownloadFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('downloadFile', $methods ), 'exists method downloadFile' ); - $r = new ReflectionMethod('Processes', 'downloadFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'local_path'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'newfilename'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Processes::ws_processGetData - * @todo Implement testws_processGetData(). - */ - public function testws_processGetData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ws_processGetData', $methods ), 'exists method ws_processGetData' ); - $r = new ReflectionMethod('Processes', 'ws_processGetData'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'proId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::parseItemArray - * @todo Implement testparseItemArray(). - */ - public function testparseItemArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parseItemArray', $methods ), 'exists method parseItemArray' ); - $r = new ReflectionMethod('Processes', 'parseItemArray'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'array'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Processes::getProcessFiles - * @todo Implement testgetProcessFiles(). - */ - public function testgetProcessFiles() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getProcessFiles', $methods ), 'exists method getProcessFiles' ); - $r = new ReflectionMethod('Processes', 'getProcessFiles'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'proUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classReportTablesTest.php b/tests/automated/workflow/engine/classes/classReportTablesTest.php deleted file mode 100644 index ee7de4026..000000000 --- a/tests/automated/workflow/engine/classes/classReportTablesTest.php +++ /dev/null @@ -1,272 +0,0 @@ -object = new ReportTables(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('ReportTables'); - $this->assertTrue( count($methods) == 11); - } - - /** - * @covers ReportTables::deleteAllReportVars - * @todo Implement testdeleteAllReportVars(). - */ - public function testdeleteAllReportVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteAllReportVars', $methods ), 'exists method deleteAllReportVars' ); - $r = new ReflectionMethod('ReportTables', 'deleteAllReportVars'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sRepTabUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers ReportTables::dropTable - * @todo Implement testdropTable(). - */ - public function testdropTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dropTable', $methods ), 'exists method dropTable' ); - $r = new ReflectionMethod('ReportTables', 'dropTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTableName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sConnection'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'report'); - } - - /** - * @covers ReportTables::createTable - * @todo Implement testcreateTable(). - */ - public function testcreateTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createTable', $methods ), 'exists method createTable' ); - $r = new ReflectionMethod('ReportTables', 'createTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTableName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sConnection'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'report'); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'NORMAL'); - $this->assertTrue( $params[3]->getName() == 'aFields'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == array()); - $this->assertTrue( $params[4]->getName() == 'bDefaultFields'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '1'); - } - - /** - * @covers ReportTables::populateTable - * @todo Implement testpopulateTable(). - */ - public function testpopulateTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('populateTable', $methods ), 'exists method populateTable' ); - $r = new ReflectionMethod('ReportTables', 'populateTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTableName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sConnection'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == 'report'); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'NORMAL'); - $this->assertTrue( $params[3]->getName() == 'aFields'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == array()); - $this->assertTrue( $params[4]->getName() == 'sProcessUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'sGrid'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers ReportTables::getTableVars - * @todo Implement testgetTableVars(). - */ - public function testgetTableVars() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTableVars', $methods ), 'exists method getTableVars' ); - $r = new ReflectionMethod('ReportTables', 'getTableVars'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sRepTabUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'bWhitType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers ReportTables::deleteReportTable - * @todo Implement testdeleteReportTable(). - */ - public function testdeleteReportTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteReportTable', $methods ), 'exists method deleteReportTable' ); - $r = new ReflectionMethod('ReportTables', 'deleteReportTable'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sRepTabUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers ReportTables::getSplitDate - * @todo Implement testgetSplitDate(). - */ - public function testgetSplitDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSplitDate', $methods ), 'exists method getSplitDate' ); - $r = new ReflectionMethod('ReportTables', 'getSplitDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'mask'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers ReportTables::getFormatDate - * @todo Implement testgetFormatDate(). - */ - public function testgetFormatDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getFormatDate', $methods ), 'exists method getFormatDate' ); - $r = new ReflectionMethod('ReportTables', 'getFormatDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sDate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMask'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers ReportTables::updateTables - * @todo Implement testupdateTables(). - */ - public function testupdateTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateTables', $methods ), 'exists method updateTables' ); - $r = new ReflectionMethod('ReportTables', 'updateTables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sApplicationUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iApplicationNumber'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'aFields'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers ReportTables::tableExist - * @todo Implement testtableExist(). - */ - public function testtableExist() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('tableExist', $methods ), 'exists method tableExist' ); - $r = new ReflectionMethod('ReportTables', 'tableExist'); - $params = $r->getParameters(); - } - - /** - * @covers ReportTables::chooseDB - * @todo Implement testchooseDB(). - */ - public function testchooseDB() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('chooseDB', $methods ), 'exists method chooseDB' ); - $r = new ReflectionMethod('ReportTables', 'chooseDB'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'TabConnectionk'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classReportTest.php b/tests/automated/workflow/engine/classes/classReportTest.php deleted file mode 100644 index 6a8abc025..000000000 --- a/tests/automated/workflow/engine/classes/classReportTest.php +++ /dev/null @@ -1,268 +0,0 @@ -object = new Report(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Report'); $this->assertTrue( count($methods) == 14); - } - - /** - * @covers Report::generatedReport1 - * @todo Implement testgeneratedReport1(). - */ - public function testgeneratedReport1() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport1', $methods ), 'exists method generatedReport1' ); - $r = new ReflectionMethod('Report', 'generatedReport1'); - $params = $r->getParameters(); - } - - /** - * @covers Report::generatedReport1_filter - * @todo Implement testgeneratedReport1_filter(). - */ - public function testgeneratedReport1_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport1_filter', $methods ), 'exists method generatedReport1_filter' ); - $r = new ReflectionMethod('Report', 'generatedReport1_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'to'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'startedby'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Report::descriptionReport1 - * @todo Implement testdescriptionReport1(). - */ - public function testdescriptionReport1() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('descriptionReport1', $methods ), 'exists method descriptionReport1' ); - $r = new ReflectionMethod('Report', 'descriptionReport1'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'PRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Report::generatedReport2 - * @todo Implement testgeneratedReport2(). - */ - public function testgeneratedReport2() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport2', $methods ), 'exists method generatedReport2' ); - $r = new ReflectionMethod('Report', 'generatedReport2'); - $params = $r->getParameters(); - } - - /** - * @covers Report::reports_Description_filter - * @todo Implement testreports_Description_filter(). - */ - public function testreports_Description_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reports_Description_filter', $methods ), 'exists method reports_Description_filter' ); - $r = new ReflectionMethod('Report', 'reports_Description_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'to'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'startedby'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'PRO_UID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers Report::generatedReport2_filter - * @todo Implement testgeneratedReport2_filter(). - */ - public function testgeneratedReport2_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport2_filter', $methods ), 'exists method generatedReport2_filter' ); - $r = new ReflectionMethod('Report', 'generatedReport2_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'from'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'to'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'startedby'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers Report::generatedReport3 - * @todo Implement testgeneratedReport3(). - */ - public function testgeneratedReport3() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport3', $methods ), 'exists method generatedReport3' ); - $r = new ReflectionMethod('Report', 'generatedReport3'); - $params = $r->getParameters(); - } - - /** - * @covers Report::generatedReport3_filter - * @todo Implement testgeneratedReport3_filter(). - */ - public function testgeneratedReport3_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport3_filter', $methods ), 'exists method generatedReport3_filter' ); - $r = new ReflectionMethod('Report', 'generatedReport3_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'process'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'task'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Report::generatedReport4 - * @todo Implement testgeneratedReport4(). - */ - public function testgeneratedReport4() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport4', $methods ), 'exists method generatedReport4' ); - $r = new ReflectionMethod('Report', 'generatedReport4'); - $params = $r->getParameters(); - } - - /** - * @covers Report::generatedReport4_filter - * @todo Implement testgeneratedReport4_filter(). - */ - public function testgeneratedReport4_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport4_filter', $methods ), 'exists method generatedReport4_filter' ); - $r = new ReflectionMethod('Report', 'generatedReport4_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'process'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'task'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Report::generatedReport5 - * @todo Implement testgeneratedReport5(). - */ - public function testgeneratedReport5() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport5', $methods ), 'exists method generatedReport5' ); - $r = new ReflectionMethod('Report', 'generatedReport5'); - $params = $r->getParameters(); - } - - /** - * @covers Report::generatedReport5_filter - * @todo Implement testgeneratedReport5_filter(). - */ - public function testgeneratedReport5_filter() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('generatedReport5_filter', $methods ), 'exists method generatedReport5_filter' ); - $r = new ReflectionMethod('Report', 'generatedReport5_filter'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'process'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'task'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Report::getAvailableReports - * @todo Implement testgetAvailableReports(). - */ - public function testgetAvailableReports() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableReports', $methods ), 'exists method getAvailableReports' ); - $r = new ReflectionMethod('Report', 'getAvailableReports'); - $params = $r->getParameters(); - } - - /** - * @covers Report::reportsPatch - * @todo Implement testreportsPatch(). - */ - public function testreportsPatch() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reportsPatch', $methods ), 'exists method reportsPatch' ); - $r = new ReflectionMethod('Report', 'reportsPatch'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classSessionsTest.php b/tests/automated/workflow/engine/classes/classSessionsTest.php deleted file mode 100644 index 0a33f0469..000000000 --- a/tests/automated/workflow/engine/classes/classSessionsTest.php +++ /dev/null @@ -1,142 +0,0 @@ -object = new Sessions(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Sessions'); $this->assertTrue( count($methods) == 6); - } - - /** - * @covers Sessions::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('Sessions', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSessionId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Sessions::getSessionUser - * @todo Implement testgetSessionUser(). - */ - public function testgetSessionUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSessionUser', $methods ), 'exists method getSessionUser' ); - $r = new ReflectionMethod('Sessions', 'getSessionUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSessionId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Sessions::verifySession - * @todo Implement testverifySession(). - */ - public function testverifySession() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifySession', $methods ), 'exists method verifySession' ); - $r = new ReflectionMethod('Sessions', 'verifySession'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSessionId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Sessions::registerGlobal - * @todo Implement testregisterGlobal(). - */ - public function testregisterGlobal() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerGlobal', $methods ), 'exists method registerGlobal' ); - $r = new ReflectionMethod('Sessions', 'registerGlobal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Sessions::getGlobal - * @todo Implement testgetGlobal(). - */ - public function testgetGlobal() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGlobal', $methods ), 'exists method getGlobal' ); - $r = new ReflectionMethod('Sessions', 'getGlobal'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Sessions::getGlobals - * @todo Implement testgetGlobals(). - */ - public function testgetGlobals() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGlobals', $methods ), 'exists method getGlobals' ); - $r = new ReflectionMethod('Sessions', 'getGlobals'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classStatTest.php b/tests/automated/workflow/engine/classes/classStatTest.php deleted file mode 100644 index 3fe4707c9..000000000 --- a/tests/automated/workflow/engine/classes/classStatTest.php +++ /dev/null @@ -1,61 +0,0 @@ -object = new Stat(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Stat'); $this->assertTrue( count($methods) == 1); - } - - /** - * @covers Stat::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('Stat', '__construct'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classTasksTest.php b/tests/automated/workflow/engine/classes/classTasksTest.php deleted file mode 100644 index 9336ebd90..000000000 --- a/tests/automated/workflow/engine/classes/classTasksTest.php +++ /dev/null @@ -1,516 +0,0 @@ -object = new Tasks(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('Tasks'); $this->assertTrue( count($methods) == 26); - } - - /** - * @covers Tasks::getGroupsOfTask - * @todo Implement testgetGroupsOfTask(). - */ - public function testgetGroupsOfTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getGroupsOfTask', $methods ), 'exists method getGroupsOfTask' ); - $r = new ReflectionMethod('Tasks', 'getGroupsOfTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Tasks::getAllTasks - * @todo Implement testgetAllTasks(). - */ - public function testgetAllTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllTasks', $methods ), 'exists method getAllTasks' ); - $r = new ReflectionMethod('Tasks', 'getAllTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::createTaskRows - * @todo Implement testcreateTaskRows(). - */ - public function testcreateTaskRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createTaskRows', $methods ), 'exists method createTaskRows' ); - $r = new ReflectionMethod('Tasks', 'createTaskRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::updateTaskRows - * @todo Implement testupdateTaskRows(). - */ - public function testupdateTaskRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateTaskRows', $methods ), 'exists method updateTaskRows' ); - $r = new ReflectionMethod('Tasks', 'updateTaskRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aTask'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::getAllRoutes - * @todo Implement testgetAllRoutes(). - */ - public function testgetAllRoutes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllRoutes', $methods ), 'exists method getAllRoutes' ); - $r = new ReflectionMethod('Tasks', 'getAllRoutes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::createRouteRows - * @todo Implement testcreateRouteRows(). - */ - public function testcreateRouteRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createRouteRows', $methods ), 'exists method createRouteRows' ); - $r = new ReflectionMethod('Tasks', 'createRouteRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRoutes'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::updateRouteRows - * @todo Implement testupdateRouteRows(). - */ - public function testupdateRouteRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateRouteRows', $methods ), 'exists method updateRouteRows' ); - $r = new ReflectionMethod('Tasks', 'updateRouteRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aRoutes'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::getUsersOfTask - * @todo Implement testgetUsersOfTask(). - */ - public function testgetUsersOfTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getUsersOfTask', $methods ), 'exists method getUsersOfTask' ); - $r = new ReflectionMethod('Tasks', 'getUsersOfTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Tasks::deleteTask - * @todo Implement testdeleteTask(). - */ - public function testdeleteTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteTask', $methods ), 'exists method deleteTask' ); - $r = new ReflectionMethod('Tasks', 'deleteTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::deleteAllRoutesOfTask - * @todo Implement testdeleteAllRoutesOfTask(). - */ - public function testdeleteAllRoutesOfTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteAllRoutesOfTask', $methods ), 'exists method deleteAllRoutesOfTask' ); - $r = new ReflectionMethod('Tasks', 'deleteAllRoutesOfTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'bAll'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::getAllGateways - * @todo Implement testgetAllGateways(). - */ - public function testgetAllGateways() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllGateways', $methods ), 'exists method getAllGateways' ); - $r = new ReflectionMethod('Tasks', 'getAllGateways'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::createGatewayRows - * @todo Implement testcreateGatewayRows(). - */ - public function testcreateGatewayRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createGatewayRows', $methods ), 'exists method createGatewayRows' ); - $r = new ReflectionMethod('Tasks', 'createGatewayRows'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aGateway'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::deleteAllGatewayOfTask - * @todo Implement testdeleteAllGatewayOfTask(). - */ - public function testdeleteAllGatewayOfTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteAllGatewayOfTask', $methods ), 'exists method deleteAllGatewayOfTask' ); - $r = new ReflectionMethod('Tasks', 'deleteAllGatewayOfTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'bAll'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::assignUser - * @todo Implement testassignUser(). - */ - public function testassignUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignUser', $methods ), 'exists method assignUser' ); - $r = new ReflectionMethod('Tasks', 'assignUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sUserUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::assignGroup - * @todo Implement testassignGroup(). - */ - public function testassignGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignGroup', $methods ), 'exists method assignGroup' ); - $r = new ReflectionMethod('Tasks', 'assignGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sGroupUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::ofToAssignUserOfAllTasks - * @todo Implement testofToAssignUserOfAllTasks(). - */ - public function testofToAssignUserOfAllTasks() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ofToAssignUserOfAllTasks', $methods ), 'exists method ofToAssignUserOfAllTasks' ); - $r = new ReflectionMethod('Tasks', 'ofToAssignUserOfAllTasks'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers Tasks::ofToAssignUser - * @todo Implement testofToAssignUser(). - */ - public function testofToAssignUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ofToAssignUser', $methods ), 'exists method ofToAssignUser' ); - $r = new ReflectionMethod('Tasks', 'ofToAssignUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sUserUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers Tasks::ofToAssignGroup - * @todo Implement testofToAssignGroup(). - */ - public function testofToAssignGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ofToAssignGroup', $methods ), 'exists method ofToAssignGroup' ); - $r = new ReflectionMethod('Tasks', 'ofToAssignGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sGroupUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers Tasks::getStepsOfTask - * @todo Implement testgetStepsOfTask(). - */ - public function testgetStepsOfTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepsOfTask', $methods ), 'exists method getStepsOfTask' ); - $r = new ReflectionMethod('Tasks', 'getStepsOfTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::existsBuildingElements - * @todo Implement testexistsBuildingElements(). - */ - public function testexistsBuildingElements() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('existsBuildingElements', $methods ), 'exists method existsBuildingElements' ); - $r = new ReflectionMethod('Tasks', 'existsBuildingElements'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::getStartingTaskForUser - * @todo Implement testgetStartingTaskForUser(). - */ - public function testgetStartingTaskForUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStartingTaskForUser', $methods ), 'exists method getStartingTaskForUser' ); - $r = new ReflectionMethod('Tasks', 'getStartingTaskForUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUsrUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Tasks::assignUsertoTask - * @todo Implement testassignUsertoTask(). - */ - public function testassignUsertoTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignUsertoTask', $methods ), 'exists method assignUsertoTask' ); - $r = new ReflectionMethod('Tasks', 'assignUsertoTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::verifyUsertoTask - * @todo Implement testverifyUsertoTask(). - */ - public function testverifyUsertoTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('verifyUsertoTask', $methods ), 'exists method verifyUsertoTask' ); - $r = new ReflectionMethod('Tasks', 'verifyUsertoTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUsrUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Tasks::getTasksThatUserIsAssigned - * @todo Implement testgetTasksThatUserIsAssigned(). - */ - public function testgetTasksThatUserIsAssigned() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTasksThatUserIsAssigned', $methods ), 'exists method getTasksThatUserIsAssigned' ); - $r = new ReflectionMethod('Tasks', 'getTasksThatUserIsAssigned'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sUserUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers Tasks::getRoute - * @todo Implement testgetRoute(). - */ - public function testgetRoute() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRoute', $methods ), 'exists method getRoute' ); - $r = new ReflectionMethod('Tasks', 'getRoute'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTaskUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers Tasks::getRouteByType - * @todo Implement testgetRouteByType(). - */ - public function testgetRouteByType() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRouteByType', $methods ), 'exists method getRouteByType' ); - $r = new ReflectionMethod('Tasks', 'getRouteByType'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sRouteNextTaskUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sRouteType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classToolBarTest.php b/tests/automated/workflow/engine/classes/classToolBarTest.php deleted file mode 100644 index e925c4104..000000000 --- a/tests/automated/workflow/engine/classes/classToolBarTest.php +++ /dev/null @@ -1,50 +0,0 @@ -object = new ToolBar("users/users_New.xml"); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('ToolBar'); - $this->assertTrue(count($methods) == 13); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXMLConnectionTest.php b/tests/automated/workflow/engine/classes/classXMLConnectionTest.php deleted file mode 100644 index 4e58f5a99..000000000 --- a/tests/automated/workflow/engine/classes/classXMLConnectionTest.php +++ /dev/null @@ -1,225 +0,0 @@ -object = new XMLConnection($file); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XMLConnection'); - $this->assertTrue( count($methods) == 11); - } - - /** - * @covers XMLConnection::XMLConnection - * @todo Implement testXMLConnection(). - */ - public function testXMLConnection() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XMLConnection', $methods ), 'exists method XMLConnection' ); - $r = new ReflectionMethod('XMLConnection', 'XMLConnection'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::query - * @todo Implement testquery(). - */ - public function testquery() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('query', $methods ), 'exists method query' ); - $r = new ReflectionMethod('XMLConnection', 'query'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sql'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::sqlLike - * @todo Implement testsqlLike(). - */ - public function testsqlLike() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sqlLike', $methods ), 'exists method sqlLike' ); - $r = new ReflectionMethod('XMLConnection', 'sqlLike'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'a'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'b'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XMLConnection::expandFields - * @todo Implement testexpandFields(). - */ - public function testexpandFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('expandFields', $methods ), 'exists method expandFields' ); - $r = new ReflectionMethod('XMLConnection', 'expandFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'resRow'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fieldsList'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XMLConnection::fetchNode - * @todo Implement testfetchNode(). - */ - public function testfetchNode() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fetchNode', $methods ), 'exists method fetchNode' ); - $r = new ReflectionMethod('XMLConnection', 'fetchNode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::fetchChildren - * @todo Implement testfetchChildren(). - */ - public function testfetchChildren() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fetchChildren', $methods ), 'exists method fetchChildren' ); - $r = new ReflectionMethod('XMLConnection', 'fetchChildren'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::disconnect - * @todo Implement testdisconnect(). - */ - public function testdisconnect() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('disconnect', $methods ), 'exists method disconnect' ); - $r = new ReflectionMethod('XMLConnection', 'disconnect'); - $params = $r->getParameters(); - } - - /** - * @covers XMLConnection::sqlWhereLike - * @todo Implement testsqlWhereLike(). - */ - public function testsqlWhereLike() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sqlWhereLike', $methods ), 'exists method sqlWhereLike' ); - $r = new ReflectionMethod('XMLConnection', 'sqlWhereLike'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'match'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::sqlString - * @todo Implement testsqlString(). - */ - public function testsqlString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sqlString', $methods ), 'exists method sqlString' ); - $r = new ReflectionMethod('XMLConnection', 'sqlString'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'match'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers XMLConnection::insertRow - * @todo Implement testinsertRow(). - */ - public function testinsertRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('insertRow', $methods ), 'exists method insertRow' ); - $r = new ReflectionMethod('XMLConnection', 'insertRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'values'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XMLConnection::updateRow - * @todo Implement testupdateRow(). - */ - public function testupdateRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateRow', $methods ), 'exists method updateRow' ); - $r = new ReflectionMethod('XMLConnection', 'updateRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'node'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'values'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classXMLDBTest.php b/tests/automated/workflow/engine/classes/classXMLDBTest.php deleted file mode 100644 index ae43b9d85..000000000 --- a/tests/automated/workflow/engine/classes/classXMLDBTest.php +++ /dev/null @@ -1,84 +0,0 @@ -object = new XMLDB(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XMLDB'); - $this->assertTrue( count($methods) == 2); - } - - /** - * @covers XMLDB::connect - * @todo Implement testconnect(). - */ - public function testconnect() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('connect', $methods ), 'exists method connect' ); - $r = new ReflectionMethod('XMLDB', 'connect'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dsn'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'options'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == array()); - } - - /** - * @covers XMLDB::isError - * @todo Implement testisError(). - */ - public function testisError() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('isError', $methods ), 'exists method isError' ); - $r = new ReflectionMethod('XMLDB', 'isError'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'result'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXMLResultTest.php b/tests/automated/workflow/engine/classes/classXMLResultTest.php deleted file mode 100644 index be92c9316..000000000 --- a/tests/automated/workflow/engine/classes/classXMLResultTest.php +++ /dev/null @@ -1,94 +0,0 @@ -object = new XMLResult(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $class = new ReflectionClass('XMLResult'); - $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC); - $this->assertTrue( count($methods) == 3); - } - - /** - * @covers XMLResult::XMLResult - * @todo Implement testXMLResult(). - */ - public function testXMLResult() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XMLResult', $methods ), 'exists method XMLResult' ); - $r = new ReflectionMethod('XMLResult', 'XMLResult'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'result'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == Array()); - } - - /** - * @covers XMLResult::numRows - * @todo Implement testnumRows(). - */ - public function testnumRows() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('numRows', $methods ), 'exists method numRows' ); - $r = new ReflectionMethod('XMLResult', 'numRows'); - $params = $r->getParameters(); - } - - /** - * @covers XMLResult::fetchRow - * @todo Implement testfetchRow(). - */ - public function testfetchRow() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('fetchRow', $methods ), 'exists method fetchRow' ); - $r = new ReflectionMethod('XMLResult', 'fetchRow'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'const'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_CheckBoxTableTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_CheckBoxTableTest.php deleted file mode 100644 index 45f89d36f..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_CheckBoxTableTest.php +++ /dev/null @@ -1,74 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_CheckBoxTable($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods.. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_CheckBoxTable'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_CheckBoxTable::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('render', $methods), 'exists method render'); - $r = new ReflectionMethod('XmlForm_Field_CheckBoxTable', 'render'); - $params = $r->getParameters(); - - $this->assertTrue($params[0]->getName() == 'value'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == true); - $this->assertTrue($params[0]->getDefaultValue() == ''); - $this->assertTrue($params[1]->getName() == 'owner'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional () == true); - $this->assertTrue($params[1]->getDefaultValue() == ''); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php deleted file mode 100644 index 690e2baff..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php +++ /dev/null @@ -1,106 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_TextPM($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_TextPM'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_TextPM::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_TextPM', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_TextPM::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_TextPM', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_TextPM::attachEvents - * @todo Implement testattachEvents(). - */ - public function testattachEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' ); - $r = new ReflectionMethod('XmlForm_Field_TextPM', 'attachEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'element'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php deleted file mode 100644 index 5e6a8bf4a..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php +++ /dev/null @@ -1,90 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_TextareaPM($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_TextareaPM'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_TextareaPM::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_TextareaPM', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_TextareaPM::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_TextareaPM', 'renderGrid'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'owner'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == false); - $this->assertTrue($params[1]->getName() == 'values'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional () == true); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_ToolBarTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_ToolBarTest.php deleted file mode 100644 index e693a5f10..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_ToolBarTest.php +++ /dev/null @@ -1,93 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_ToolBar($xmlNode, "en", null, null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_ToolBar'); - $this->assertTrue(count($methods) == 26); - } - - /** - * @covers XmlForm_Field_ToolBar::XmlForm_Field_ToolBar - * @todo Implement testXmlForm_Field_ToolBar(). - */ - public function testXmlForm_Field_ToolBar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('XmlForm_Field_ToolBar', $methods), 'exists method XmlForm_Field_ToolBar' ); - $r = new ReflectionMethod('XmlForm_Field_ToolBar', 'XmlForm_Field_ToolBar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'xmlNode'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'lang'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'home'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'owner'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_ToolBar::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_ToolBar', 'render'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'value'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_hoursTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_hoursTest.php deleted file mode 100644 index f6171ba2e..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_hoursTest.php +++ /dev/null @@ -1,106 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_hours($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_hours'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_hours::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_hours', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'value'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers XmlForm_Field_hours::renderGrid - * @todo Implement testrenderGrid(). - */ - public function testrenderGrid() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); - $r = new ReflectionMethod('XmlForm_Field_hours', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers XmlForm_Field_hours::attachEvents - * @todo Implement testattachEvents(). - */ - public function testattachEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' ); - $r = new ReflectionMethod('XmlForm_Field_hours', 'attachEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'element'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_popupOptionTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_popupOptionTest.php deleted file mode 100644 index 8e8911eca..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_popupOptionTest.php +++ /dev/null @@ -1,65 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_popupOption($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_popupOption'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_popupOption::getEvents - * @todo Implement testgetEvents(). - */ - public function testgetEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getEvents', $methods ), 'exists method getEvents' ); - $r = new ReflectionMethod('XmlForm_Field_popupOption', 'getEvents'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_toolButtonTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_toolButtonTest.php deleted file mode 100644 index 543846dbd..000000000 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_toolButtonTest.php +++ /dev/null @@ -1,69 +0,0 @@ - "input"); - $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); - - $this->object = new XmlForm_Field_toolButton($xmlNode); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('XmlForm_Field_toolButton'); - $this->assertTrue(count($methods) == 25); - } - - /** - * @covers XmlForm_Field_toolButton::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('XmlForm_Field_toolButton', 'render'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'value'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classarchiveTest.php b/tests/automated/workflow/engine/classes/classarchiveTest.php deleted file mode 100644 index 0d6d5a8f2..000000000 --- a/tests/automated/workflow/engine/classes/classarchiveTest.php +++ /dev/null @@ -1,224 +0,0 @@ -object = new archive('name'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('archive'); - $this->assertTrue( count($methods) == 12); - } - - /** - * @covers archive::archive - * @todo Implement testarchive(). - */ - public function testarchive() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('archive', $methods ), 'exists method archive' ); - $r = new ReflectionMethod('archive', 'archive'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::set_options - * @todo Implement testset_options(). - */ - public function testset_options() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('set_options', $methods ), 'exists method set_options' ); - $r = new ReflectionMethod('archive', 'set_options'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'options'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::create_archive - * @todo Implement testcreate_archive(). - */ - public function testcreate_archive() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('create_archive', $methods ), 'exists method create_archive' ); - $r = new ReflectionMethod('archive', 'create_archive'); - $params = $r->getParameters(); - } - - /** - * @covers archive::add_data - * @todo Implement testadd_data(). - */ - public function testadd_data() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add_data', $methods ), 'exists method add_data' ); - $r = new ReflectionMethod('archive', 'add_data'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::make_list - * @todo Implement testmake_list(). - */ - public function testmake_list() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('make_list', $methods ), 'exists method make_list' ); - $r = new ReflectionMethod('archive', 'make_list'); - $params = $r->getParameters(); - } - - /** - * @covers archive::add_files - * @todo Implement testadd_files(). - */ - public function testadd_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('add_files', $methods ), 'exists method add_files' ); - $r = new ReflectionMethod('archive', 'add_files'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'list'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::exclude_files - * @todo Implement testexclude_files(). - */ - public function testexclude_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('exclude_files', $methods ), 'exists method exclude_files' ); - $r = new ReflectionMethod('archive', 'exclude_files'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'list'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::store_files - * @todo Implement teststore_files(). - */ - public function teststore_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('store_files', $methods ), 'exists method store_files' ); - $r = new ReflectionMethod('archive', 'store_files'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'list'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::list_files - * @todo Implement testlist_files(). - */ - public function testlist_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('list_files', $methods ), 'exists method list_files' ); - $r = new ReflectionMethod('archive', 'list_files'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'list'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::parse_dir - * @todo Implement testparse_dir(). - */ - public function testparse_dir() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('parse_dir', $methods ), 'exists method parse_dir' ); - $r = new ReflectionMethod('archive', 'parse_dir'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dirname'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers archive::sort_files - * @todo Implement testsort_files(). - */ - public function testsort_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sort_files', $methods ), 'exists method sort_files' ); - $r = new ReflectionMethod('archive', 'sort_files'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'a'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'b'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers archive::download_file - * @todo Implement testdownload_file(). - */ - public function testdownload_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('download_file', $methods ), 'exists method download_file' ); - $r = new ReflectionMethod('archive', 'download_file'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classbzip_fileTest.php b/tests/automated/workflow/engine/classes/classbzip_fileTest.php deleted file mode 100644 index d7be59b00..000000000 --- a/tests/automated/workflow/engine/classes/classbzip_fileTest.php +++ /dev/null @@ -1,89 +0,0 @@ -object = new bzip_file('bzipfile.bzip'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('bzip_file'); - $this->assertTrue(count($methods) == 18); - } - - /** - * @covers bzip_file::bzip_file - * @todo Implement testbzip_file(). - */ - public function testbzip_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('bzip_file', $methods), 'exists method bzip_file'); - $r = new ReflectionMethod('bzip_file', 'bzip_file'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'name'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == false); - } - - /** - * @covers bzip_file::create_bzip - * @todo Implement testcreate_bzip(). - */ - public function testcreate_bzip() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('create_bzip', $methods), 'exists method create_bzip'); - $r = new ReflectionMethod('bzip_file', 'create_bzip'); - $params = $r->getParameters(); - } - - /** - * @covers bzip_file::open_archive - * @todo Implement testopen_archive(). - */ - public function testopen_archive() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('open_archive', $methods), 'exists method open_archive'); - $r = new ReflectionMethod('bzip_file', 'open_archive'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classcalendarTest.php b/tests/automated/workflow/engine/classes/classcalendarTest.php deleted file mode 100644 index f44ec0935..000000000 --- a/tests/automated/workflow/engine/classes/classcalendarTest.php +++ /dev/null @@ -1,135 +0,0 @@ -object = new calendar($userUid, $proUid, $tasUid); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('calendar'); - $this->assertTrue( count($methods) == 56); - } - - /** - * @covers calendar::calendar - * @todo Implement testcalendar(). - */ - public function testcalendar() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('calendar'); - $this->assertTrue( in_array('calendar', $methods ), 'exists method calendar' ); - $r = new ReflectionMethod('calendar', 'calendar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'proUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'tasUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers calendar::addCalendarLog - * @todo Implement testaddCalendarLog(). - */ - public function testaddCalendarLog() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('calendar'); - $this->assertTrue( in_array('addCalendarLog', $methods ), 'exists method addCalendarLog' ); - $r = new ReflectionMethod('calendar', 'addCalendarLog'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'msg'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers calendar::setupCalendar - * @todo Implement testsetupCalendar(). - */ - public function testsetupCalendar() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('calendar'); - $this->assertTrue( in_array('setupCalendar', $methods ), 'exists method setupCalendar' ); - $r = new ReflectionMethod('calendar', 'setupCalendar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'proUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'tasUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers calendar::getNextValidBusinessHoursRange - * @todo Implement testgetNextValidBusinessHoursRange(). - */ - public function testgetNextValidBusinessHoursRange() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('calendar'); - $this->assertTrue( in_array('getNextValidBusinessHoursRange', $methods ), 'exists method getNextValidBusinessHoursRange' ); - $r = new ReflectionMethod('calendar', 'getNextValidBusinessHoursRange'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'date'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'time'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classcaseSchedulerPluginTest.php b/tests/automated/workflow/engine/classes/classcaseSchedulerPluginTest.php deleted file mode 100644 index 5c59d7ede..000000000 --- a/tests/automated/workflow/engine/classes/classcaseSchedulerPluginTest.php +++ /dev/null @@ -1,83 +0,0 @@ -object = new caseSchedulerPlugin('sNamespace', 'sActionId', 'sActionForm', - 'sActionSave', 'sActionExecute', 'sActionGetFields'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('caseSchedulerPlugin'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers caseSchedulerPlugin::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('caseSchedulerPlugin', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sActionId'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sActionForm'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sActionSave'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == false); - $this->assertTrue($params[4]->getName() == 'sActionExecute'); - $this->assertTrue($params[4]->isArray() == false); - $this->assertTrue($params[4]->isOptional() == false); - $this->assertTrue($params[5]->getName() == 'sActionGetFields'); - $this->assertTrue($params[5]->isArray() == false); - $this->assertTrue($params[5]->isOptional() == false); - } -} - \ No newline at end of file diff --git a/tests/automated/workflow/engine/classes/classcssFileTest.php b/tests/automated/workflow/engine/classes/classcssFileTest.php deleted file mode 100644 index e45a73533..000000000 --- a/tests/automated/workflow/engine/classes/classcssFileTest.php +++ /dev/null @@ -1,68 +0,0 @@ -object = new cssFile('sNamespace', 'sCssFile'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('cssFile'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers cssFile::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('cssFile', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sCssFile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classdashboardPageTest.php b/tests/automated/workflow/engine/classes/classdashboardPageTest.php deleted file mode 100644 index 605a1eabc..000000000 --- a/tests/automated/workflow/engine/classes/classdashboardPageTest.php +++ /dev/null @@ -1,76 +0,0 @@ -object = new dashboardPage('sNamespace', 'sPage', 'sName', 'sIcon'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dashboardPage'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers dashboardPage::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('dashboardPage', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sPage'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sName'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sIcon'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classdashletOpenVSCompletedTest.php b/tests/automated/workflow/engine/classes/classdashletOpenVSCompletedTest.php deleted file mode 100644 index fa9cecb76..000000000 --- a/tests/automated/workflow/engine/classes/classdashletOpenVSCompletedTest.php +++ /dev/null @@ -1,110 +0,0 @@ -object = new dashletOpenVSCompleted(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dashletOpenVSCompleted'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers dashletOpenVSCompleted::getAdditionalFields - * @todo Implement testgetAdditionalFields(). - */ - public function testgetAdditionalFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' ); - $r = new ReflectionMethod('dashletOpenVSCompleted', 'getAdditionalFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletOpenVSCompleted::getXTemplate - * @todo Implement testgetXTemplate(). - */ - public function testgetXTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' ); - $r = new ReflectionMethod('dashletOpenVSCompleted', 'getXTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletOpenVSCompleted::setup - * @todo Implement testsetup(). - */ - public function testsetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setup', $methods ), 'exists method setup' ); - $r = new ReflectionMethod('dashletOpenVSCompleted', 'setup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'config'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletOpenVSCompleted::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('dashletOpenVSCompleted', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'width'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '300'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdashletProcessMakerCommunityTest.php b/tests/automated/workflow/engine/classes/classdashletProcessMakerCommunityTest.php deleted file mode 100644 index be2aec823..000000000 --- a/tests/automated/workflow/engine/classes/classdashletProcessMakerCommunityTest.php +++ /dev/null @@ -1,110 +0,0 @@ -object = new dashletProcessMakerCommunity(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dashletProcessMakerCommunity'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers dashletProcessMakerCommunity::getAdditionalFields - * @todo Implement testgetAdditionalFields(). - */ - public function testgetAdditionalFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' ); - $r = new ReflectionMethod('dashletProcessMakerCommunity', 'getAdditionalFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerCommunity::getXTemplate - * @todo Implement testgetXTemplate(). - */ - public function testgetXTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' ); - $r = new ReflectionMethod('dashletProcessMakerCommunity', 'getXTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerCommunity::setup - * @todo Implement testsetup(). - */ - public function testsetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setup', $methods ), 'exists method setup' ); - $r = new ReflectionMethod('dashletProcessMakerCommunity', 'setup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'config'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerCommunity::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('dashletProcessMakerCommunity', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'width'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '300'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdashletProcessMakerEnterpriseTest.php b/tests/automated/workflow/engine/classes/classdashletProcessMakerEnterpriseTest.php deleted file mode 100644 index 6d55a1503..000000000 --- a/tests/automated/workflow/engine/classes/classdashletProcessMakerEnterpriseTest.php +++ /dev/null @@ -1,110 +0,0 @@ -object = new dashletProcessMakerEnterprise(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dashletProcessMakerEnterprise'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers dashletProcessMakerEnterprise::getAdditionalFields - * @todo Implement testgetAdditionalFields(). - */ - public function testgetAdditionalFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' ); - $r = new ReflectionMethod('dashletProcessMakerEnterprise', 'getAdditionalFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerEnterprise::getXTemplate - * @todo Implement testgetXTemplate(). - */ - public function testgetXTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' ); - $r = new ReflectionMethod('dashletProcessMakerEnterprise', 'getXTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerEnterprise::setup - * @todo Implement testsetup(). - */ - public function testsetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setup', $methods ), 'exists method setup' ); - $r = new ReflectionMethod('dashletProcessMakerEnterprise', 'setup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'config'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletProcessMakerEnterprise::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('dashletProcessMakerEnterprise', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'width'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '300'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdashletRssReaderTest.php b/tests/automated/workflow/engine/classes/classdashletRssReaderTest.php deleted file mode 100644 index 2e90c8239..000000000 --- a/tests/automated/workflow/engine/classes/classdashletRssReaderTest.php +++ /dev/null @@ -1,110 +0,0 @@ -object = new dashletRssReader(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dashletRssReader'); $this->assertTrue( count($methods) == 4); - } - - /** - * @covers dashletRssReader::getAdditionalFields - * @todo Implement testgetAdditionalFields(). - */ - public function testgetAdditionalFields() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' ); - $r = new ReflectionMethod('dashletRssReader', 'getAdditionalFields'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletRssReader::getXTemplate - * @todo Implement testgetXTemplate(). - */ - public function testgetXTemplate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' ); - $r = new ReflectionMethod('dashletRssReader', 'getXTemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'className'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletRssReader::setup - * @todo Implement testsetup(). - */ - public function testsetup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setup', $methods ), 'exists method setup' ); - $r = new ReflectionMethod('dashletRssReader', 'setup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'config'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dashletRssReader::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('dashletRssReader', 'render'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'width'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '300'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdatesTest.php b/tests/automated/workflow/engine/classes/classdatesTest.php deleted file mode 100644 index 5a18d59a3..000000000 --- a/tests/automated/workflow/engine/classes/classdatesTest.php +++ /dev/null @@ -1,269 +0,0 @@ -object = new dates(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dates'); $this->assertTrue( count($methods) == 10); - } - - /** - * @covers dates::calculateDate - * @todo Implement testcalculateDate(). - */ - public function testcalculateDate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateDate', $methods ), 'exists method calculateDate' ); - $r = new ReflectionMethod('dates', 'calculateDate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sInitDate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDuration'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTimeUnit'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'iTypeDay'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'UsrUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'ProUid'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'TasUid'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - } - - /** - * @covers dates::calculateDate_noCalendar - * @todo Implement testcalculateDate_noCalendar(). - */ - public function testcalculateDate_noCalendar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateDate_noCalendar', $methods ), 'exists method calculateDate_noCalendar' ); - $r = new ReflectionMethod('dates', 'calculateDate_noCalendar'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sInitDate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDuration'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTimeUnit'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'iTypeDay'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'UsrUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'ProUid'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'TasUid'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - } - - /** - * @covers dates::calculateDuration - * @todo Implement testcalculateDuration(). - */ - public function testcalculateDuration() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('calculateDuration', $methods ), 'exists method calculateDuration' ); - $r = new ReflectionMethod('dates', 'calculateDuration'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sInitDate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sEndDate'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'UsrUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'ProUid'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'TasUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers dates::prepareInformation - * @todo Implement testprepareInformation(). - */ - public function testprepareInformation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('prepareInformation', $methods ), 'exists method prepareInformation' ); - $r = new ReflectionMethod('dates', 'prepareInformation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'UsrUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'ProUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'TasUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers dates::setSkipEveryYear - * @todo Implement testsetSkipEveryYear(). - */ - public function testsetSkipEveryYear() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setSkipEveryYear', $methods ), 'exists method setSkipEveryYear' ); - $r = new ReflectionMethod('dates', 'setSkipEveryYear'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'bSkipEveryYear'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dates::addHoliday - * @todo Implement testaddHoliday(). - */ - public function testaddHoliday() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addHoliday', $methods ), 'exists method addHoliday' ); - $r = new ReflectionMethod('dates', 'addHoliday'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sDate'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dates::setHolidays - * @todo Implement testsetHolidays(). - */ - public function testsetHolidays() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setHolidays', $methods ), 'exists method setHolidays' ); - $r = new ReflectionMethod('dates', 'setHolidays'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aDates'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dates::setWeekends - * @todo Implement testsetWeekends(). - */ - public function testsetWeekends() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('setWeekends', $methods ), 'exists method setWeekends' ); - $r = new ReflectionMethod('dates', 'setWeekends'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aWeekends'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dates::skipDayOfWeek - * @todo Implement testskipDayOfWeek(). - */ - public function testskipDayOfWeek() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('skipDayOfWeek', $methods ), 'exists method skipDayOfWeek' ); - $r = new ReflectionMethod('dates', 'skipDayOfWeek'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'iDayNumber'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dates::addNonWorkingRange - * @todo Implement testaddNonWorkingRange(). - */ - public function testaddNonWorkingRange() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addNonWorkingRange', $methods ), 'exists method addNonWorkingRange' ); - $r = new ReflectionMethod('dates', 'addNonWorkingRange'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sDateA'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sDateB'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdynaformEditorAjaxTest.php b/tests/automated/workflow/engine/classes/classdynaformEditorAjaxTest.php deleted file mode 100644 index e3bf2ea02..000000000 --- a/tests/automated/workflow/engine/classes/classdynaformEditorAjaxTest.php +++ /dev/null @@ -1,381 +0,0 @@ -object = new dynaformEditorAjax($post); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( count($methods) == 28); - } - - /** - * @covers dynaformEditorAjax::dynaformEditorAjax - * @todo Implement testdynaformEditorAjax(). - */ - public function testdynaformEditorAjax() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('dynaformEditorAjax', $methods ), 'exists method dynaformEditorAjax' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'dynaformEditorAjax'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'post'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::_run - * @todo Implement test_run(). - */ - public function test_run() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('_run', $methods ), 'exists method _run' ); - $r = new ReflectionMethod('dynaformEditorAjax', '_run'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'post'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::render_preview - * @todo Implement testrender_preview(). - */ - public function testrender_preview() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('render_preview', $methods ), 'exists method render_preview' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'render_preview'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::render_htmledit - * @todo Implement testrender_htmledit(). - */ - public function testrender_htmledit() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('render_htmledit', $methods ), 'exists method render_htmledit' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'render_htmledit'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::get_htmlcode - * @todo Implement testget_htmlcode(). - */ - public function testget_htmlcode() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('get_htmlcode', $methods ), 'exists method get_htmlcode' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'get_htmlcode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::restore_html - * @todo Implement testrestore_html(). - */ - public function testrestore_html() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('restore_html', $methods ), 'exists method restore_html' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'restore_html'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::set_htmlcode - * @todo Implement testset_htmlcode(). - */ - public function testset_htmlcode() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('set_htmlcode', $methods ), 'exists method set_htmlcode' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'set_htmlcode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'htmlcode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::get_xmlcode - * @todo Implement testget_xmlcode(). - */ - public function testget_xmlcode() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('get_xmlcode', $methods ), 'exists method get_xmlcode' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'get_xmlcode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::set_xmlcode - * @todo Implement testset_xmlcode(). - */ - public function testset_xmlcode() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('set_xmlcode', $methods ), 'exists method set_xmlcode' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'set_xmlcode'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'xmlcode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::get_javascripts - * @todo Implement testget_javascripts(). - */ - public function testget_javascripts() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('get_javascripts', $methods ), 'exists method get_javascripts' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'get_javascripts'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fieldName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::set_javascript - * @todo Implement testset_javascript(). - */ - public function testset_javascript() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('set_javascript', $methods ), 'exists method set_javascript' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'set_javascript'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'fieldName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sCode'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'meta'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers dynaformEditorAjax::get_properties - * @todo Implement testget_properties(). - */ - public function testget_properties() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('get_properties', $methods ), 'exists method get_properties' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'get_properties'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'DYN_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::set_properties - * @todo Implement testset_properties(). - */ - public function testset_properties() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('set_properties', $methods ), 'exists method set_properties' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'set_properties'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'DYN_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'getFields'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::get_enabletemplate - * @todo Implement testget_enabletemplate(). - */ - public function testget_enabletemplate() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('get_enabletemplate', $methods ), 'exists method get_enabletemplate' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'get_enabletemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::set_enabletemplate - * @todo Implement testset_enabletemplate(). - */ - public function testset_enabletemplate() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('set_enabletemplate', $methods ), 'exists method set_enabletemplate' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'set_enabletemplate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'value'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::save - * @todo Implement testsave(). - */ - public function testsave() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('save', $methods ), 'exists method save' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'save'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'DYN_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::close - * @todo Implement testclose(). - */ - public function testclose() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('close', $methods ), 'exists method close' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'close'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers dynaformEditorAjax::is_modified - * @todo Implement testis_modified(). - * @ run InSeparateProcess - */ - public function testis_modified() - { - //$methods = get_class_methods($this->object); - $methods = get_class_methods('dynaformEditorAjax'); - $this->assertTrue( in_array('is_modified', $methods ), 'exists method is_modified' ); - $r = new ReflectionMethod('dynaformEditorAjax', 'is_modified'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'A'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'DYN_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classdynaformEditorTest.php b/tests/automated/workflow/engine/classes/classdynaformEditorTest.php deleted file mode 100644 index 75f6788f8..000000000 --- a/tests/automated/workflow/engine/classes/classdynaformEditorTest.php +++ /dev/null @@ -1,169 +0,0 @@ -object = new dynaformEditor('getvalue'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('dynaformEditor'); - $this->assertTrue(count($methods) == 10); - } - - /** - * @covers dynaformEditor::dynaformEditor - * @todo Implement testdynaformEditor(). - */ - public function testdynaformEditor() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('dynaformEditor', $methods), 'exists method dynaformEditor'); - $r = new ReflectionMethod('dynaformEditor', 'dynaformEditor'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'get'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers dynaformEditor::_createDefaultXmlForm - * @todo Implement test_createDefaultXmlForm(). - */ - public function test_createDefaultXmlForm() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_createDefaultXmlForm', $methods), 'exists method _createDefaultXmlForm'); - $r = new ReflectionMethod('dynaformEditor', '_createDefaultXmlForm'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'fileName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers dynaformEditor::_render - * @todo Implement test_render(). - */ - public function test_render() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_render', $methods), 'exists method _render'); - $r = new ReflectionMethod('dynaformEditor', '_render'); - $params = $r->getParameters(); - } - - /** - * @covers dynaformEditor::_getFilename - * @todo Implement test_getFilename(). - */ - public function test_getFilename() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_getFilename', $methods), 'exists method _getFilename'); - $r = new ReflectionMethod('dynaformEditor', '_getFilename'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'file'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers dynaformEditor::_setUseTemporalCopy - * @todo Implement test_setUseTemporalCopy(). - */ - public function test_setUseTemporalCopy() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_setUseTemporalCopy', $methods), 'exists method _setUseTemporalCopy'); - $r = new ReflectionMethod('dynaformEditor', '_setUseTemporalCopy'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'onOff'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers dynaformEditor::_setTmpData - * @todo Implement test_setTmpData(). - */ - public function test_setTmpData() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_setTmpData', $methods), 'exists method _setTmpData'); - $r = new ReflectionMethod('dynaformEditor', '_setTmpData'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'data'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers dynaformEditor::_getTmpData - * @todo Implement test_getTmpData(). - */ - public function test_getTmpData() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_getTmpData', $methods), 'exists method _getTmpData'); - $r = new ReflectionMethod('dynaformEditor', '_getTmpData'); - $params = $r->getParameters(); - } - - /** - * @covers dynaformEditor::_copyFile - * @todo Implement test_copyFile(). - */ - public function test_copyFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('_copyFile', $methods), 'exists method _copyFile'); - $r = new ReflectionMethod('dynaformEditor', '_copyFile'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'from'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'to'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classfolderDataTest.php b/tests/automated/workflow/engine/classes/classfolderDataTest.php deleted file mode 100644 index 7f55fb036..000000000 --- a/tests/automated/workflow/engine/classes/classfolderDataTest.php +++ /dev/null @@ -1,86 +0,0 @@ -object = new folderData('$sProcessUid', '$sProcessTitle', '$sApplicationUid', - '$sApplicationTitle', '$sUserUid', '$sUserLogin', '$sUserFullName'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('folderData'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers folderData::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('folderData', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessTitle'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sApplicationUid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sApplicationTitle'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sUserUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'sUserLogin'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - $this->assertTrue( $params[6]->getName() == 'sUserFullName'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - } -} - diff --git a/tests/automated/workflow/engine/classes/classfolderDetailTest.php b/tests/automated/workflow/engine/classes/classfolderDetailTest.php deleted file mode 100644 index 0ad4226ed..000000000 --- a/tests/automated/workflow/engine/classes/classfolderDetailTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new folderDetail(null, null, null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('folderDetail'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers folderDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('folderDetail', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sFolderId'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sFolderName'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classgzip_fileTest.php b/tests/automated/workflow/engine/classes/classgzip_fileTest.php deleted file mode 100644 index 9b39833f9..000000000 --- a/tests/automated/workflow/engine/classes/classgzip_fileTest.php +++ /dev/null @@ -1,89 +0,0 @@ -object = new gzip_file('name'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('gzip_file'); - $this->assertTrue( count($methods) == 18); - } - - /** - * @covers gzip_file::gzip_file - * @todo Implement testgzip_file(). - */ - public function testgzip_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('gzip_file', $methods ), 'exists method gzip_file' ); - $r = new ReflectionMethod('gzip_file', 'gzip_file'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers gzip_file::create_gzip - * @todo Implement testcreate_gzip(). - */ - public function testcreate_gzip() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('create_gzip', $methods ), 'exists method create_gzip' ); - $r = new ReflectionMethod('gzip_file', 'create_gzip'); - $params = $r->getParameters(); - } - - /** - * @covers gzip_file::open_archive - * @todo Implement testopen_archive(). - */ - public function testopen_archive() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' ); - $r = new ReflectionMethod('gzip_file', 'open_archive'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classloginInfoTest.php b/tests/automated/workflow/engine/classes/classloginInfoTest.php deleted file mode 100644 index 019c2916c..000000000 --- a/tests/automated/workflow/engine/classes/classloginInfoTest.php +++ /dev/null @@ -1,72 +0,0 @@ -object = new loginInfo(null, null, null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('loginInfo'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers loginInfo::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('loginInfo', '__construct'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'lName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == false); - $this->assertTrue($params[1]->getName() == 'lPassword'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional () == false); - $this->assertTrue($params[2]->getName() == 'lSession'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classmenuDetailTest.php b/tests/automated/workflow/engine/classes/classmenuDetailTest.php deleted file mode 100644 index 3667bf250..000000000 --- a/tests/automated/workflow/engine/classes/classmenuDetailTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new menuDetail('nameSpace', 'menuId', 'fileName'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('menuDetail'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers menuDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('menuDetail', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMenuId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sFilename'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classpluginDetailTest.php b/tests/automated/workflow/engine/classes/classpluginDetailTest.php deleted file mode 100644 index 769a37908..000000000 --- a/tests/automated/workflow/engine/classes/classpluginDetailTest.php +++ /dev/null @@ -1,92 +0,0 @@ -object = new pluginDetail("enterprise", "enterpriseplugin", __FILE__); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('pluginDetail'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers pluginDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('pluginDetail', '__construct'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional () == false); - $this->assertTrue($params[1]->getName() == 'sClassName'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional () == false); - $this->assertTrue($params[2]->getName() == 'sFilename'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional () == false); - $this->assertTrue($params[3]->getName() == 'sFriendlyName'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional () == true); - $this->assertTrue($params[3]->getDefaultValue() == ''); - $this->assertTrue($params[4]->getName() == 'sPluginFolder'); - $this->assertTrue($params[4]->isArray() == false); - $this->assertTrue($params[4]->isOptional () == true); - $this->assertTrue($params[4]->getDefaultValue() == ''); - $this->assertTrue($params[5]->getName() == 'sDescription'); - $this->assertTrue($params[5]->isArray() == false); - $this->assertTrue($params[5]->isOptional () == true); - $this->assertTrue($params[5]->getDefaultValue() == ''); - $this->assertTrue($params[6]->getName() == 'sSetupPage'); - $this->assertTrue($params[6]->isArray() == false); - $this->assertTrue($params[6]->isOptional () == true); - $this->assertTrue($params[6]->getDefaultValue() == ''); - $this->assertTrue($params[7]->getName() == 'iVersion'); - $this->assertTrue($params[7]->isArray() == false); - $this->assertTrue($params[7]->isOptional() == true); - $this->assertTrue($params[7]->getDefaultValue() == '0'); - } -} - diff --git a/tests/automated/workflow/engine/classes/classpmGaugeTest.php b/tests/automated/workflow/engine/classes/classpmGaugeTest.php deleted file mode 100644 index cc28ee0dd..000000000 --- a/tests/automated/workflow/engine/classes/classpmGaugeTest.php +++ /dev/null @@ -1,85 +0,0 @@ -object = new pmGauge(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('pmGauge'); $this->assertTrue( count($methods) == 2); - } - - /** - * @covers pmGauge::render - * @todo Implement testrender(). - */ - public function testrender() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('render', $methods ), 'exists method render' ); - $r = new ReflectionMethod('pmGauge', 'render'); - $params = $r->getParameters(); - } - - /** - * @covers pmGauge::renderGauge - * @todo Implement testrenderGauge(). - */ - public function testrenderGauge() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderGauge', $methods ), 'exists method renderGauge' ); - $r = new ReflectionMethod('pmGauge', 'renderGauge'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'im'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'cX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'cY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'diameter'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classpmPhingTest.php b/tests/automated/workflow/engine/classes/classpmPhingTest.php deleted file mode 100644 index 06b593b65..000000000 --- a/tests/automated/workflow/engine/classes/classpmPhingTest.php +++ /dev/null @@ -1,61 +0,0 @@ -object = new pmPhing(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('pmPhing'); $this->assertTrue( count($methods) == 35); - } - - /** - * @covers pmPhing::getPhingVersion - * @todo Implement testgetPhingVersion(). - */ - public function testgetPhingVersion() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPhingVersion', $methods ), 'exists method getPhingVersion' ); - $r = new ReflectionMethod('pmPhing', 'getPhingVersion'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classpopupMenuTest.php b/tests/automated/workflow/engine/classes/classpopupMenuTest.php deleted file mode 100644 index f67de4464..000000000 --- a/tests/automated/workflow/engine/classes/classpopupMenuTest.php +++ /dev/null @@ -1,70 +0,0 @@ -object = new popupMenu($tableId, $tableFields); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('popupMenu'); - $this->assertTrue( count($methods) == 14); - } - - /** - * @covers popupMenu::renderPopup - * @todo Implement testrenderPopup(). - */ - public function testrenderPopup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('renderPopup', $methods ), 'exists method renderPopup' ); - $r = new ReflectionMethod('popupMenu', 'renderPopup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'tableId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'tableFields'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classprocessMapTest.php b/tests/automated/workflow/engine/classes/classprocessMapTest.php deleted file mode 100644 index b833441fd..000000000 --- a/tests/automated/workflow/engine/classes/classprocessMapTest.php +++ /dev/null @@ -1,2826 +0,0 @@ -object = new processMap(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('processMap'); - $this->assertTrue( count($methods) == 150, count($methods)); - } - - /** - * @covers processMap::load - * @todo Implement testload(). - */ - public function testload() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('load', $methods ), 'exists method load' ); - $r = new ReflectionMethod('processMap', 'load'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'bView'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'iDelegation'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - $this->assertTrue( $params[4]->getName() == 'sTask'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - $this->assertTrue( $params[5]->getName() == 'bCT'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == ''); - } - - /** - * @covers processMap::createProcess - * @todo Implement testcreateProcess(). - */ - public function testcreateProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createProcess', $methods ), 'exists method createProcess' ); - $r = new ReflectionMethod('processMap', 'createProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::updateProcess - * @todo Implement testupdateProcess(). - */ - public function testupdateProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateProcess', $methods ), 'exists method updateProcess' ); - $r = new ReflectionMethod('processMap', 'updateProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'aData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::editProcess - * @todo Implement testeditProcess(). - */ - public function testeditProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('editProcess', $methods ), 'exists method editProcess' ); - $r = new ReflectionMethod('processMap', 'editProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::deleteProcess - * @todo Implement testdeleteProcess(). - */ - public function testdeleteProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteProcess', $methods ), 'exists method deleteProcess' ); - $r = new ReflectionMethod('processMap', 'deleteProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::saveTitlePosition - * @todo Implement testsaveTitlePosition(). - */ - public function testsaveTitlePosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveTitlePosition', $methods ), 'exists method saveTitlePosition' ); - $r = new ReflectionMethod('processMap', 'saveTitlePosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::steps - * @todo Implement teststeps(). - */ - public function teststeps() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('steps', $methods ), 'exists method steps' ); - $r = new ReflectionMethod('processMap', 'steps'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getStepsCriteria - * @todo Implement testgetStepsCriteria(). - */ - public function testgetStepsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepsCriteria', $methods ), 'exists method getStepsCriteria' ); - $r = new ReflectionMethod('processMap', 'getStepsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getStepTriggersCriteria - * @todo Implement testgetStepTriggersCriteria(). - */ - public function testgetStepTriggersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getStepTriggersCriteria', $methods ), 'exists method getStepTriggersCriteria' ); - $r = new ReflectionMethod('processMap', 'getStepTriggersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sStepUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAvailableBBCriteria - * @todo Implement testgetAvailableBBCriteria(). - */ - public function testgetAvailableBBCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableBBCriteria', $methods ), 'exists method getAvailableBBCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableBBCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::users - * @todo Implement testusers(). - */ - public function testusers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('users', $methods ), 'exists method users' ); - $r = new ReflectionMethod('processMap', 'users'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::users_adhoc - * @todo Implement testusers_adhoc(). - */ - public function testusers_adhoc() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('users_adhoc', $methods ), 'exists method users_adhoc' ); - $r = new ReflectionMethod('processMap', 'users_adhoc'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getTaskUsersCriteria - * @todo Implement testgetTaskUsersCriteria(). - */ - public function testgetTaskUsersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTaskUsersCriteria', $methods ), 'exists method getTaskUsersCriteria' ); - $r = new ReflectionMethod('processMap', 'getTaskUsersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers processMap::getAvailableUsersCriteria - * @todo Implement testgetAvailableUsersCriteria(). - */ - public function testgetAvailableUsersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableUsersCriteria', $methods ), 'exists method getAvailableUsersCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableUsersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers processMap::stepsConditions - * @todo Implement teststepsConditions(). - */ - public function teststepsConditions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stepsConditions', $methods ), 'exists method stepsConditions' ); - $r = new ReflectionMethod('processMap', 'stepsConditions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::stepsTriggers - * @todo Implement teststepsTriggers(). - */ - public function teststepsTriggers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('stepsTriggers', $methods ), 'exists method stepsTriggers' ); - $r = new ReflectionMethod('processMap', 'stepsTriggers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::addTask - * @todo Implement testaddTask(). - */ - public function testaddTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addTask', $methods ), 'exists method addTask' ); - $r = new ReflectionMethod('processMap', 'addTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - $this->assertTrue( $params[3]->getName() == 'iWidth'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '165'); - $this->assertTrue( $params[4]->getName() == 'iHeight'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == '40'); - } - - /** - * @covers processMap::editTaskProperties - * @todo Implement testeditTaskProperties(). - */ - public function testeditTaskProperties() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('editTaskProperties', $methods ), 'exists method editTaskProperties' ); - $r = new ReflectionMethod('processMap', 'editTaskProperties'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iForm'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - $this->assertTrue( $params[2]->getName() == 'iIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::saveTaskPosition - * @todo Implement testsaveTaskPosition(). - */ - public function testsaveTaskPosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveTaskPosition', $methods ), 'exists method saveTaskPosition' ); - $r = new ReflectionMethod('processMap', 'saveTaskPosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::deleteTask - * @todo Implement testdeleteTask(). - */ - public function testdeleteTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteTask', $methods ), 'exists method deleteTask' ); - $r = new ReflectionMethod('processMap', 'deleteTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::deleteGateway - * @todo Implement testdeleteGateway(). - */ - public function testdeleteGateway() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteGateway', $methods ), 'exists method deleteGateway' ); - $r = new ReflectionMethod('processMap', 'deleteGateway'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sGatewayUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::addGateway - * @todo Implement testaddGateway(). - */ - public function testaddGateway() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addGateway', $methods ), 'exists method addGateway' ); - $r = new ReflectionMethod('processMap', 'addGateway'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::addGuide - * @todo Implement testaddGuide(). - */ - public function testaddGuide() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addGuide', $methods ), 'exists method addGuide' ); - $r = new ReflectionMethod('processMap', 'addGuide'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iPosition'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'sDirection'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'vertical'); - } - - /** - * @covers processMap::saveGuidePosition - * @todo Implement testsaveGuidePosition(). - */ - public function testsaveGuidePosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveGuidePosition', $methods ), 'exists method saveGuidePosition' ); - $r = new ReflectionMethod('processMap', 'saveGuidePosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSEUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iPosition'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'sDirection'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == 'vertical'); - } - - /** - * @covers processMap::deleteGuide - * @todo Implement testdeleteGuide(). - */ - public function testdeleteGuide() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteGuide', $methods ), 'exists method deleteGuide' ); - $r = new ReflectionMethod('processMap', 'deleteGuide'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSEUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::deleteGuides - * @todo Implement testdeleteGuides(). - */ - public function testdeleteGuides() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteGuides', $methods ), 'exists method deleteGuides' ); - $r = new ReflectionMethod('processMap', 'deleteGuides'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::addText - * @todo Implement testaddText(). - */ - public function testaddText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addText', $methods ), 'exists method addText' ); - $r = new ReflectionMethod('processMap', 'addText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sLabel'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'iX'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - $this->assertTrue( $params[3]->getName() == 'iY'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '0'); - $this->assertTrue( $params[4]->getName() == 'sNext_uid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers processMap::updateText - * @todo Implement testupdateText(). - */ - public function testupdateText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateText', $methods ), 'exists method updateText' ); - $r = new ReflectionMethod('processMap', 'updateText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSEUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sLabel'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sNext_uid'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::saveTextPosition - * @todo Implement testsaveTextPosition(). - */ - public function testsaveTextPosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveTextPosition', $methods ), 'exists method saveTextPosition' ); - $r = new ReflectionMethod('processMap', 'saveTextPosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSEUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::deleteText - * @todo Implement testdeleteText(). - */ - public function testdeleteText() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteText', $methods ), 'exists method deleteText' ); - $r = new ReflectionMethod('processMap', 'deleteText'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSEUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::saveGatewayPosition - * @todo Implement testsaveGatewayPosition(). - */ - public function testsaveGatewayPosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveGatewayPosition', $methods ), 'exists method saveGatewayPosition' ); - $r = new ReflectionMethod('processMap', 'saveGatewayPosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sGatewayUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::dynaformsList - * @todo Implement testdynaformsList(). - */ - public function testdynaformsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dynaformsList', $methods ), 'exists method dynaformsList' ); - $r = new ReflectionMethod('processMap', 'dynaformsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getDynaformsCriteria - * @todo Implement testgetDynaformsCriteria(). - */ - public function testgetDynaformsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDynaformsCriteria', $methods ), 'exists method getDynaformsCriteria' ); - $r = new ReflectionMethod('processMap', 'getDynaformsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getDynaformsList - * @todo Implement testgetDynaformsList(). - */ - public function testgetDynaformsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDynaformsList', $methods ), 'exists method getDynaformsList' ); - $r = new ReflectionMethod('processMap', 'getDynaformsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::outputdocsList - * @todo Implement testoutputdocsList(). - */ - public function testoutputdocsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('outputdocsList', $methods ), 'exists method outputdocsList' ); - $r = new ReflectionMethod('processMap', 'outputdocsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getOutputDocumentsCriteria - * @todo Implement testgetOutputDocumentsCriteria(). - */ - public function testgetOutputDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getOutputDocumentsCriteria', $methods ), 'exists method getOutputDocumentsCriteria' ); - $r = new ReflectionMethod('processMap', 'getOutputDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::inputdocsList - * @todo Implement testinputdocsList(). - */ - public function testinputdocsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('inputdocsList', $methods ), 'exists method inputdocsList' ); - $r = new ReflectionMethod('processMap', 'inputdocsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getInputDocumentsCriteria - * @todo Implement testgetInputDocumentsCriteria(). - */ - public function testgetInputDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getInputDocumentsCriteria', $methods ), 'exists method getInputDocumentsCriteria' ); - $r = new ReflectionMethod('processMap', 'getInputDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::triggersList - * @todo Implement testtriggersList(). - */ - public function testtriggersList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('triggersList', $methods ), 'exists method triggersList' ); - $r = new ReflectionMethod('processMap', 'triggersList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getTriggersCriteria - * @todo Implement testgetTriggersCriteria(). - */ - public function testgetTriggersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTriggersCriteria', $methods ), 'exists method getTriggersCriteria' ); - $r = new ReflectionMethod('processMap', 'getTriggersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getTriggers - * @todo Implement testgetTriggers(). - */ - public function testgetTriggers() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getTriggers', $methods ), 'exists method getTriggers' ); - $r = new ReflectionMethod('processMap', 'getTriggers'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::caseSchedulerList - * @todo Implement testcaseSchedulerList(). - */ - public function testcaseSchedulerList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseSchedulerList', $methods ), 'exists method caseSchedulerList' ); - $r = new ReflectionMethod('processMap', 'caseSchedulerList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::logCaseSchedulerList - * @todo Implement testlogCaseSchedulerList(). - */ - public function testlogCaseSchedulerList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('logCaseSchedulerList', $methods ), 'exists method logCaseSchedulerList' ); - $r = new ReflectionMethod('processMap', 'logCaseSchedulerList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::messagesList - * @todo Implement testmessagesList(). - */ - public function testmessagesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('messagesList', $methods ), 'exists method messagesList' ); - $r = new ReflectionMethod('processMap', 'messagesList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::reportTablesList - * @todo Implement testreportTablesList(). - */ - public function testreportTablesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reportTablesList', $methods ), 'exists method reportTablesList' ); - $r = new ReflectionMethod('processMap', 'reportTablesList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getReportTablesCriteria - * @todo Implement testgetReportTablesCriteria(). - */ - public function testgetReportTablesCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getReportTablesCriteria', $methods ), 'exists method getReportTablesCriteria' ); - $r = new ReflectionMethod('processMap', 'getReportTablesCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::currentPattern - * @todo Implement testcurrentPattern(). - */ - public function testcurrentPattern() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('currentPattern', $methods ), 'exists method currentPattern' ); - $r = new ReflectionMethod('processMap', 'currentPattern'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::newPattern - * @todo Implement testnewPattern(). - */ - public function testnewPattern() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newPattern', $methods ), 'exists method newPattern' ); - $r = new ReflectionMethod('processMap', 'newPattern'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sNextTask'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers processMap::getNumberOfRoutes - * @todo Implement testgetNumberOfRoutes(). - */ - public function testgetNumberOfRoutes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNumberOfRoutes', $methods ), 'exists method getNumberOfRoutes' ); - $r = new ReflectionMethod('processMap', 'getNumberOfRoutes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sNextTask'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::saveNewPattern - * @todo Implement testsaveNewPattern(). - */ - public function testsaveNewPattern() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveNewPattern', $methods ), 'exists method saveNewPattern' ); - $r = new ReflectionMethod('processMap', 'saveNewPattern'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sNextTask'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'sDelete'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers processMap::saveNewGateway - * @todo Implement testsaveNewGateway(). - */ - public function testsaveNewGateway() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveNewGateway', $methods ), 'exists method saveNewGateway' ); - $r = new ReflectionMethod('processMap', 'saveNewGateway'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sNextTask'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::deleteDerivation - * @todo Implement testdeleteDerivation(). - */ - public function testdeleteDerivation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteDerivation', $methods ), 'exists method deleteDerivation' ); - $r = new ReflectionMethod('processMap', 'deleteDerivation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getConditionProcessList - * @todo Implement testgetConditionProcessList(). - */ - public function testgetConditionProcessList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getConditionProcessList', $methods ), 'exists method getConditionProcessList' ); - $r = new ReflectionMethod('processMap', 'getConditionProcessList'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::supervisorDynaforms - * @todo Implement testsupervisorDynaforms(). - */ - public function testsupervisorDynaforms() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('supervisorDynaforms', $methods ), 'exists method supervisorDynaforms' ); - $r = new ReflectionMethod('processMap', 'supervisorDynaforms'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::supervisorInputs - * @todo Implement testsupervisorInputs(). - */ - public function testsupervisorInputs() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('supervisorInputs', $methods ), 'exists method supervisorInputs' ); - $r = new ReflectionMethod('processMap', 'supervisorInputs'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::webEntry - * @todo Implement testwebEntry(). - */ - public function testwebEntry() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('webEntry', $methods ), 'exists method webEntry' ); - $r = new ReflectionMethod('processMap', 'webEntry'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::webEntry_new - * @todo Implement testwebEntry_new(). - */ - public function testwebEntry_new() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('webEntry_new', $methods ), 'exists method webEntry_new' ); - $r = new ReflectionMethod('processMap', 'webEntry_new'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getSupervisorDynaformsCriteria - * @todo Implement testgetSupervisorDynaformsCriteria(). - */ - public function testgetSupervisorDynaformsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSupervisorDynaformsCriteria', $methods ), 'exists method getSupervisorDynaformsCriteria' ); - $r = new ReflectionMethod('processMap', 'getSupervisorDynaformsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getSupervisorInputsCriteria - * @todo Implement testgetSupervisorInputsCriteria(). - */ - public function testgetSupervisorInputsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSupervisorInputsCriteria', $methods ), 'exists method getSupervisorInputsCriteria' ); - $r = new ReflectionMethod('processMap', 'getSupervisorInputsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::availableSupervisorDynaforms - * @todo Implement testavailableSupervisorDynaforms(). - */ - public function testavailableSupervisorDynaforms() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('availableSupervisorDynaforms', $methods ), 'exists method availableSupervisorDynaforms' ); - $r = new ReflectionMethod('processMap', 'availableSupervisorDynaforms'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::availableSupervisorInputs - * @todo Implement testavailableSupervisorInputs(). - */ - public function testavailableSupervisorInputs() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('availableSupervisorInputs', $methods ), 'exists method availableSupervisorInputs' ); - $r = new ReflectionMethod('processMap', 'availableSupervisorInputs'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAvailableSupervisorDynaformsCriteria - * @todo Implement testgetAvailableSupervisorDynaformsCriteria(). - */ - public function testgetAvailableSupervisorDynaformsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableSupervisorDynaformsCriteria', $methods ), 'exists method getAvailableSupervisorDynaformsCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableSupervisorDynaformsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAvailableSupervisorInputsCriteria - * @todo Implement testgetAvailableSupervisorInputsCriteria(). - */ - public function testgetAvailableSupervisorInputsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableSupervisorInputsCriteria', $methods ), 'exists method getAvailableSupervisorInputsCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableSupervisorInputsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::assignSupervisorStep - * @todo Implement testassignSupervisorStep(). - */ - public function testassignSupervisorStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignSupervisorStep', $methods ), 'exists method assignSupervisorStep' ); - $r = new ReflectionMethod('processMap', 'assignSupervisorStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sObjType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sObjUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::removeSupervisorStep - * @todo Implement testremoveSupervisorStep(). - */ - public function testremoveSupervisorStep() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeSupervisorStep', $methods ), 'exists method removeSupervisorStep' ); - $r = new ReflectionMethod('processMap', 'removeSupervisorStep'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sStepUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sObjType'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sObjUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'iPosition'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } - - /** - * @covers processMap::listProcessesUser - * @todo Implement testlistProcessesUser(). - */ - public function testlistProcessesUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listProcessesUser', $methods ), 'exists method listProcessesUser' ); - $r = new ReflectionMethod('processMap', 'listProcessesUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::listNoProcessesUser - * @todo Implement testlistNoProcessesUser(). - */ - public function testlistNoProcessesUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listNoProcessesUser', $methods ), 'exists method listNoProcessesUser' ); - $r = new ReflectionMethod('processMap', 'listNoProcessesUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::assignProcessUser - * @todo Implement testassignProcessUser(). - */ - public function testassignProcessUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignProcessUser', $methods ), 'exists method assignProcessUser' ); - $r = new ReflectionMethod('processMap', 'assignProcessUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUsrUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::removeProcessUser - * @todo Implement testremoveProcessUser(). - */ - public function testremoveProcessUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeProcessUser', $methods ), 'exists method removeProcessUser' ); - $r = new ReflectionMethod('processMap', 'removeProcessUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sPUUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getObjectsPermissionsCriteria - * @todo Implement testgetObjectsPermissionsCriteria(). - */ - public function testgetObjectsPermissionsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getObjectsPermissionsCriteria', $methods ), 'exists method getObjectsPermissionsCriteria' ); - $r = new ReflectionMethod('processMap', 'getObjectsPermissionsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAllObjectPermissionCount - * @todo Implement testgetAllObjectPermissionCount(). - */ - public function testgetAllObjectPermissionCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllObjectPermissionCount', $methods ), 'exists method getAllObjectPermissionCount' ); - $r = new ReflectionMethod('processMap', 'getAllObjectPermissionCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtObjectsPermissions - * @todo Implement testgetExtObjectsPermissions(). - */ - public function testgetExtObjectsPermissions() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtObjectsPermissions', $methods ), 'exists method getExtObjectsPermissions' ); - $r = new ReflectionMethod('processMap', 'getExtObjectsPermissions'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::objectsPermissionsList - * @todo Implement testobjectsPermissionsList(). - */ - public function testobjectsPermissionsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('objectsPermissionsList', $methods ), 'exists method objectsPermissionsList' ); - $r = new ReflectionMethod('processMap', 'objectsPermissionsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::newObjectPermission - * @todo Implement testnewObjectPermission(). - */ - public function testnewObjectPermission() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newObjectPermission', $methods ), 'exists method newObjectPermission' ); - $r = new ReflectionMethod('processMap', 'newObjectPermission'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::editObjectPermission - * @todo Implement testeditObjectPermission(). - */ - public function testeditObjectPermission() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('editObjectPermission', $methods ), 'exists method editObjectPermission' ); - $r = new ReflectionMethod('processMap', 'editObjectPermission'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sOP_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::caseTracker - * @todo Implement testcaseTracker(). - */ - public function testcaseTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseTracker', $methods ), 'exists method caseTracker' ); - $r = new ReflectionMethod('processMap', 'caseTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::caseTrackerObjects - * @todo Implement testcaseTrackerObjects(). - */ - public function testcaseTrackerObjects() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseTrackerObjects', $methods ), 'exists method caseTrackerObjects' ); - $r = new ReflectionMethod('processMap', 'caseTrackerObjects'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getCaseTrackerObjectsCriteria - * @todo Implement testgetCaseTrackerObjectsCriteria(). - */ - public function testgetCaseTrackerObjectsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseTrackerObjectsCriteria', $methods ), 'exists method getCaseTrackerObjectsCriteria' ); - $r = new ReflectionMethod('processMap', 'getCaseTrackerObjectsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::availableCaseTrackerObjects - * @todo Implement testavailableCaseTrackerObjects(). - */ - public function testavailableCaseTrackerObjects() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('availableCaseTrackerObjects', $methods ), 'exists method availableCaseTrackerObjects' ); - $r = new ReflectionMethod('processMap', 'availableCaseTrackerObjects'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAvailableCaseTrackerObjectsCriteria - * @todo Implement testgetAvailableCaseTrackerObjectsCriteria(). - */ - public function testgetAvailableCaseTrackerObjectsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableCaseTrackerObjectsCriteria', $methods ), 'exists method getAvailableCaseTrackerObjectsCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableCaseTrackerObjectsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::assignCaseTrackerObject - * @todo Implement testassignCaseTrackerObject(). - */ - public function testassignCaseTrackerObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignCaseTrackerObject', $methods ), 'exists method assignCaseTrackerObject' ); - $r = new ReflectionMethod('processMap', 'assignCaseTrackerObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sObjType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sObjUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::removeCaseTrackerObject - * @todo Implement testremoveCaseTrackerObject(). - */ - public function testremoveCaseTrackerObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeCaseTrackerObject', $methods ), 'exists method removeCaseTrackerObject' ); - $r = new ReflectionMethod('processMap', 'removeCaseTrackerObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCTOUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iPosition'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::upCaseTrackerObject - * @todo Implement testupCaseTrackerObject(). - */ - public function testupCaseTrackerObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upCaseTrackerObject', $methods ), 'exists method upCaseTrackerObject' ); - $r = new ReflectionMethod('processMap', 'upCaseTrackerObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCTOUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iPosition'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::downCaseTrackerObject - * @todo Implement testdownCaseTrackerObject(). - */ - public function testdownCaseTrackerObject() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('downCaseTrackerObject', $methods ), 'exists method downCaseTrackerObject' ); - $r = new ReflectionMethod('processMap', 'downCaseTrackerObject'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sCTOUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sProcessUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'iPosition'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::processFilesManager - * @todo Implement testprocessFilesManager(). - */ - public function testprocessFilesManager() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('processFilesManager', $methods ), 'exists method processFilesManager' ); - $r = new ReflectionMethod('processMap', 'processFilesManager'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::exploreDirectory - * @todo Implement testexploreDirectory(). - */ - public function testexploreDirectory() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('exploreDirectory', $methods ), 'exists method exploreDirectory' ); - $r = new ReflectionMethod('processMap', 'exploreDirectory'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMainDirectory'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sCurrentDirectory'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::deleteFile - * @todo Implement testdeleteFile(). - */ - public function testdeleteFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteFile', $methods ), 'exists method deleteFile' ); - $r = new ReflectionMethod('processMap', 'deleteFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMainDirectory'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sCurrentDirectory'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sFile'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers processMap::deleteDirectory - * @todo Implement testdeleteDirectory(). - */ - public function testdeleteDirectory() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteDirectory', $methods ), 'exists method deleteDirectory' ); - $r = new ReflectionMethod('processMap', 'deleteDirectory'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMainDirectory'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sCurrentDirectory'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sDirToDelete'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers processMap::downloadFile - * @todo Implement testdownloadFile(). - */ - public function testdownloadFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('downloadFile', $methods ), 'exists method downloadFile' ); - $r = new ReflectionMethod('processMap', 'downloadFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sMainDirectory'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sCurrentDirectory'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sFile'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers processMap::addSubProcess - * @todo Implement testaddSubProcess(). - */ - public function testaddSubProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('addSubProcess', $methods ), 'exists method addSubProcess' ); - $r = new ReflectionMethod('processMap', 'addSubProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '0'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '0'); - } - - /** - * @covers processMap::deleteSubProcess - * @todo Implement testdeleteSubProcess(). - */ - public function testdeleteSubProcess() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('deleteSubProcess', $methods ), 'exists method deleteSubProcess' ); - $r = new ReflectionMethod('processMap', 'deleteSubProcess'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::subProcess_Properties - * @todo Implement testsubProcess_Properties(). - */ - public function testsubProcess_Properties() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('subProcess_Properties', $methods ), 'exists method subProcess_Properties' ); - $r = new ReflectionMethod('processMap', 'subProcess_Properties'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::subProcess_TaskIni - * @todo Implement testsubProcess_TaskIni(). - */ - public function testsubProcess_TaskIni() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('subProcess_TaskIni', $methods ), 'exists method subProcess_TaskIni' ); - $r = new ReflectionMethod('processMap', 'subProcess_TaskIni'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::eventsList - * @todo Implement testeventsList(). - */ - public function testeventsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('eventsList', $methods ), 'exists method eventsList' ); - $r = new ReflectionMethod('processMap', 'eventsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'type'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::getEventsCriteria - * @todo Implement testgetEventsCriteria(). - */ - public function testgetEventsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getEventsCriteria', $methods ), 'exists method getEventsCriteria' ); - $r = new ReflectionMethod('processMap', 'getEventsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'EVN_ACTION'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::editProcessNew - * @todo Implement testeditProcessNew(). - */ - public function testeditProcessNew() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('editProcessNew', $methods ), 'exists method editProcessNew' ); - $r = new ReflectionMethod('processMap', 'editProcessNew'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::loadProcessCategory - * @todo Implement testloadProcessCategory(). - */ - public function testloadProcessCategory() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('loadProcessCategory', $methods ), 'exists method loadProcessCategory' ); - $r = new ReflectionMethod('processMap', 'loadProcessCategory'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::saveTaskCordinates - * @todo Implement testsaveTaskCordinates(). - */ - public function testsaveTaskCordinates() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveTaskCordinates', $methods ), 'exists method saveTaskCordinates' ); - $r = new ReflectionMethod('processMap', 'saveTaskCordinates'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '110'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '60'); - } - - /** - * @covers processMap::saveAnnotationCordinates - * @todo Implement testsaveAnnotationCordinates(). - */ - public function testsaveAnnotationCordinates() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveAnnotationCordinates', $methods ), 'exists method saveAnnotationCordinates' ); - $r = new ReflectionMethod('processMap', 'saveAnnotationCordinates'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSwimLaneUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '110'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '60'); - } - - /** - * @covers processMap::saveEventPosition - * @todo Implement testsaveEventPosition(). - */ - public function testsaveEventPosition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveEventPosition', $methods ), 'exists method saveEventPosition' ); - $r = new ReflectionMethod('processMap', 'saveEventPosition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sEventUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iX'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '110'); - $this->assertTrue( $params[2]->getName() == 'iY'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == '60'); - } - - /** - * @covers processMap::getAllProcesses - * @todo Implement testgetAllProcesses(). - */ - public function testgetAllProcesses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllProcesses', $methods ), 'exists method getAllProcesses' ); - $r = new ReflectionMethod('processMap', 'getAllProcesses'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getDynaformList - * @todo Implement testgetDynaformList(). - */ - public function testgetDynaformList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDynaformList', $methods ), 'exists method getDynaformList' ); - $r = new ReflectionMethod('processMap', 'getDynaformList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::listNewWebEntry - * @todo Implement testlistNewWebEntry(). - */ - public function testlistNewWebEntry() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listNewWebEntry', $methods ), 'exists method listNewWebEntry' ); - $r = new ReflectionMethod('processMap', 'listNewWebEntry'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sEventUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::usersExtList - * @todo Implement testusersExtList(). - */ - public function testusersExtList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('usersExtList', $methods ), 'exists method usersExtList' ); - $r = new ReflectionMethod('processMap', 'usersExtList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sTaskUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::caseNewSchedulerList - * @todo Implement testcaseNewSchedulerList(). - */ - public function testcaseNewSchedulerList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseNewSchedulerList', $methods ), 'exists method caseNewSchedulerList' ); - $r = new ReflectionMethod('processMap', 'caseNewSchedulerList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sSchUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAllTaskUserCount - * @todo Implement testgetAllTaskUserCount(). - */ - public function testgetAllTaskUserCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllTaskUserCount', $methods ), 'exists method getAllTaskUserCount' ); - $r = new ReflectionMethod('processMap', 'getAllTaskUserCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtTaskUsersCriteria - * @todo Implement testgetExtTaskUsersCriteria(). - */ - public function testgetExtTaskUsersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtTaskUsersCriteria', $methods ), 'exists method getExtTaskUsersCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtTaskUsersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTaskUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'iType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '1'); - } - - /** - * @covers processMap::getAvailableExtUsersCriteria - * @todo Implement testgetAvailableExtUsersCriteria(). - */ - public function testgetAvailableExtUsersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableExtUsersCriteria', $methods ), 'exists method getAvailableExtUsersCriteria' ); - $r = new ReflectionMethod('processMap', 'getAvailableExtUsersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers processMap::getExtAdditionalTablesList - * @todo Implement testgetExtAdditionalTablesList(). - */ - public function testgetExtAdditionalTablesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAdditionalTablesList', $methods ), 'exists method getExtAdditionalTablesList' ); - $r = new ReflectionMethod('processMap', 'getExtAdditionalTablesList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTab_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getExtAvailableBBCriteria - * @todo Implement testgetExtAvailableBBCriteria(). - */ - public function testgetExtAvailableBBCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAvailableBBCriteria', $methods ), 'exists method getExtAvailableBBCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtAvailableBBCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllStepCount - * @todo Implement testgetAllStepCount(). - */ - public function testgetAllStepCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllStepCount', $methods ), 'exists method getAllStepCount' ); - $r = new ReflectionMethod('processMap', 'getAllStepCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtStepsCriteria - * @todo Implement testgetExtStepsCriteria(). - */ - public function testgetExtStepsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtStepsCriteria', $methods ), 'exists method getExtStepsCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtStepsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTaskUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllStepTriggerCount - * @todo Implement testgetAllStepTriggerCount(). - */ - public function testgetAllStepTriggerCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllStepTriggerCount', $methods ), 'exists method getAllStepTriggerCount' ); - $r = new ReflectionMethod('processMap', 'getAllStepTriggerCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtStepTriggersCriteria - * @todo Implement testgetExtStepTriggersCriteria(). - */ - public function testgetExtStepTriggersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtStepTriggersCriteria', $methods ), 'exists method getExtStepTriggersCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtStepTriggersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sStepUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sTaskUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - $this->assertTrue( $params[4]->getName() == 'sType'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == true); - $this->assertTrue( $params[4]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getExtAvailableStepTriggersCriteria - * @todo Implement testgetExtAvailableStepTriggersCriteria(). - */ - public function testgetExtAvailableStepTriggersCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAvailableStepTriggersCriteria', $methods ), 'exists method getExtAvailableStepTriggersCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtAvailableStepTriggersCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sStepUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sTaskUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllDynaformCount - * @todo Implement testgetAllDynaformCount(). - */ - public function testgetAllDynaformCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllDynaformCount', $methods ), 'exists method getAllDynaformCount' ); - $r = new ReflectionMethod('processMap', 'getAllDynaformCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtDynaformsList - * @todo Implement testgetExtDynaformsList(). - */ - public function testgetExtDynaformsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtDynaformsList', $methods ), 'exists method getExtDynaformsList' ); - $r = new ReflectionMethod('processMap', 'getExtDynaformsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllInputDocumentCount - * @todo Implement testgetAllInputDocumentCount(). - */ - public function testgetAllInputDocumentCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllInputDocumentCount', $methods ), 'exists method getAllInputDocumentCount' ); - $r = new ReflectionMethod('processMap', 'getAllInputDocumentCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtInputDocumentsCriteria - * @todo Implement testgetExtInputDocumentsCriteria(). - */ - public function testgetExtInputDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtInputDocumentsCriteria', $methods ), 'exists method getExtInputDocumentsCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtInputDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllOutputDocumentCount - * @todo Implement testgetAllOutputDocumentCount(). - */ - public function testgetAllOutputDocumentCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllOutputDocumentCount', $methods ), 'exists method getAllOutputDocumentCount' ); - $r = new ReflectionMethod('processMap', 'getAllOutputDocumentCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtOutputDocumentsCriteria - * @todo Implement testgetExtOutputDocumentsCriteria(). - */ - public function testgetExtOutputDocumentsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtOutputDocumentsCriteria', $methods ), 'exists method getExtOutputDocumentsCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtOutputDocumentsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::subProcessExtProperties - * @todo Implement testsubProcessExtProperties(). - */ - public function testsubProcessExtProperties() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('subProcessExtProperties', $methods ), 'exists method subProcessExtProperties' ); - $r = new ReflectionMethod('processMap', 'subProcessExtProperties'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'sTaskUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - $this->assertTrue( $params[2]->getName() == 'sIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllProcessSupervisorsCount - * @todo Implement testgetAllProcessSupervisorsCount(). - */ - public function testgetAllProcessSupervisorsCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllProcessSupervisorsCount', $methods ), 'exists method getAllProcessSupervisorsCount' ); - $r = new ReflectionMethod('processMap', 'getAllProcessSupervisorsCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::listExtProcessesSupervisors - * @todo Implement testlistExtProcessesSupervisors(). - */ - public function testlistExtProcessesSupervisors() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listExtProcessesSupervisors', $methods ), 'exists method listExtProcessesSupervisors' ); - $r = new ReflectionMethod('processMap', 'listExtProcessesSupervisors'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::listExtNoProcessesUser - * @todo Implement testlistExtNoProcessesUser(). - */ - public function testlistExtNoProcessesUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('listExtNoProcessesUser', $methods ), 'exists method listExtNoProcessesUser' ); - $r = new ReflectionMethod('processMap', 'listExtNoProcessesUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAllSupervisorDynaformsCount - * @todo Implement testgetAllSupervisorDynaformsCount(). - */ - public function testgetAllSupervisorDynaformsCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllSupervisorDynaformsCount', $methods ), 'exists method getAllSupervisorDynaformsCount' ); - $r = new ReflectionMethod('processMap', 'getAllSupervisorDynaformsCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtSupervisorDynaformsList - * @todo Implement testgetExtSupervisorDynaformsList(). - */ - public function testgetExtSupervisorDynaformsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtSupervisorDynaformsList', $methods ), 'exists method getExtSupervisorDynaformsList' ); - $r = new ReflectionMethod('processMap', 'getExtSupervisorDynaformsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getExtAvailableSupervisorDynaformsList - * @todo Implement testgetExtAvailableSupervisorDynaformsList(). - */ - public function testgetExtAvailableSupervisorDynaformsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAvailableSupervisorDynaformsList', $methods ), 'exists method getExtAvailableSupervisorDynaformsList' ); - $r = new ReflectionMethod('processMap', 'getExtAvailableSupervisorDynaformsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllSupervisorInputsCount - * @todo Implement testgetAllSupervisorInputsCount(). - */ - public function testgetAllSupervisorInputsCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllSupervisorInputsCount', $methods ), 'exists method getAllSupervisorInputsCount' ); - $r = new ReflectionMethod('processMap', 'getAllSupervisorInputsCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtSupervisorInputsList - * @todo Implement testgetExtSupervisorInputsList(). - */ - public function testgetExtSupervisorInputsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtSupervisorInputsList', $methods ), 'exists method getExtSupervisorInputsList' ); - $r = new ReflectionMethod('processMap', 'getExtSupervisorInputsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getExtAvailableSupervisorInputsList - * @todo Implement testgetExtAvailableSupervisorInputsList(). - */ - public function testgetExtAvailableSupervisorInputsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAvailableSupervisorInputsList', $methods ), 'exists method getExtAvailableSupervisorInputsList' ); - $r = new ReflectionMethod('processMap', 'getExtAvailableSupervisorInputsList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllDbSourceCount - * @todo Implement testgetAllDbSourceCount(). - */ - public function testgetAllDbSourceCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllDbSourceCount', $methods ), 'exists method getAllDbSourceCount' ); - $r = new ReflectionMethod('processMap', 'getAllDbSourceCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtCriteriaDBSList - * @todo Implement testgetExtCriteriaDBSList(). - */ - public function testgetExtCriteriaDBSList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtCriteriaDBSList', $methods ), 'exists method getExtCriteriaDBSList' ); - $r = new ReflectionMethod('processMap', 'getExtCriteriaDBSList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::newExtObjectPermission - * @todo Implement testnewExtObjectPermission(). - */ - public function testnewExtObjectPermission() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newExtObjectPermission', $methods ), 'exists method newExtObjectPermission' ); - $r = new ReflectionMethod('processMap', 'newExtObjectPermission'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sAction'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::ExtcaseTracker - * @todo Implement testExtcaseTracker(). - */ - public function testExtcaseTracker() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('ExtcaseTracker', $methods ), 'exists method ExtcaseTracker' ); - $r = new ReflectionMethod('processMap', 'ExtcaseTracker'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAllCaseTrackerObjectCount - * @todo Implement testgetAllCaseTrackerObjectCount(). - */ - public function testgetAllCaseTrackerObjectCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllCaseTrackerObjectCount', $methods ), 'exists method getAllCaseTrackerObjectCount' ); - $r = new ReflectionMethod('processMap', 'getAllCaseTrackerObjectCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtCaseTrackerObjectsCriteria - * @todo Implement testgetExtCaseTrackerObjectsCriteria(). - */ - public function testgetExtCaseTrackerObjectsCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtCaseTrackerObjectsCriteria', $methods ), 'exists method getExtCaseTrackerObjectsCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtCaseTrackerObjectsCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers processMap::getAvailableExtCaseTrackerObjects - * @todo Implement testgetAvailableExtCaseTrackerObjects(). - */ - public function testgetAvailableExtCaseTrackerObjects() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAvailableExtCaseTrackerObjects', $methods ), 'exists method getAvailableExtCaseTrackerObjects' ); - $r = new ReflectionMethod('processMap', 'getAvailableExtCaseTrackerObjects'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllReportTableCount - * @todo Implement testgetAllReportTableCount(). - */ - public function testgetAllReportTableCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllReportTableCount', $methods ), 'exists method getAllReportTableCount' ); - $r = new ReflectionMethod('processMap', 'getAllReportTableCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtReportTables - * @todo Implement testgetExtReportTables(). - */ - public function testgetExtReportTables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtReportTables', $methods ), 'exists method getExtReportTables' ); - $r = new ReflectionMethod('processMap', 'getExtReportTables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getExtAvailableUsersList - * @todo Implement testgetExtAvailableUsersList(). - */ - public function testgetExtAvailableUsersList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtAvailableUsersList', $methods ), 'exists method getExtAvailableUsersList' ); - $r = new ReflectionMethod('processMap', 'getExtAvailableUsersList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sTaskUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - $this->assertTrue( $params[1]->getName() == 'iType'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '2'); - } - - /** - * @covers processMap::getExtTaskUsersAdHocCriteria - * @todo Implement testgetExtTaskUsersAdHocCriteria(). - */ - public function testgetExtTaskUsersAdHocCriteria() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtTaskUsersAdHocCriteria', $methods ), 'exists method getExtTaskUsersAdHocCriteria' ); - $r = new ReflectionMethod('processMap', 'getExtTaskUsersAdHocCriteria'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTaskUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'iType'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '1'); - } - - /** - * @covers processMap::editExtObjectPermission - * @todo Implement testeditExtObjectPermission(). - */ - public function testeditExtObjectPermission() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('editExtObjectPermission', $methods ), 'exists method editExtObjectPermission' ); - $r = new ReflectionMethod('processMap', 'editExtObjectPermission'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sOP_UID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers processMap::getExtusersadhoc - * @todo Implement testgetExtusersadhoc(). - */ - public function testgetExtusersadhoc() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtusersadhoc', $methods ), 'exists method getExtusersadhoc' ); - $r = new ReflectionMethod('processMap', 'getExtusersadhoc'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'sTaskUID'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers processMap::saveExtddEvents - * @todo Implement testsaveExtddEvents(). - */ - public function testsaveExtddEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveExtddEvents', $methods ), 'exists method saveExtddEvents' ); - $r = new ReflectionMethod('processMap', 'saveExtddEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::saveExtEvents - * @todo Implement testsaveExtEvents(). - */ - public function testsaveExtEvents() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('saveExtEvents', $methods ), 'exists method saveExtEvents' ); - $r = new ReflectionMethod('processMap', 'saveExtEvents'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'oData'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers processMap::getAllTriggersCount - * @todo Implement testgetAllTriggersCount(). - */ - public function testgetAllTriggersCount() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllTriggersCount', $methods ), 'exists method getAllTriggersCount' ); - $r = new ReflectionMethod('processMap', 'getAllTriggersCount'); - $params = $r->getParameters(); - } - - /** - * @covers processMap::getExtTriggersList - * @todo Implement testgetExtTriggersList(). - */ - public function testgetExtTriggersList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getExtTriggersList', $methods ), 'exists method getExtTriggersList' ); - $r = new ReflectionMethod('processMap', 'getExtTriggersList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'start'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'limit'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sProcessUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - } - - /** - * @covers processMap::getAllInputDocsByTask - * @todo Implement testgetAllInputDocsByTask(). - */ - public function testgetAllInputDocsByTask() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getAllInputDocsByTask', $methods ), 'exists method getAllInputDocsByTask' ); - $r = new ReflectionMethod('processMap', 'getAllInputDocsByTask'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sPRO_UID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classpropelTableTest.php b/tests/automated/workflow/engine/classes/classpropelTableTest.php deleted file mode 100644 index 1cd55090a..000000000 --- a/tests/automated/workflow/engine/classes/classpropelTableTest.php +++ /dev/null @@ -1,179 +0,0 @@ -object = new propelTable(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('propelTable'); - $this->assertTrue(count($methods) == 8); - } - - /** - * @covers propelTable::prepareQuery - * @todo Implement testprepareQuery(). - */ - public function testprepareQuery() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('prepareQuery', $methods), 'exists method prepareQuery'); - $r = new ReflectionMethod('propelTable', 'prepareQuery'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'limitPage'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == true); - $this->assertTrue($params[0]->getDefaultValue() == ''); - } - - /** - * @covers propelTable::setupFromXmlform - * @todo Implement testsetupFromXmlform(). - */ - public function testsetupFromXmlform() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setupFromXmlform', $methods), 'exists method setupFromXmlform'); - $r = new ReflectionMethod('propelTable', 'setupFromXmlform'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'xmlForm'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers propelTable::count - * @todo Implement testcount(). - */ - public function testcount() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('count', $methods), 'exists method count'); - $r = new ReflectionMethod('propelTable', 'count'); - $params = $r->getParameters(); - } - - /** - * @covers propelTable::renderTitle - * @todo Implement testrenderTitle(). - */ - public function testrenderTitle() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('renderTitle', $methods), 'exists method renderTitle'); - $r = new ReflectionMethod('propelTable', 'renderTitle'); - $params = $r->getParameters(); - } - - /** - * @covers propelTable::renderField - * @todo Implement testrenderField(). - */ - public function testrenderField() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('renderField', $methods), 'exists method renderField'); - $r = new ReflectionMethod('propelTable', 'renderField'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'row'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'r'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'result'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } - - /** - * @covers propelTable::defaultStyle - * @todo Implement testdefaultStyle(). - */ - public function testdefaultStyle() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('defaultStyle', $methods), 'exists method defaultStyle'); - $r = new ReflectionMethod('propelTable', 'defaultStyle'); - $params = $r->getParameters(); - } - - /** - * @covers propelTable::renderTable - * @todo Implement testrenderTable(). - */ - public function testrenderTable() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('renderTable', $methods), 'exists method renderTable'); - $r = new ReflectionMethod('propelTable', 'renderTable'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'block'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == true); - $this->assertTrue($params[0]->getDefaultValue() == ''); - $this->assertTrue($params[1]->getName() == 'fields'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == ''); - } - - /** - * @covers propelTable::printForm - * @todo Implement testprintForm(). - */ - public function testprintForm() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('printForm', $methods), 'exists method printForm'); - $r = new ReflectionMethod('propelTable', 'printForm'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'filename'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'data'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == true); - $this->assertTrue($params[1]->getDefaultValue() == array()); - } -} - diff --git a/tests/automated/workflow/engine/classes/classredirectDetailTest.php b/tests/automated/workflow/engine/classes/classredirectDetailTest.php deleted file mode 100644 index 891ca72ea..000000000 --- a/tests/automated/workflow/engine/classes/classredirectDetailTest.php +++ /dev/null @@ -1,74 +0,0 @@ -object = new redirectDetail($sNamespace, $sRoleCode, $sPathMethod); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('redirectDetail'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers redirectDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('redirectDetail', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sRoleCode'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sPathMethod'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classreplacementLogoTest.php b/tests/automated/workflow/engine/classes/classreplacementLogoTest.php deleted file mode 100644 index a28443ec1..000000000 --- a/tests/automated/workflow/engine/classes/classreplacementLogoTest.php +++ /dev/null @@ -1,106 +0,0 @@ -object = new replacementLogo(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('replacementLogo'); $this->assertTrue( count($methods) == 3); - } - - /** - * @covers replacementLogo::replacementLogo - * @todo Implement testreplacementLogo(). - */ - public function testreplacementLogo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('replacementLogo', $methods ), 'exists method replacementLogo' ); - $r = new ReflectionMethod('replacementLogo', 'replacementLogo'); - $params = $r->getParameters(); - } - - /** - * @covers replacementLogo::upLoadFile - * @todo Implement testupLoadFile(). - */ - public function testupLoadFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upLoadFile', $methods ), 'exists method upLoadFile' ); - $r = new ReflectionMethod('replacementLogo', 'upLoadFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dirUpload'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'namefile'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'typefile'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'errorfile'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'tpnfile'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'formf'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - } - - /** - * @covers replacementLogo::getNameLogo - * @todo Implement testgetNameLogo(). - */ - public function testgetNameLogo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getNameLogo', $methods ), 'exists method getNameLogo' ); - $r = new ReflectionMethod('replacementLogo', 'getNameLogo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'usrUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classserverConfTest.php b/tests/automated/workflow/engine/classes/classserverConfTest.php deleted file mode 100644 index fad41c018..000000000 --- a/tests/automated/workflow/engine/classes/classserverConfTest.php +++ /dev/null @@ -1,385 +0,0 @@ -object = new serverConf(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('serverConf'); - $this->assertTrue(count($methods) == 24); - } - - /** - * @covers serverConf::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('serverConf', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getSingleton', $methods), 'exists method getSingleton'); - $r = new ReflectionMethod('serverConf', 'getSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::serializeInstance - * @todo Implement testserializeInstance(). - */ - public function testserializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('serializeInstance', $methods), 'exists method serializeInstance'); - $r = new ReflectionMethod('serverConf', 'serializeInstance'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::unSerializeInstance - * @todo Implement testunSerializeInstance(). - */ - public function testunSerializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('unSerializeInstance', $methods), 'exists method unSerializeInstance'); - $r = new ReflectionMethod('serverConf', 'unSerializeInstance'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'serialized'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::saveSingleton - * @todo Implement testsaveSingleton(). - */ - public function testsaveSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('saveSingleton', $methods), 'exists method saveSingleton'); - $r = new ReflectionMethod('serverConf', 'saveSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::setProperty - * @todo Implement testsetProperty(). - */ - public function testsetProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setProperty', $methods), 'exists method setProperty'); - $r = new ReflectionMethod('serverConf', 'setProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'propertyValue'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers serverConf::unsetProperty - * @todo Implement testunsetProperty(). - */ - public function testunsetProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('unsetProperty', $methods), 'exists method unsetProperty'); - $r = new ReflectionMethod('serverConf', 'unsetProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::getProperty - * @todo Implement testgetProperty(). - */ - public function testgetProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getProperty', $methods), 'exists method getProperty'); - $r = new ReflectionMethod('serverConf', 'getProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::sucessfulLogin - * @todo Implement testsucessfulLogin(). - */ - public function testsucessfulLogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('sucessfulLogin', $methods), 'exists method sucessfulLogin'); - $r = new ReflectionMethod('serverConf', 'sucessfulLogin'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::setWsInfo - * @todo Implement testsetWsInfo(). - */ - public function testsetWsInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setWsInfo', $methods), 'exists method setWsInfo'); - $r = new ReflectionMethod('serverConf', 'setWsInfo'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'wsname'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'info'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers serverConf::changeStatusWS - * @todo Implement testchangeStatusWS(). - */ - public function testchangeStatusWS() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('changeStatusWS', $methods), 'exists method changeStatusWS'); - $r = new ReflectionMethod('serverConf', 'changeStatusWS'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'wsName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::isWSDisabled - * @todo Implement testisWSDisabled(). - */ - public function testisWSDisabled() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('isWSDisabled', $methods), 'exists method isWSDisabled'); - $r = new ReflectionMethod('serverConf', 'isWSDisabled'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'wsName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::checkIfHostNameHasChanged - * @todo Implement testcheckIfHostNameHasChanged(). - */ - public function testcheckIfHostNameHasChanged() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('checkIfHostNameHasChanged', $methods), 'exists method checkIfHostNameHasChanged'); - $r = new ReflectionMethod('serverConf', 'checkIfHostNameHasChanged'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::getWSList - * @todo Implement testgetWSList(). - */ - public function testgetWSList() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getWSList', $methods), 'exists method getWSList'); - $r = new ReflectionMethod('serverConf', 'getWSList'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::getWorkspaceInfo - * @todo Implement testgetWorkspaceInfo(). - */ - public function testgetWorkspaceInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getWorkspaceInfo', $methods), 'exists method getWorkspaceInfo'); - $r = new ReflectionMethod('serverConf', 'getWorkspaceInfo'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'wsName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers serverConf::getPluginsList - * @todo Implement testgetPluginsList(). - */ - public function testgetPluginsList() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getPluginsList', $methods), 'exists method getPluginsList'); - $r = new ReflectionMethod('serverConf', 'getPluginsList'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::addPlugin - * @todo Implement testaddPlugin(). - */ - public function testaddPlugin() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('addPlugin', $methods), 'exists method addPlugin'); - $r = new ReflectionMethod('serverConf', 'addPlugin'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'workspace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'info'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers serverConf::getDBVersion - * @todo Implement testgetDBVersion(). - */ - public function testgetDBVersion() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getDBVersion', $methods), 'exists method getDBVersion'); - $r = new ReflectionMethod('serverConf', 'getDBVersion'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::resetLogins - * @todo Implement testresetLogins(). - */ - public function testresetLogins() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('resetLogins', $methods), 'exists method resetLogins'); - $r = new ReflectionMethod('serverConf', 'resetLogins'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::getLanDirection - * @todo Implement testgetLanDirection(). - */ - public function testgetLanDirection() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getLanDirection', $methods), 'exists method getLanDirection'); - $r = new ReflectionMethod('serverConf', 'getLanDirection'); - $params = $r->getParameters(); - } - - /** - * @covers serverConf::setHeartbeatProperty - * @todo Implement testsetHeartbeatProperty(). - */ - public function testsetHeartbeatProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setHeartbeatProperty', $methods), 'exists method setHeartbeatProperty'); - $r = new ReflectionMethod('serverConf', 'setHeartbeatProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'propertyValue'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'workspace'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } - - /** - * @covers serverConf::unsetHeartbeatProperty - * @todo Implement testunsetHeartbeatProperty(). - */ - public function testunsetHeartbeatProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('unsetHeartbeatProperty', $methods), 'exists method unsetHeartbeatProperty'); - $r = new ReflectionMethod('serverConf', 'unsetHeartbeatProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'workspace'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } - - /** - * @covers serverConf::getHeartbeatProperty - * @todo Implement testgetHeartbeatProperty(). - */ - public function testgetHeartbeatProperty() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getHeartbeatProperty', $methods), 'exists method getHeartbeatProperty'); - $r = new ReflectionMethod('serverConf', 'getHeartbeatProperty'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'propertyName'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'workspace'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classspoolRunTest.php b/tests/automated/workflow/engine/classes/classspoolRunTest.php deleted file mode 100644 index 5bbe0d59e..000000000 --- a/tests/automated/workflow/engine/classes/classspoolRunTest.php +++ /dev/null @@ -1,202 +0,0 @@ -object = new spoolRun(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('spoolRun'); - $this->assertTrue(count($methods) == 9); - } - - /** - * @covers spoolRun::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('spoolRun', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers spoolRun::getSpoolFilesList - * @todo Implement testgetSpoolFilesList(). - */ - public function testgetSpoolFilesList() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getSpoolFilesList', $methods), 'exists method getSpoolFilesList'); - $r = new ReflectionMethod('spoolRun', 'getSpoolFilesList'); - $params = $r->getParameters(); - } - - /** - * @covers spoolRun::create - * @todo Implement testcreate(). - */ - public function testcreate() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('create', $methods), 'exists method create'); - $r = new ReflectionMethod('spoolRun', 'create'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'aData'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers spoolRun::setConfig - * @todo Implement testsetConfig(). - */ - public function testsetConfig() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setConfig', $methods), 'exists method setConfig'); - $r = new ReflectionMethod('spoolRun', 'setConfig'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'aConfig'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } - - /** - * @covers spoolRun::setData - * @todo Implement testsetData(). - */ - public function testsetData() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('setData', $methods), 'exists method setData'); - $r = new ReflectionMethod('spoolRun', 'setData'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sAppMsgUid'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sSubject'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sFrom'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sTo'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == false); - $this->assertTrue($params[4]->getName() == 'sBody'); - $this->assertTrue($params[4]->isArray() == false); - $this->assertTrue($params[4]->isOptional() == false); - $this->assertTrue($params[5]->getName() == 'sDate'); - $this->assertTrue($params[5]->isArray() == false); - $this->assertTrue($params[5]->isOptional() == true); - $this->assertTrue($params[5]->getDefaultValue() == ''); - $this->assertTrue($params[6]->getName() == 'sCC'); - $this->assertTrue($params[6]->isArray() == false); - $this->assertTrue($params[6]->isOptional() == true); - $this->assertTrue($params[6]->getDefaultValue() == ''); - $this->assertTrue($params[7]->getName() == 'sBCC'); - $this->assertTrue($params[7]->isArray() == false); - $this->assertTrue($params[7]->isOptional() == true); - $this->assertTrue($params[7]->getDefaultValue() == ''); - $this->assertTrue($params[8]->getName() == 'sTemplate'); - $this->assertTrue($params[8]->isArray() == false); - $this->assertTrue($params[8]->isOptional() == true); - $this->assertTrue($params[8]->getDefaultValue() == ''); - $this->assertTrue($params[9]->getName() == 'aAttachment'); - $this->assertTrue($params[9]->isArray() == false); - $this->assertTrue($params[9]->isOptional() == true); - $this->assertTrue($params[9]->getDefaultValue() == array()); - } - - /** - * @covers spoolRun::sendMail - * @todo Implement testsendMail(). - */ - public function testsendMail() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('sendMail', $methods), 'exists method sendMail'); - $r = new ReflectionMethod('spoolRun', 'sendMail'); - $params = $r->getParameters(); - } - - /** - * @covers spoolRun::resendEmails - * @todo Implement testresendEmails(). - */ - public function testresendEmails() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('resendEmails', $methods), 'exists method resendEmails'); - $r = new ReflectionMethod('spoolRun', 'resendEmails'); - $params = $r->getParameters(); - } - - /** - * @covers spoolRun::getWarnings - * @todo Implement testgetWarnings(). - */ - public function testgetWarnings() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('getWarnings', $methods), 'exists method getWarnings'); - $r = new ReflectionMethod('spoolRun', 'getWarnings'); - $params = $r->getParameters(); - } - - /** - * @covers spoolRun::db_insert - * @todo Implement testdb_insert(). - */ - public function testdb_insert() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('db_insert', $methods), 'exists method db_insert'); - $r = new ReflectionMethod('spoolRun', 'db_insert'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'db_spool'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classstepDetailTest.php b/tests/automated/workflow/engine/classes/classstepDetailTest.php deleted file mode 100644 index 788eafdbf..000000000 --- a/tests/automated/workflow/engine/classes/classstepDetailTest.php +++ /dev/null @@ -1,77 +0,0 @@ -object = new stepDetail('nameSpace', 'stepId', 'stepName', 'stepTitle', 'setupStepPage'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('stepDetail'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers stepDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('stepDetail', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sStepId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sStepName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sStepTitle'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sSetupStepPage'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classtar_fileTest.php b/tests/automated/workflow/engine/classes/classtar_fileTest.php deleted file mode 100644 index 3d87a6596..000000000 --- a/tests/automated/workflow/engine/classes/classtar_fileTest.php +++ /dev/null @@ -1,101 +0,0 @@ -object = new tar_file('name'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('tar_file'); - $this->assertTrue( count($methods) == 16); - } - - /** - * @covers tar_file::tar_file - * @todo Implement testtar_file(). - */ - public function testtar_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('tar_file', $methods ), 'exists method tar_file' ); - $r = new ReflectionMethod('tar_file', 'tar_file'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers tar_file::create_tar - * @todo Implement testcreate_tar(). - */ - public function testcreate_tar() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('create_tar', $methods ), 'exists method create_tar' ); - $r = new ReflectionMethod('tar_file', 'create_tar'); - $params = $r->getParameters(); - } - - /** - * @covers tar_file::extract_files - * @todo Implement testextract_files(). - */ - public function testextract_files() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('extract_files', $methods ), 'exists method extract_files' ); - $r = new ReflectionMethod('tar_file', 'extract_files'); - $params = $r->getParameters(); - } - - /** - * @covers tar_file::open_archive - * @todo Implement testopen_archive(). - */ - public function testopen_archive() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' ); - $r = new ReflectionMethod('tar_file', 'open_archive'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php b/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php deleted file mode 100644 index da9cf59bb..000000000 --- a/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php +++ /dev/null @@ -1,76 +0,0 @@ -object = new taskExtendedProperty('sNamespace', 'sPage', 'sName', 'sIcon'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('taskExtendedProperty'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers taskExtendedProperty::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('taskExtendedProperty', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sPage'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sName'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - $this->assertTrue($params[3]->getName() == 'sIcon'); - $this->assertTrue($params[3]->isArray() == false); - $this->assertTrue($params[3]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classtoolbarDetailTest.php b/tests/automated/workflow/engine/classes/classtoolbarDetailTest.php deleted file mode 100644 index efad36f7d..000000000 --- a/tests/automated/workflow/engine/classes/classtoolbarDetailTest.php +++ /dev/null @@ -1,72 +0,0 @@ -object = new toolbarDetail(null, null, null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('toolbarDetail'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers toolbarDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('toolbarDetail', '__construct'); - - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'sNamespace'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'sToolbarId'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'sFilename'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classtriggerDetailTest.php b/tests/automated/workflow/engine/classes/classtriggerDetailTest.php deleted file mode 100644 index 5f2e8879f..000000000 --- a/tests/automated/workflow/engine/classes/classtriggerDetailTest.php +++ /dev/null @@ -1,74 +0,0 @@ -object = new triggerDetail($sNamespace, $sTriggerId, $sTriggerName); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('triggerDetail'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers triggerDetail::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('triggerDetail', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sTriggerId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTriggerName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classtriggerLibraryTest.php b/tests/automated/workflow/engine/classes/classtriggerLibraryTest.php deleted file mode 100644 index 0abfae28a..000000000 --- a/tests/automated/workflow/engine/classes/classtriggerLibraryTest.php +++ /dev/null @@ -1,172 +0,0 @@ -object = new triggerLibrary(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('triggerLibrary'); $this->assertTrue( count($methods) == 9); - } - - /** - * @covers triggerLibrary::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('triggerLibrary', '__construct'); - $params = $r->getParameters(); - } - - /** - * @covers triggerLibrary::getSingleton - * @todo Implement testgetSingleton(). - */ - public function testgetSingleton() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' ); - $r = new ReflectionMethod('triggerLibrary', 'getSingleton'); - $params = $r->getParameters(); - } - - /** - * @covers triggerLibrary::serializeInstance - * @todo Implement testserializeInstance(). - */ - public function testserializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('serializeInstance', $methods ), 'exists method serializeInstance' ); - $r = new ReflectionMethod('triggerLibrary', 'serializeInstance'); - $params = $r->getParameters(); - } - - /** - * @covers triggerLibrary::unSerializeInstance - * @todo Implement testunSerializeInstance(). - */ - public function testunSerializeInstance() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unSerializeInstance', $methods ), 'exists method unSerializeInstance' ); - $r = new ReflectionMethod('triggerLibrary', 'unSerializeInstance'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'serialized'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers triggerLibrary::registerFunctionsFileToLibrary - * @todo Implement testregisterFunctionsFileToLibrary(). - */ - public function testregisterFunctionsFileToLibrary() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('registerFunctionsFileToLibrary', $methods ), 'exists method registerFunctionsFileToLibrary' ); - $r = new ReflectionMethod('triggerLibrary', 'registerFunctionsFileToLibrary'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filePath'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'libraryName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers triggerLibrary::getMethodsFromLibraryFile - * @todo Implement testgetMethodsFromLibraryFile(). - */ - public function testgetMethodsFromLibraryFile() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getMethodsFromLibraryFile', $methods ), 'exists method getMethodsFromLibraryFile' ); - $r = new ReflectionMethod('triggerLibrary', 'getMethodsFromLibraryFile'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'file'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers triggerLibrary::getRegisteredClasses - * @todo Implement testgetRegisteredClasses(). - */ - public function testgetRegisteredClasses() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getRegisteredClasses', $methods ), 'exists method getRegisteredClasses' ); - $r = new ReflectionMethod('triggerLibrary', 'getRegisteredClasses'); - $params = $r->getParameters(); - } - - /** - * @covers triggerLibrary::getLibraryDefinition - * @todo Implement testgetLibraryDefinition(). - */ - public function testgetLibraryDefinition() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getLibraryDefinition', $methods ), 'exists method getLibraryDefinition' ); - $r = new ReflectionMethod('triggerLibrary', 'getLibraryDefinition'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'libraryClassName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers triggerLibrary::__destruct - * @todo Implement test__destruct(). - */ - public function test__destruct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__destruct', $methods ), 'exists method __destruct' ); - $r = new ReflectionMethod('triggerLibrary', '__destruct'); - $params = $r->getParameters(); - } - - } diff --git a/tests/automated/workflow/engine/classes/classuploadDocumentDataTest.php b/tests/automated/workflow/engine/classes/classuploadDocumentDataTest.php deleted file mode 100644 index c93e1660e..000000000 --- a/tests/automated/workflow/engine/classes/classuploadDocumentDataTest.php +++ /dev/null @@ -1,88 +0,0 @@ -object = new uploadDocumentData($sApplicationUid, - $sUserUid, $sFilename, $sFileTitle, $sDocumentUid); - - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('uploadDocumentData'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers uploadDocumentData::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('uploadDocumentData', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUserUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sFilename'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sFileTitle'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sDocumentUid'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'iVersion'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == true); - $this->assertTrue( $params[5]->getDefaultValue() == '1'); - } - - } diff --git a/tests/automated/workflow/engine/classes/classworkspaceToolsTest.php b/tests/automated/workflow/engine/classes/classworkspaceToolsTest.php deleted file mode 100644 index 38096ee44..000000000 --- a/tests/automated/workflow/engine/classes/classworkspaceToolsTest.php +++ /dev/null @@ -1,475 +0,0 @@ -object = new workspaceTools('$workspaceName'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('workspaceTools'); - $this->assertTrue( count($methods) == 28 ); - } - - /** - * @covers workspaceTools::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('workspaceTools', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'workspaceName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::workspaceExists - * @todo Implement testworkspaceExists(). - */ - public function testworkspaceExists() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('workspaceExists', $methods ), 'exists method workspaceExists' ); - $r = new ReflectionMethod('workspaceTools', 'workspaceExists'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::upgrade - * @todo Implement testupgrade(). - */ - public function testupgrade() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgrade', $methods ), 'exists method upgrade' ); - $r = new ReflectionMethod('workspaceTools', 'upgrade'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'first'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers workspaceTools::getDBInfo - * @todo Implement testgetDBInfo(). - */ - public function testgetDBInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDBInfo', $methods ), 'exists method getDBInfo' ); - $r = new ReflectionMethod('workspaceTools', 'getDBInfo'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::resetDBInfo - * @todo Implement testresetDBInfo(). - */ - public function testresetDBInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('resetDBInfo', $methods ), 'exists method resetDBInfo' ); - $r = new ReflectionMethod('workspaceTools', 'resetDBInfo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'newHost'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'resetDBNames'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::getDBCredentials - * @todo Implement testgetDBCredentials(). - */ - public function testgetDBCredentials() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getDBCredentials', $methods ), 'exists method getDBCredentials' ); - $r = new ReflectionMethod('workspaceTools', 'getDBCredentials'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'dbName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::initPropel - * @todo Implement testinitPropel(). - */ - public function testinitPropel() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('initPropel', $methods ), 'exists method initPropel' ); - $r = new ReflectionMethod('workspaceTools', 'initPropel'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'root'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers workspaceTools::upgradeTranslation - * @todo Implement testupgradeTranslation(). - */ - public function testupgradeTranslation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeTranslation', $methods ), 'exists method upgradeTranslation' ); - $r = new ReflectionMethod('workspaceTools', 'upgradeTranslation'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'first'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::close - * @todo Implement testclose(). - */ - public function testclose() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('close', $methods ), 'exists method close' ); - $r = new ReflectionMethod('workspaceTools', 'close'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::getSchema - * @todo Implement testgetSchema(). - */ - public function testgetSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getSchema', $methods ), 'exists method getSchema' ); - $r = new ReflectionMethod('workspaceTools', 'getSchema'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::upgradeCacheView - * @todo Implement testupgradeCacheView(). - */ - public function testupgradeCacheView() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeCacheView', $methods ), 'exists method upgradeCacheView' ); - $r = new ReflectionMethod('workspaceTools', 'upgradeCacheView'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'fill'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::upgradePluginsDatabase - * @todo Implement testupgradePluginsDatabase(). - */ - public function testupgradePluginsDatabase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradePluginsDatabase', $methods ), 'exists method upgradePluginsDatabase' ); - $r = new ReflectionMethod('workspaceTools', 'upgradePluginsDatabase'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::upgradeDatabase - * @todo Implement testupgradeDatabase(). - */ - public function testupgradeDatabase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeDatabase', $methods ), 'exists method upgradeDatabase' ); - $r = new ReflectionMethod('workspaceTools', 'upgradeDatabase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'checkOnly'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers workspaceTools::upgradeSchema - * @todo Implement testupgradeSchema(). - */ - public function testupgradeSchema() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeSchema', $methods ), 'exists method upgradeSchema' ); - $r = new ReflectionMethod('workspaceTools', 'upgradeSchema'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'schema'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'checkOnly'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - /** - * @covers workspaceTools::upgradeData - * @todo Implement testupgradeData(). - */ - public function testupgradeData() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('upgradeData', $methods ), 'exists method upgradeData' ); - $r = new ReflectionMethod('workspaceTools', 'upgradeData'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::updateThisRegistry - * @todo Implement testupdateThisRegistry(). - */ - public function testupdateThisRegistry() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('updateThisRegistry', $methods ), 'exists method updateThisRegistry' ); - $r = new ReflectionMethod('workspaceTools', 'updateThisRegistry'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'data'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::getMetadata - * @todo Implement testgetMetadata(). - */ - public function testgetMetadata() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getMetadata', $methods ), 'exists method getMetadata' ); - $r = new ReflectionMethod('workspaceTools', 'getMetadata'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::printSysInfo - * @todo Implement testprintSysInfo(). - */ - public function testprintSysInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printSysInfo', $methods ), 'exists method printSysInfo' ); - $r = new ReflectionMethod('workspaceTools', 'printSysInfo'); - $params = $r->getParameters(); - } - - /** - * @covers workspaceTools::printInfo - * @todo Implement testprintInfo(). - */ - public function testprintInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printInfo', $methods ), 'exists method printInfo' ); - $r = new ReflectionMethod('workspaceTools', 'printInfo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'fields'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers workspaceTools::printMetadata - * @todo Implement testprintMetadata(). - */ - public function testprintMetadata() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('printMetadata', $methods ), 'exists method printMetadata' ); - $r = new ReflectionMethod('workspaceTools', 'printMetadata'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'printSysInfo'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::exportDatabase - * @todo Implement testexportDatabase(). - */ - public function testexportDatabase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('exportDatabase', $methods ), 'exists method exportDatabase' ); - $r = new ReflectionMethod('workspaceTools', 'exportDatabase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'path'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::createBackup - * @todo Implement testcreateBackup(). - */ - public function testcreateBackup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createBackup', $methods ), 'exists method createBackup' ); - $r = new ReflectionMethod('workspaceTools', 'createBackup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'compress'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::backup - * @todo Implement testbackup(). - */ - public function testbackup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('backup', $methods ), 'exists method backup' ); - $r = new ReflectionMethod('workspaceTools', 'backup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'backupFile'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'compress'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == '1'); - } - - /** - * @covers workspaceTools::restoreLegacy - * @todo Implement testrestoreLegacy(). - */ - public function testrestoreLegacy() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restoreLegacy', $methods ), 'exists method restoreLegacy' ); - $r = new ReflectionMethod('workspaceTools', 'restoreLegacy'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'directory'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::getBackupInfo - * @todo Implement testgetBackupInfo(). - */ - public function testgetBackupInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getBackupInfo', $methods ), 'exists method getBackupInfo' ); - $r = new ReflectionMethod('workspaceTools', 'getBackupInfo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers workspaceTools::dirPerms - * @todo Implement testdirPerms(). - */ - public function testdirPerms() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('dirPerms', $methods ), 'exists method dirPerms' ); - $r = new ReflectionMethod('workspaceTools', 'dirPerms'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'group'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'perms'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers workspaceTools::restore - * @todo Implement testrestore(). - */ - public function testrestore() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('restore', $methods ), 'exists method restore' ); - $r = new ReflectionMethod('workspaceTools', 'restore'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'filename'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'srcWorkspace'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'dstWorkspace'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == true); - $this->assertTrue( $params[2]->getDefaultValue() == ''); - $this->assertTrue( $params[3]->getName() == 'overwrite'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == '1'); - } -} - diff --git a/tests/automated/workflow/engine/classes/classwsBaseTest.php b/tests/automated/workflow/engine/classes/classwsBaseTest.php deleted file mode 100644 index 427f60f76..000000000 --- a/tests/automated/workflow/engine/classes/classwsBaseTest.php +++ /dev/null @@ -1,687 +0,0 @@ -object = new wsBase(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsBase'); - $this->assertTrue( count($methods) == 43); - } - - /** - * @covers wsBase::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('wsBase', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'params'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == true); - $this->assertTrue( $params[0]->getDefaultValue() == ''); - } - - /** - * @covers wsBase::login - * @todo Implement testlogin(). - */ - public function testlogin() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('login', $methods ), 'exists method login' ); - $r = new ReflectionMethod('wsBase', 'login'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'password'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::processList - * @todo Implement testprocessList(). - */ - public function testprocessList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('processList', $methods ), 'exists method processList' ); - $r = new ReflectionMethod('wsBase', 'processList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::roleList - * @todo Implement testroleList(). - */ - public function testroleList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('roleList', $methods ), 'exists method roleList' ); - $r = new ReflectionMethod('wsBase', 'roleList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::groupList - * @todo Implement testgroupList(). - */ - public function testgroupList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('groupList', $methods ), 'exists method groupList' ); - $r = new ReflectionMethod('wsBase', 'groupList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::departmentList - * @todo Implement testdepartmentList(). - */ - public function testdepartmentList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('departmentList', $methods ), 'exists method departmentList' ); - $r = new ReflectionMethod('wsBase', 'departmentList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::caseList - * @todo Implement testcaseList(). - */ - public function testcaseList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('caseList', $methods ), 'exists method caseList' ); - $r = new ReflectionMethod('wsBase', 'caseList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::unassignedCaseList - * @todo Implement testunassignedCaseList(). - */ - public function testunassignedCaseList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('unassignedCaseList', $methods ), 'exists method unassignedCaseList' ); - $r = new ReflectionMethod('wsBase', 'unassignedCaseList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::userList - * @todo Implement testuserList(). - */ - public function testuserList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('userList', $methods ), 'exists method userList' ); - $r = new ReflectionMethod('wsBase', 'userList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::triggerList - * @todo Implement testtriggerList(). - */ - public function testtriggerList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('triggerList', $methods ), 'exists method triggerList' ); - $r = new ReflectionMethod('wsBase', 'triggerList'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::inputDocumentList - * @todo Implement testinputDocumentList(). - */ - public function testinputDocumentList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('inputDocumentList', $methods ), 'exists method inputDocumentList' ); - $r = new ReflectionMethod('wsBase', 'inputDocumentList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUserUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::inputDocumentProcessList - * @todo Implement testinputDocumentProcessList(). - */ - public function testinputDocumentProcessList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('inputDocumentProcessList', $methods ), 'exists method inputDocumentProcessList' ); - $r = new ReflectionMethod('wsBase', 'inputDocumentProcessList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sProcessUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::outputDocumentList - * @todo Implement testoutputDocumentList(). - */ - public function testoutputDocumentList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('outputDocumentList', $methods ), 'exists method outputDocumentList' ); - $r = new ReflectionMethod('wsBase', 'outputDocumentList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sApplicationUID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sUserUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::removeDocument - * @todo Implement testremoveDocument(). - */ - public function testremoveDocument() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeDocument', $methods ), 'exists method removeDocument' ); - $r = new ReflectionMethod('wsBase', 'removeDocument'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'appDocUid'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::taskList - * @todo Implement testtaskList(). - */ - public function testtaskList() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskList', $methods ), 'exists method taskList' ); - $r = new ReflectionMethod('wsBase', 'taskList'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::sendMessage - * @todo Implement testsendMessage(). - */ - public function testsendMessage() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendMessage', $methods ), 'exists method sendMessage' ); - $r = new ReflectionMethod('wsBase', 'sendMessage'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sFrom'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sTo'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sCc'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'sBcc'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'sSubject'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - $this->assertTrue( $params[6]->getName() == 'sTemplate'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == false); - $this->assertTrue( $params[7]->getName() == 'appFields'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - $this->assertTrue( $params[8]->getName() == 'aAttachment'); - $this->assertTrue( $params[8]->isArray() == false); - $this->assertTrue( $params[8]->isOptional () == true); - $this->assertTrue( $params[8]->getDefaultValue() == ''); - } - - /** - * @covers wsBase::getCaseInfo - * @todo Implement testgetCaseInfo(). - */ - public function testgetCaseInfo() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseInfo', $methods ), 'exists method getCaseInfo' ); - $r = new ReflectionMethod('wsBase', 'getCaseInfo'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'iDelIndex'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::createUser - * @todo Implement testcreateUser(). - */ - public function testcreateUser() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createUser', $methods ), 'exists method createUser' ); - $r = new ReflectionMethod('wsBase', 'createUser'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'firstName'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'lastName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'email'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'role'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - $this->assertTrue( $params[5]->getName() == 'password'); - $this->assertTrue( $params[5]->isArray() == false); - $this->assertTrue( $params[5]->isOptional () == false); - $this->assertTrue( $params[6]->getName() == 'dueDate'); - $this->assertTrue( $params[6]->isArray() == false); - $this->assertTrue( $params[6]->isOptional () == true); - $this->assertTrue( $params[6]->getDefaultValue() == ''); - $this->assertTrue( $params[7]->getName() == 'status'); - $this->assertTrue( $params[7]->isArray() == false); - $this->assertTrue( $params[7]->isOptional () == true); - $this->assertTrue( $params[7]->getDefaultValue() == ''); - } - - /** - * @covers wsBase::createGroup - * @todo Implement testcreateGroup(). - */ - public function testcreateGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createGroup', $methods ), 'exists method createGroup' ); - $r = new ReflectionMethod('wsBase', 'createGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'groupName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::createDepartment - * @todo Implement testcreateDepartment(). - */ - public function testcreateDepartment() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('createDepartment', $methods ), 'exists method createDepartment' ); - $r = new ReflectionMethod('wsBase', 'createDepartment'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'departmentName'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'parentUID'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::removeUserFromGroup - * @todo Implement testremoveUserFromGroup(). - */ - public function testremoveUserFromGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('removeUserFromGroup', $methods ), 'exists method removeUserFromGroup' ); - $r = new ReflectionMethod('wsBase', 'removeUserFromGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'groupId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::assignUserToGroup - * @todo Implement testassignUserToGroup(). - */ - public function testassignUserToGroup() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignUserToGroup', $methods ), 'exists method assignUserToGroup' ); - $r = new ReflectionMethod('wsBase', 'assignUserToGroup'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'groupId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::assignUserToDepartment - * @todo Implement testassignUserToDepartment(). - */ - public function testassignUserToDepartment() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('assignUserToDepartment', $methods ), 'exists method assignUserToDepartment' ); - $r = new ReflectionMethod('wsBase', 'assignUserToDepartment'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'depId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'manager'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers wsBase::sendVariables - * @todo Implement testsendVariables(). - */ - public function testsendVariables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('sendVariables', $methods ), 'exists method sendVariables' ); - $r = new ReflectionMethod('wsBase', 'sendVariables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'variables'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::getVariables - * @todo Implement testgetVariables(). - */ - public function testgetVariables() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVariables', $methods ), 'exists method getVariables' ); - $r = new ReflectionMethod('wsBase', 'getVariables'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'variables'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsBase::getVariablesNames - * @todo Implement testgetVariablesNames(). - */ - public function testgetVariablesNames() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getVariablesNames', $methods ), 'exists method getVariablesNames' ); - $r = new ReflectionMethod('wsBase', 'getVariablesNames'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::newCase - * @todo Implement testnewCase(). - */ - public function testnewCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newCase', $methods ), 'exists method newCase' ); - $r = new ReflectionMethod('wsBase', 'newCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'processId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'userId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'taskId'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'variables'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers wsBase::newCaseImpersonate - * @todo Implement testnewCaseImpersonate(). - */ - public function testnewCaseImpersonate() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('newCaseImpersonate', $methods ), 'exists method newCaseImpersonate' ); - $r = new ReflectionMethod('wsBase', 'newCaseImpersonate'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'processId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'userId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'variables'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - /** - * @covers wsBase::derivateCase - * @todo Implement testderivateCase(). - */ - public function testderivateCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('derivateCase', $methods ), 'exists method derivateCase' ); - $r = new ReflectionMethod('wsBase', 'derivateCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'caseId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'delIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'bExecuteTriggersBeforeAssignment'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == true); - $this->assertTrue( $params[3]->getDefaultValue() == ''); - } - - /** - * @covers wsBase::executeTrigger - * @todo Implement testexecuteTrigger(). - */ - public function testexecuteTrigger() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('executeTrigger', $methods ), 'exists method executeTrigger' ); - $r = new ReflectionMethod('wsBase', 'executeTrigger'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'caseId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'triggerIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'delIndex'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } - - /** - * @covers wsBase::taskCase - * @todo Implement testtaskCase(). - */ - public function testtaskCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('taskCase', $methods ), 'exists method taskCase' ); - $r = new ReflectionMethod('wsBase', 'taskCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'caseId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::processListVerified - * @todo Implement testprocessListVerified(). - */ - public function testprocessListVerified() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('processListVerified', $methods ), 'exists method processListVerified' ); - $r = new ReflectionMethod('wsBase', 'processListVerified'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'userId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsBase::reassignCase - * @todo Implement testreassignCase(). - */ - public function testreassignCase() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('reassignCase', $methods ), 'exists method reassignCase' ); - $r = new ReflectionMethod('wsBase', 'reassignCase'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sessionId'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'caseId'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'delIndex'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'userIdSource'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - $this->assertTrue( $params[4]->getName() == 'userIdTarget'); - $this->assertTrue( $params[4]->isArray() == false); - $this->assertTrue( $params[4]->isOptional () == false); - } - - /** - * @covers wsBase::systemInformation - * @todo Implement testsystemInformation(). - */ - public function testsystemInformation() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('systemInformation', $methods ), 'exists method systemInformation' ); - $r = new ReflectionMethod('wsBase', 'systemInformation'); - $params = $r->getParameters(); - } - - /** - * @covers wsBase::getCaseNotes - * @todo Implement testgetCaseNotes(). - */ - public function testgetCaseNotes() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getCaseNotes', $methods ), 'exists method getCaseNotes' ); - $r = new ReflectionMethod('wsBase', 'getCaseNotes'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'applicationID'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'userUid'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == true); - $this->assertTrue( $params[1]->getDefaultValue() == ''); - } - - } diff --git a/tests/automated/workflow/engine/classes/classwsCreateDepartmentResponseTest.php b/tests/automated/workflow/engine/classes/classwsCreateDepartmentResponseTest.php deleted file mode 100644 index fab89cc7d..000000000 --- a/tests/automated/workflow/engine/classes/classwsCreateDepartmentResponseTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new wsCreateDepartmentResponse('status', 'message', 'departmentUID'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsCreateDepartmentResponse'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers wsCreateDepartmentResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('wsCreateDepartmentResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'message'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'departmentUID'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classwsCreateGroupResponseTest.php b/tests/automated/workflow/engine/classes/classwsCreateGroupResponseTest.php deleted file mode 100644 index dfcb5e75f..000000000 --- a/tests/automated/workflow/engine/classes/classwsCreateGroupResponseTest.php +++ /dev/null @@ -1,73 +0,0 @@ -object = new wsCreateGroupResponse('status', 'message', 'groupUID'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsCreateGroupResponse'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers wsCreateGroupResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('wsCreateGroupResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'status'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'message'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'groupUID'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classwsCreateUserResponseTest.php b/tests/automated/workflow/engine/classes/classwsCreateUserResponseTest.php deleted file mode 100644 index d6ed03145..000000000 --- a/tests/automated/workflow/engine/classes/classwsCreateUserResponseTest.php +++ /dev/null @@ -1,73 +0,0 @@ -object = new wsCreateUserResponse('status', 'message', 'groupUID'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsCreateUserResponse'); - $this->assertTrue(count($methods) == 1); - } - - /** - * @covers wsCreateUserResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); - $r = new ReflectionMethod('wsCreateUserResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue($params[0]->getName() == 'status'); - $this->assertTrue($params[0]->isArray() == false); - $this->assertTrue($params[0]->isOptional() == false); - $this->assertTrue($params[1]->getName() == 'message'); - $this->assertTrue($params[1]->isArray() == false); - $this->assertTrue($params[1]->isOptional() == false); - $this->assertTrue($params[2]->getName() == 'userUID'); - $this->assertTrue($params[2]->isArray() == false); - $this->assertTrue($params[2]->isOptional() == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classwsGetCaseNotesResponseTest.php b/tests/automated/workflow/engine/classes/classwsGetCaseNotesResponseTest.php deleted file mode 100644 index bbfcd6ef3..000000000 --- a/tests/automated/workflow/engine/classes/classwsGetCaseNotesResponseTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new wsGetCaseNotesResponse(0, 'message', array()); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsGetCaseNotesResponse'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers wsGetCaseNotesResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('wsGetCaseNotesResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'message'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'notes'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } -} - diff --git a/tests/automated/workflow/engine/classes/classwsGetVariableResponseTest.php b/tests/automated/workflow/engine/classes/classwsGetVariableResponseTest.php deleted file mode 100644 index fd87c6d27..000000000 --- a/tests/automated/workflow/engine/classes/classwsGetVariableResponseTest.php +++ /dev/null @@ -1,71 +0,0 @@ -object = new wsGetVariableResponse('status','message','variables'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsGetVariableResponse'); - $this->assertTrue( count($methods) == 1); - } - - /** - * @covers wsGetVariableResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('wsGetVariableResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'message'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'variables'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - } - - } diff --git a/tests/automated/workflow/engine/classes/classwsResponseTest.php b/tests/automated/workflow/engine/classes/classwsResponseTest.php deleted file mode 100644 index 02031aece..000000000 --- a/tests/automated/workflow/engine/classes/classwsResponseTest.php +++ /dev/null @@ -1,95 +0,0 @@ -object = new wsResponse(0, null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('wsResponse'); - $this->assertTrue(count($methods) == 3); - } - - /** - * @covers wsResponse::__construct - * @todo Implement test__construct(). - */ - public function test__construct() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); - $r = new ReflectionMethod('wsResponse', '__construct'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'status'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'message'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - - /** - * @covers wsResponse::getPayloadString - * @todo Implement testgetPayloadString(). - */ - public function testgetPayloadString() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPayloadString', $methods ), 'exists method getPayloadString' ); - $r = new ReflectionMethod('wsResponse', 'getPayloadString'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'operation'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers wsResponse::getPayloadArray - * @todo Implement testgetPayloadArray(). - */ - public function testgetPayloadArray() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('getPayloadArray', $methods ), 'exists method getPayloadArray' ); - $r = new ReflectionMethod('wsResponse', 'getPayloadArray'); - $params = $r->getParameters(); - } -} - diff --git a/tests/automated/workflow/engine/classes/classzip_fileTest.php b/tests/automated/workflow/engine/classes/classzip_fileTest.php deleted file mode 100644 index fe7fae8b8..000000000 --- a/tests/automated/workflow/engine/classes/classzip_fileTest.php +++ /dev/null @@ -1,77 +0,0 @@ -object = new zip_file('filezip'); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * This is the default method to test, if the class still having - * the same number of methods. - */ - public function testNumberOfMethodsInThisClass() - { - $methods = get_class_methods('zip_file'); - $this->assertTrue( count($methods) == 14); - } - - /** - * @covers zip_file::zip_file - * @todo Implement testzip_file(). - */ - public function testzip_file() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('zip_file', $methods ), 'exists method zip_file' ); - $r = new ReflectionMethod('zip_file', 'zip_file'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'name'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - } - - /** - * @covers zip_file::create_zip - * @todo Implement testcreate_zip(). - */ - public function testcreate_zip() - { - $methods = get_class_methods($this->object); - $this->assertTrue( in_array('create_zip', $methods ), 'exists method create_zip' ); - $r = new ReflectionMethod('zip_file', 'create_zip'); - $params = $r->getParameters(); - } - - } diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index c54e11d21..000000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,137 +0,0 @@ - - 4.0.0 - - com.colosa.qa.automation - pm3FunctionalTests - 1.0-SNAPSHOT - jar - - pm3FunctionalTests - http://maven.apache.org - - - UTF-8 - UTF-8 - - - - - junit - junit - 4.11 - - - - - - org.seleniumhq.selenium - selenium-java - 2.39.0 - - - - com.itextpdf - itextpdf - 5.1.3 - jar - - - - com.itextpdf.tool - xmlworker - 1.1.1 - jar - - - - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - true - ${JAVA_JDK_1_7_JAVAC} - UTF-8 - 1.7 - 1.7 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.16 - - - **/TestSuiteAll.java - - - - - - org.apache.maven.surefire - surefire-junit47 - 2.16 - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.16 - - - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.16 - - - - - - diff --git a/tests/functional/src/main/app.conf b/tests/functional/src/main/app.conf deleted file mode 100644 index 56c484847..000000000 --- a/tests/functional/src/main/app.conf +++ /dev/null @@ -1 +0,0 @@ -#This file must be filled with the configuration settings for the application diff --git a/tests/functional/src/main/default.conf b/tests/functional/src/main/default.conf deleted file mode 100644 index f586bd250..000000000 --- a/tests/functional/src/main/default.conf +++ /dev/null @@ -1,27 +0,0 @@ -#Default Browser connection Data -server.url=http://192.168.11.188/ -#browser.name: chrome, firefox, ie -browser.name=firefox -#browser.mode: local, remote -browser.mode=local -#browser.version=22 -#WINDOWS, MAC, LINUX -browser.platform=WINDOWS -#remote.server -remote.server.url=http://192.168.11.169:4444/wd/hub -debug.enable=1 -permissions.file.upload=archivo.txt -implicit.wait.seconds=10 - -#testing browsers (firefox, chrome, ie) -browser.count=1 -browser.browser1=firefox -browser.platform1=WINDOWS -#browser.version1=23 -browser.browser2=chrome -browser.platform2=WINDOWS -#browser.version2=22 -browser.browser3=ie -browser.platform3=WINDOWS -#browser.version3=22 - diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Browser.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/Browser.java deleted file mode 100644 index eba97a52e..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Browser.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.colosa.qa.automatization.common; - -/* -public class Browser { - - private static WebDriver _driver = null; - private static BrowserInstance _browserInstance = null; - private static long _timeoutSeconds = 0; - - - public static void checkBrowserSettingsFromSystemProperties() throws IOException { - //Read browser information from default page this is done in the constructor of Browsersettings - - //Read browser information from registry - //-Dbrowser.settings=1 -Dbrowser.mode=local -Dbrowser.name=firefox - //-Dbrowser.settings=1 -Dbrowser.mode=remote -Dbrowser.name=firefox -Dremote.server.url=http:// browser.version= - //if variable set from system properties overrride configuration of browser - String setBrowserSettings = System.getProperty("browser.settings"); - - if(setBrowserSettings != null){ - System.out.printf("User Browser Settings detected\n"); - String browserMode = System.getProperty("browser.mode"); - BrowserConfiguration.getInstance().setBrowserMode(browserMode); - String browserName = System.getProperty("browser.name"); - BrowserConfiguration.getInstance().setBrowserName(browserName); - - System.out.printf(" Browser Mode: %s, Browser Name: %s \n", - browserMode, browserName); - - if(browserMode.equals("remote")){ - String browserVersion = System.getProperty("browser.version"); - BrowserConfiguration.getInstance().setBrowserVersion(browserVersion); - String browserPlatform = System.getProperty("browser.platform"); - BrowserConfiguration.getInstance().setBrowserPlatform(browserPlatform); - String remoteServerUrl = System.getProperty("remote.server.url"); - BrowserConfiguration.getInstance().setRemoteServerUrl(remoteServerUrl); - - System.out.printf(" Browser Version: %s, Browser Platform: %s, Remote Server URL:%s\n", - browserVersion, browserPlatform, remoteServerUrl ); - - } - } - - } - - // - * Create a default instance of the browser using default configuration from registry - * @return Return the instance of the browser created by default - * @throws FileNotFoundException - * @throws IOException - // - public static WebDriver driver() throws FileNotFoundException, IOException{ - if(_driver == null){ - System.out.printf("Create New Browser instance.\n"); - - checkBrowserSettingsFromSystemProperties(); - - - String browserMode = BrowserConfiguration.getInstance().getBrowserMode(); //ConfigurationSettings.getInstance().getSetting("browser.mode"); - String browserName = "firefox"; - - browserName = BrowserConfiguration.getInstance().getBrowserName(); - - if(browserMode.equals("local")){ - _browserInstance = new BrowserInstance(browserMode, browserName, "", "", ""); - _driver = _browserInstance.getInstanceDriver(); - } - - if(browserMode.equals("remote")){ - String browserVersion = BrowserConfiguration.getInstance().getBrowserVersion();//ConfigurationSettings.getInstance().getSetting("browser.version"); - String browserPlatform = BrowserConfiguration.getInstance().getBrowserPlatform();//ConfigurationSettings.getInstance().getSetting("browser.platform"); - String remoteServerUrl = BrowserConfiguration.getInstance().getRemoteServerUrl();//ConfigurationSettings.getInstance().getSetting("remote.server.url"); - - System.out.printf("Remote browser:%s, version:%s, platform:%s, url:%s \n", - browserName, browserVersion, browserPlatform, remoteServerUrl); - - _browserInstance = new BrowserInstance(browserMode, browserName, browserVersion, browserPlatform, remoteServerUrl); - - _driver = _browserInstance.getInstanceDriver(); - } - } - return _driver; - } - - - - public static void maximize(){ - _browserInstance.maximize(); - } - - public static void gotoUrl(String url){ - _browserInstance.gotoUrl(url); - } - - public static String title(){ - return _browserInstance.title(); - } - - public static void close(){ - _browserInstance.quit(); - - _driver = null; - _browserInstance = null; - } - - public static void quit(){ - _browserInstance.quit(); - _driver = null; - _browserInstance = null; - } - - public static By getBySearchCriteria(String str, Object... args) throws Exception{ - return _browserInstance.getBySearchCriteria(str, args); - } - - public static By getBySearchCriteriaUsingCriteria(String searchCriteria) throws Exception{ - return _browserInstance.getBySearchCriteriaUsingCriteria(searchCriteria); - } - - public static WebElement getParent(WebElement element) throws Exception{ - return _browserInstance.getParent(element); - } - - public static WebElement getElement(String str) throws Exception{ - return _browserInstance.getElement(str); - } - - public static List getElements(String str) throws Exception{ - return _browserInstance.getElements(str); - } - - public static WebElement getElementf(String str, Object... args) throws Exception{ - return _browserInstance.getElementf(str, args); - } - - public static Boolean elementExists(String key, int occurrences) throws Exception{ - return _browserInstance.elementExists(key, occurrences); - } - - public static Boolean elementExists(String key) throws Exception{ - return _browserInstance.elementExists(key); - } - - public static Boolean elementExistsSearchCriteria(String searchCriteria, int occurrences) throws Exception{ - return _browserInstance.elementExistsSearchCriteria(searchCriteria, occurrences); - } - - public static Boolean elementExistsSearchCriteria(String searchCriteria) throws Exception{ - return _browserInstance.elementExistsSearchCriteria(searchCriteria); - } - - public static Boolean waitForElement(By elementLocator, long timeoutSeconds) throws Exception{ - - return _browserInstance.waitForElement(elementLocator, timeoutSeconds); - } - - public static void waitForElement(String key, long timeoutSeconds) throws Exception{ - _browserInstance.waitForElement(key, timeoutSeconds); - } - - public static List getPreviousSimblingElements(WebElement currentElement){ - return _browserInstance.getPreviousSimblingElements(currentElement); - } -} */ \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserConfiguration.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserConfiguration.java deleted file mode 100644 index 9d644e220..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserConfiguration.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.colosa.qa.automatization.common; - -import java.io.IOException; - -/** - * Created with IntelliJ IDEA. - * User: Herbert Saal - * Date: 3/8/13 - * Time: 5:16 PM - * To change this template use File | Settings | File Templates. - */ -public class BrowserConfiguration { - private static BrowserConfiguration ourInstance = new BrowserConfiguration(); - - public static BrowserConfiguration getInstance() { - return ourInstance; - } - - private BrowserConfiguration() { - //init browser configuration by default - try { - getBrowserMode(); - getBrowserName(); - getBrowserVersion(); - getBrowserPlatform(); - getRemoteServerUrl(); - } catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - - } - - public String getBrowserMode() throws IOException { - //read configuration from registry if not found read from configuration file and store in registry - String browserMode = (String)Registry.getInstance().getReference("browser.mode"); - if(browserMode == null){ - browserMode = ConfigurationSettings.getInstance().getSetting("browser.mode"); - Registry.getInstance().register("browser.mode", browserMode); - } - - return browserMode; - - } - - public void setBrowserMode(String browserMode) throws IOException { - //set configuration in registry - Registry.getInstance().register("browser.mode", browserMode); - } - - public String getBrowserName() throws IOException { - String browserName = (String)Registry.getInstance().getReference("browser.name"); - if(browserName == null){ - browserName = ConfigurationSettings.getInstance().getSetting("browser.name"); - Registry.getInstance().register("browser.name", browserName); - } - - return browserName; - } - - public void setBrowserName(String browserName) throws IOException { - //set configuration in registry - Registry.getInstance().register("browser.name", browserName); - } - - public String getBrowserVersion() throws IOException { - String browserVersion = (String)Registry.getInstance().getReference("browser.version"); - if(browserVersion == null){ - browserVersion = ConfigurationSettings.getInstance().getSetting("browser.version"); - Registry.getInstance().register("browser.version", browserVersion); - } - - return browserVersion; - } - - public void setBrowserVersion(String browserVersion) throws IOException { - //set configuration in registry - Registry.getInstance().register("browser.version", browserVersion); - } - - public String getBrowserPlatform() throws IOException { - String browserPlatform = (String)Registry.getInstance().getReference("browser.platform"); - if(browserPlatform == null){ - browserPlatform = ConfigurationSettings.getInstance().getSetting("browser.platform"); - Registry.getInstance().register("browser.platform", browserPlatform); - } - return browserPlatform; - } - - public void setBrowserPlatform(String browserPlatform) throws IOException { - //set configuration in registry - Registry.getInstance().register("browser.platform", browserPlatform); - } - - public String getRemoteServerUrl() throws IOException { - String remoteServerUrl = (String)Registry.getInstance().getReference("remote.server.url"); - if(remoteServerUrl == null){ - remoteServerUrl = ConfigurationSettings.getInstance().getSetting("remote.server.url"); - Registry.getInstance().register("remote.server.url", remoteServerUrl); - } - - return remoteServerUrl; - } - - public void setRemoteServerUrl(String remoteServerUrl) throws IOException { - //set configuration in registry - Registry.getInstance().register("remote.server.url", remoteServerUrl); - } - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserInstance.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserInstance.java deleted file mode 100644 index 5f6d8449c..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserInstance.java +++ /dev/null @@ -1,599 +0,0 @@ -package com.colosa.qa.automatization.common; - -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.firefox.FirefoxDriver; -import org.openqa.selenium.ie.InternetExplorerDriver; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.remote.RemoteWebDriver; -import org.openqa.selenium.support.ui.ExpectedCondition; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.Wait; -import org.openqa.selenium.support.ui.WebDriverWait; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; -import java.util.concurrent.TimeUnit; - -public class BrowserInstance { - - private WebDriver _instanceDriver = null; - private int _implicitWaitSeconds = 0; - - /** - * Get default Browser Settings - * @param browserName The default configuration for the specified browser, if empty default browser is used. - * @return BrowserSettings object - * @throws IOException - */ - public static BrowserSettings getDefaultBrowserSettings(String browserName) throws IOException { - int browserCount = 1; - BrowserSettings browserSettings = new BrowserSettings(); - - List browserSettingsList = null; - - //set browser information from configuration file - //check if the browsername is empty then default browser is used. - if(browserName.equals("")){ - browserSettings = readBrowserSettings(0); - - //Read browser information from registry and update in object - //-Dbrowser.settings=1 -Dbrowser.mode=local -Dbrowser.name=firefox - //-Dbrowser.settings=1 -Dbrowser.mode=remote -Dbrowser.name=firefox -Dremote.server.url=http:// browser.version= - //if variable set from system properties override configuration of browser - String setBrowserSettings = System.getProperty("browser.settings"); - - if(setBrowserSettings != null){ - System.out.printf("User Browser Settings detected\n"); - browserSettings.setBrowserMode(System.getProperty("browser.mode")); - browserSettings.setBrowserName(System.getProperty("browser.name")); - browserSettings.setBrowserVersion(System.getProperty("browser.version")); - browserSettings.setBrowserPlatform(System.getProperty("browser.platform")); - browserSettings.setRemoteServerUrl(System.getProperty("remote.server.url")); - } - } - else{ - //get configuration specific for the specified browser - browserCount = Integer.parseInt(ConfigurationSettings.getInstance().getSetting("browser.count")); - for (int i = 1; i <= browserCount; i++){ - BrowserSettings auxBrowserSettings = readBrowserSettings(i); - //browserSettingsList.add(readBrowserSettings(i)); - - if(auxBrowserSettings.getBrowserName().equals(browserName)){ - browserSettings = auxBrowserSettings; - break; - } - } - } - - Logger.addLog("getDefaultBrowserSettings . " + browserSettings.toString()); - - return browserSettings; - } - - /** - * Read the browser configuration from configuration file - * @param browserNumber 0 use the default browser - * @return - */ - public static BrowserSettings readBrowserSettings(Integer browserNumber) throws IOException { - BrowserSettings browserSettings = new BrowserSettings(); - if(browserNumber == 0){ - browserSettings.setBrowserMode(ConfigurationSettings.getInstance().getSetting("browser.mode")); - browserSettings.setBrowserName(ConfigurationSettings.getInstance().getSetting("browser.name")); - browserSettings.setBrowserVersion(ConfigurationSettings.getInstance().getSetting("browser.version")); - browserSettings.setBrowserPlatform(ConfigurationSettings.getInstance().getSetting("browser.platform")); - browserSettings.setRemoteServerUrl(ConfigurationSettings.getInstance().getSetting("remote.server.url")); - } - else{ - browserSettings.setBrowserMode(ConfigurationSettings.getInstance().getSetting("browser.mode")); - browserSettings.setBrowserName(ConfigurationSettings.getInstance().getSetting("browser.browser" + (browserNumber))); - browserSettings.setBrowserVersion(ConfigurationSettings.getInstance().getSetting("browser.version" + (browserNumber))); - browserSettings.setBrowserPlatform(ConfigurationSettings.getInstance().getSetting("browser.platform" + (browserNumber))); - browserSettings.setRemoteServerUrl(ConfigurationSettings.getInstance().getSetting("remote.server.url")); - } - - return browserSettings; - } - - public BrowserInstance(BrowserSettings browserSettings) throws MalformedURLException { - this(browserSettings.getBrowserMode(), browserSettings.getBrowserName(), - browserSettings.getBrowserVersion(), browserSettings.getBrowserPlatform(), - browserSettings.getRemoteServerUrl()); - - } - - public BrowserInstance(String browserMode, String browserName, String browserVersion, String browserPlatform, String remoteServerUrl) throws MalformedURLException { - //create a new instance of the Browser - - if(browserMode.equals("local")){ - if(browserName.equals("chrome")){ - //start chrome maximized by default, -// ChromeOptions options = new ChromeOptions(); -// options.addArguments("--start-maximized"); -// -// _instanceDriver = new ChromeDriver(options); - _instanceDriver = new ChromeDriver(); - } - if(browserName.equals("ie")){ - _instanceDriver = new InternetExplorerDriver(); - } - if(browserName.equals("firefox")){ - //FirefoxProfile profile = allProfiles.getProfile("develop"); - DesiredCapabilities firefox = DesiredCapabilities.firefox(); - firefox.setCapability("elementScrollBehavior", 1); - //firefox.setCapability(FirefoxDriver.PROFILE, profile); - _instanceDriver = new FirefoxDriver(firefox); - } - - } - - if(browserMode.equals("remote")){ - - System.out.printf("Instance Remote browser:%s, version:%s, platform:%s, url:%s \n", - browserName, browserVersion, browserPlatform, remoteServerUrl); - - DesiredCapabilities desiredCapabilities = new DesiredCapabilities(); - - if(browserName.equals("chrome")){ - //start chrome maximized by default -// ChromeOptions options = new ChromeOptions(); -// options.addArguments("--start-maximized"); - - desiredCapabilities = DesiredCapabilities.chrome(); - -// desiredCapabilities.setCapability(ChromeOptions.CAPABILITY, options); - }else if(browserName.equals("ie")){ - desiredCapabilities = DesiredCapabilities.internetExplorer(); - }else if(browserName.equals("firefox")){ - desiredCapabilities = DesiredCapabilities.firefox(); - desiredCapabilities.setCapability("elementScrollBehavior", 1); - } - - if(browserVersion != null && !browserVersion.equals("")){ - desiredCapabilities.setVersion(browserVersion); - } - - if(browserPlatform != null && !browserPlatform.equals("")){ - if(browserPlatform.equals("WINDOWS")){ - desiredCapabilities.setPlatform(Platform.WINDOWS); - }else if(browserPlatform.equals("LINUX")){ - desiredCapabilities.setPlatform(Platform.LINUX); - }else if(browserPlatform.equals("MAC")){ - desiredCapabilities.setPlatform(Platform.MAC); - } - }else{ - desiredCapabilities.setPlatform(Platform.ANY); - } - - URL url=new URL(remoteServerUrl); - - _instanceDriver = new RemoteWebDriver(url, desiredCapabilities); - } - - //maximize browser by default - maximize(); - } - - public WebDriver getInstanceDriver(){ - return _instanceDriver; - } - - public void gotoUrl(String url){ - _instanceDriver.get(url); - } - - public String title(){ - return _instanceDriver.getTitle(); - } - - public void close(){ - _instanceDriver.close(); - } - - public void quit(){ - _instanceDriver.quit(); - } - - public void maximize(){ - - _instanceDriver.manage().window().maximize(); - - } - - public void switchToDefaultContent(){ - _instanceDriver.switchTo().defaultContent(); - } - - public void switchToFrame(String frame){ - _instanceDriver.switchTo().frame(frame); - } - - public Alert switchToAlert(){ - return _instanceDriver.switchTo().alert(); - } - - public int getImplicitWaitSeconds(){ - return _implicitWaitSeconds; - } - - public void setImplicitWait(int seconds){ - _implicitWaitSeconds = seconds; - - _instanceDriver.manage().timeouts().implicitlyWait(_implicitWaitSeconds, TimeUnit.SECONDS); - } - - public void turnOffImplicitWaits() { - _instanceDriver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); - } - - public void turnOnImplicitWaits() { - _instanceDriver.manage().timeouts().implicitlyWait(_implicitWaitSeconds, TimeUnit.SECONDS); - } - - public By getBySearchCriteria(String str, Object... args) throws Exception{ - By by = null; - - String key = str; - if(str==null) - throw new Exception("The the search criteria must be specified"); - - if(str.lastIndexOf(Constant.SEARCH_CRITERIA_SEPARATOR)==-1) { - str = ConfigurationSettings.getInstance().getSetting(str); - - if(str == null) - throw new Exception("There's no value for the key: "+key); - - str = String.format(str, args); - - if(str.lastIndexOf(Constant.SEARCH_CRITERIA_SEPARATOR)==-1) - throw new Exception("The search prefix to find the element must be specified"); - } - - by = this.getBySearchCriteriaUsingCriteria(str); - - return by; - } - - public By getBySearchCriteriaUsingCriteria(String searchCriteria) throws Exception{ - By by = null; - - Logger.addLog("searching element using criteria => "+ searchCriteria); - - if(searchCriteria==null) - throw new Exception("The the search criteria must be specified"); - - if(searchCriteria.lastIndexOf(Constant.SEARCH_CRITERIA_SEPARATOR)==-1) - throw new Exception("The search prefix to find the element must be specified"); - - String[] criteria = searchCriteria.split(Constant.SEARCH_CRITERIA_SEPARATOR, 2); - - Logger.addLog("searching element => criteria: "+ criteria[0] + " value:" + criteria[1]); - - if(criteria[0].equals("id")) - by = By.id(criteria[1]); - else if(criteria[0].equals("cssSelector")) - by = By.cssSelector(criteria[1]); - else if(criteria[0].equals("className")) - by = By.className(criteria[1]); - else if(criteria[0].equals("linkText")) - by = By.linkText(criteria[1]); - else if(criteria[0].equals("name")) - by = By.name(criteria[1]); - else if(criteria[0].equals("partialLinkText")) - by = By.partialLinkText(criteria[1]); - else if(criteria[0].equals("tagName")) - by = By.tagName(criteria[1]); - else if(criteria[0].equals("xpath")) - by = By.xpath(criteria[1]); - else - throw new Exception("Invalid search prefix"); - return by; - } - - public By getBySearchCriteria(FieldKeyType criteria, String key) throws Exception { - By by = null; - - if(criteria == FieldKeyType.ID) - by = By.id(key); - else if(criteria == FieldKeyType.CSSSELECTOR) - by = By.cssSelector(key); - else if(criteria == FieldKeyType.CLASSNAME) - by = By.className(key); - else if(criteria == FieldKeyType.LINKTEXT) - by = By.linkText(key); - else if(criteria == FieldKeyType.NAME) - by = By.name(key); - else if(criteria == FieldKeyType.PARTIALLINKTEXT) - by = By.partialLinkText(key); - else if(criteria == FieldKeyType.TAGNAME) - by = By.tagName(key); - else if(criteria == FieldKeyType.XPATH) - by = By.xpath(key); - else - throw new Exception("Invalid search prefix"); - return by; - } - - public WebElement getParent(WebElement element) throws Exception{ - return element.findElement(By.xpath("..")); - } - - public WebElement findElement(String str) throws Exception{ - WebElement element = this.findElement(this.getBySearchCriteria(str)); - - //Logger.addLog("Element Found: " + element.getText()); - - return element; - } - - private WebElement findElement(By searchCriteria) throws Exception{ - WebElement we = null; - - we = _instanceDriver.findElement(searchCriteria); - - return we; - } - - public WebElement findElementById(String elementId) throws Exception{ - WebElement we = null; - - we = _instanceDriver.findElement(By.id(elementId)); - - return we; - } - - public WebElement findElementByXPath(String elementXPath) throws Exception{ - WebElement we = null; - - we = findElementsByXPath(elementXPath).get(0); - - return we; - } - - public WebElement findElementByClassName(String elementClassName) throws Exception{ - WebElement we = null; - - we = findElementsByClassName(elementClassName).get(0); - - return we; - } - - public WebElement findElementByCssSelector(String cssSelector) throws Exception{ - WebElement we = null; - - we = findElementsByCssSelector(cssSelector).get(0); - - return we; - } - - public WebElement findElementByLinkText(String linkText) throws Exception{ - WebElement we = null; - - we = findElementsByLinkText(linkText).get(0); - - return we; - } - - public WebElement findElementByPartialLinkText(String partialLinkText) throws Exception{ - WebElement we = null; - - we = findElementsByPartialLinkText(partialLinkText).get(0); - - return we; - } - - public WebElement findElementByTagName(String tagName) throws Exception{ - WebElement we = null; - - we = findElementsByTagName(tagName).get(0); - - return we; - } - - public List findElements(String str) throws Exception{ - return this.findElements(this.getBySearchCriteria(str)); - } - - private List findElements(By searchCriteria) throws Exception{ - List we = null; - - we = _instanceDriver.findElements(searchCriteria); - - return we; - } - - public List findElementsByXPath(String elementXPath) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.xpath(elementXPath)); - - return lwe; - } - - public List findElementsByClassName(String elementClassName) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.className(elementClassName)); - - return lwe; - } - - public List findElementsByName(String elementName) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.name(elementName)); - - return lwe; - } - - public List findElementsByCssSelector(String cssSelector) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.cssSelector(cssSelector)); - - return lwe; - } - - public List findElementsByLinkText(String linkText) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.linkText(linkText)); - - return lwe; - } - - public List findElementsByPartialLinkText(String partialLinkText) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.partialLinkText(partialLinkText)); - - return lwe; - } - - public List findElementsByTagName(String tagName) throws Exception{ - List lwe = null; - - lwe = _instanceDriver.findElements(By.tagName(tagName)); - - return lwe; - } - - public WebElement getElementf(String str, Object... args) throws Exception{ - return this.findElement(this.getBySearchCriteria(str, args)); - } - - public Boolean elementExists(String key, int ocurrences) throws Exception{ - return (this.findElements(this.getBySearchCriteria(key)).size()) == ocurrences; - } - - public Boolean elementExists(String key) throws Exception{ - return this.elementExists(key, 1); - } - - public Boolean elementExistsSearchCriteria(String searchCriteria, int ocurrences) throws Exception{ - return (this.findElements(this.getBySearchCriteriaUsingCriteria(searchCriteria)).size()) == ocurrences; - } - - public Boolean elementExistsSearchCriteria(String searchCriteria) throws Exception{ - return this.elementExistsSearchCriteria(searchCriteria, 1); - } - - public boolean waitForElement(By elementLocator, long timeoutSeconds) throws Exception{ - - final By elem = elementLocator; - - WebElement myDynamicElement = (new WebDriverWait(_instanceDriver, timeoutSeconds)) - .until(new ExpectedCondition(){ - @Override - public WebElement apply(WebDriver d) { - return d.findElement(elem); - } - } - - ); - - return true; - } - - public boolean waitForElement(final WebElement fromWebElement, By elementLocator, long timeoutSeconds) throws Exception{ - - final By elem = elementLocator; - - WebElement myDynamicElement = (new WebDriverWait(_instanceDriver, timeoutSeconds)) - .until(new ExpectedCondition(){ - @Override - public WebElement apply(WebDriver d) { - return fromWebElement.findElement(elem); - } - } - - ); - - return true; - } - - /** - * Wait for page state to be completed - * @param timeoutSeconds seconds to wait for page to change status to completed - * @throws Exception - */ - public void waitForDocumentCompleted(long timeoutSeconds) throws Exception{ - /* - Boolean returnExpectedCondition = (new WebDriverWait(_instanceDriver, timeoutSeconds)) - .until(new ExpectedCondition(){ - @Override - public Boolean apply(WebDriver d) { - return (((JavascriptExecutor)_instanceDriver).executeScript("return document.readyState;")).equals("complete"); - //return ((JavascriptExecutor)_instanceDriver).executeScript("return jQuery.active;") == 0; - } - } - ); - */ - - ExpectedCondition expectation = new - ExpectedCondition() { - public Boolean apply(WebDriver driver) { - return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete"); - } - }; - - Wait wait = new WebDriverWait(_instanceDriver,timeoutSeconds); - try { - wait.until(expectation); - } catch(Throwable error) { - throw new Exception("Page not completed."); - //assertFalse("Timeout waiting for Page Load Request to complete.",true); - } - } - - public void waitForTextNotEqual(final WebElement targetElement, final String oldText, long timeoutSeconds) throws Exception{ - (new WebDriverWait(_instanceDriver, timeoutSeconds)).until(new ExpectedCondition() { - public Boolean apply(WebDriver d) { - if(!targetElement.getText().equals(oldText)){ - return true; - }else { return false; } - } - }); - } - - public void waitForElement(String key, long timeoutSeconds) throws Exception{ - - WebDriverWait wait = new WebDriverWait(_instanceDriver, timeoutSeconds); // wait for timeoutSeconds - wait.until(ExpectedConditions.presenceOfElementLocated(this.getBySearchCriteria(key))); - } - public void waitForElementToBeClickable(FieldKeyType criteria, String key, long timeoutSeconds) throws Exception{ - - waitForElementToBeClickable(this.getBySearchCriteria(criteria,key), timeoutSeconds); - } - - public void waitForElementToBeClickable(By searchCriteria, long timeoutSeconds) throws Exception{ - - WebDriverWait wait = new WebDriverWait(_instanceDriver, timeoutSeconds); // wait for timeoutSeconds - wait.until(ExpectedConditions.elementToBeClickable(searchCriteria)); - } - - public void waitForTextToBePresent(By searchCriteria, String textToBePresent, long timeoutSeconds) throws Exception{ - - WebDriverWait wait = new WebDriverWait(_instanceDriver, timeoutSeconds); // wait for timeoutSeconds - wait.until(ExpectedConditions.textToBePresentInElement(searchCriteria, textToBePresent)); - } - - public List getPreviousSimblingElements(WebElement currentElement){ - List resultElements = currentElement.findElements(By.xpath("preceding-sibling")); - - return resultElements; - } - - public void executeScript(){ - //((JavascriptExecutor)browser.getInstanceDriver()).executeScript("arguments[0].value=arguments[1]", elem, fieldData[i][j].fieldValue); - - } - - public void sleep(long timeMilliSeconds) throws Exception { - Thread.sleep(timeMilliSeconds); - } -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserSettings.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserSettings.java deleted file mode 100644 index ea70cb1ca..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/BrowserSettings.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.colosa.qa.automatization.common; - -/** - * Created with IntelliJ IDEA. - * User: Herbert Saal - * Date: 3/28/13 - * Time: 3:00 PM - * To change this template use File | Settings | File Templates. - */ -public class BrowserSettings { - private String _browserMode; - private String _browserName; - private String _browserVersion; - private String _browserPlatform; - private String _remoteServerURL; - - public String getBrowserMode() { - return _browserMode; - } - - public void setBrowserMode(String browserMode) { - if(browserMode != null) - _browserMode = browserMode; - } - - public String getBrowserName() { - return _browserName; - } - - public void setBrowserName(String browserName) { - if(browserName != null) - _browserName = browserName; - } - - public String getBrowserVersion() { - return _browserVersion; - } - - public void setBrowserVersion(String browserVersion) { - if(browserVersion != null) - _browserVersion = browserVersion; - } - - public String getBrowserPlatform() { - return _browserPlatform; - } - - public void setBrowserPlatform(String browserPlatform) { - if(browserPlatform != null) - _browserPlatform = browserPlatform; - } - - - public String getRemoteServerUrl() { - return _remoteServerURL; - } - - public void setRemoteServerUrl(String remoteServerUrl) { - if(remoteServerUrl != null) - _remoteServerURL = remoteServerUrl; - } - - public String toString() { - return "Browser Mode:" + _browserMode + ", Browser Name:" + _browserName + - ", Browser Version:" + _browserVersion + ", Browser Platform:" + _browserPlatform + - ", Remote Server URL:" + _remoteServerURL; - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/ConfigurationSettings.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/ConfigurationSettings.java deleted file mode 100644 index 924edcd24..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/ConfigurationSettings.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.colosa.qa.automatization.common; - -import java.io.*; -import java.util.Properties; - -public class ConfigurationSettings{ - - private static ConfigurationSettings INSTANCE = null; - private Properties applicationProperties; - private String appConfigurationFile; - - private ConfigurationSettings(String defaultConfFile, String applicationConfFile) throws FileNotFoundException, IOException{ - FileInputStream propertiesFile = new FileInputStream(defaultConfFile); - Properties defaultProperties = new Properties(); - - this.appConfigurationFile = applicationConfFile; - defaultProperties.load(propertiesFile); - propertiesFile.close(); - - this.applicationProperties = new Properties(defaultProperties); - propertiesFile = new FileInputStream(this.appConfigurationFile); - this.applicationProperties.load(propertiesFile); - propertiesFile.close(); - } - - private static void createInstance(String defaultConfFile, String applicationConfFile) throws FileNotFoundException, IOException{ - if(INSTANCE == null) - INSTANCE = new ConfigurationSettings(defaultConfFile, applicationConfFile); - } - - public static ConfigurationSettings getInstance() throws FileNotFoundException, IOException{ - File f = new File("default.conf"); - File fa = new File("app.conf"); - if(f.exists() && fa.exists()) { - ConfigurationSettings.getInstance("default.conf", "app.conf"); - }else{ - f = new File("." + File.separator +"src"+ File.separator + "main"+ File.separator + "default.conf"); - fa = new File("." + File.separator +"src"+ File.separator +"main"+ File.separator + "app.conf"); - if(f.exists() && fa.exists()) { - ConfigurationSettings.getInstance("." + File.separator +"src"+ File.separator + "main"+ File.separator + "default.conf", "." + File.separator +"src"+ File.separator + "main"+ File.separator + "app.conf"); - } - } - return INSTANCE; - } - - public static ConfigurationSettings getInstance(String defaultConfFile, String applicationConfFile) throws FileNotFoundException, IOException{ - ConfigurationSettings.createInstance(defaultConfFile, applicationConfFile); - return INSTANCE; - } - - public String getSetting(String key){ - return this.applicationProperties.getProperty(key); - } - - public void setSetting(String key, String value) throws IOException{ - this.setSetting(key, value, null); - } - - public void setSetting(String key, String value, String comment) throws IOException{ - FileOutputStream fos = new FileOutputStream(this.appConfigurationFile); - this.applicationProperties.setProperty(key, value); - this.applicationProperties.store(fos, comment); - fos.close(); - } -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Constant.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/Constant.java deleted file mode 100644 index be4cd08c4..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Constant.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.colosa.qa.automatization.common; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 3/5/13 - * Time: 9:54 AM - * To change this template use File | Settings | File Templates. - */ -public class Constant { - public static final String SEARCH_CRITERIA_SEPARATOR = "__&&__"; -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldKeyType.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldKeyType.java deleted file mode 100644 index 4ab8dd0f3..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldKeyType.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.colosa.qa.automatization.common; - -public enum FieldKeyType{ - - ID, - XPATH, - CSSSELECTOR, - LINKTEXT, - PARTIALLINKTEXT, - TAGNAME, - CLASSNAME, - NAME; -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldType.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldType.java deleted file mode 100644 index 48fe5d732..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/FieldType.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.colosa.qa.automatization.common; - -public enum FieldType{ - - TITLE, - SUBTITLE, - LINK, - FILE, - TEXTBOX, - BUTTON, - SUBMITBUTTON, - RESETBUTTON, - TEXTAREA, - DROPDOWN, - LISTBOX, - RADIOBUTTON, - CHECK, - DATEPICKER, - READONLY, - SUGGEST, - CURRENCY, - PERCENTAGE, - YESNO, - HIDDEN, - PASSWORD; - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/InvalidPageException.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/InvalidPageException.java deleted file mode 100644 index 432aa3dbf..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/InvalidPageException.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.colosa.qa.automatization.common; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 5/6/13 - * Time: 5:46 PM - * To change this template use File | Settings | File Templates. - */ -public class InvalidPageException extends Exception { - public InvalidPageException() { super(); } - public InvalidPageException(String message) { super(message); } - public InvalidPageException(String message, Throwable cause) { super(message, cause); } - public InvalidPageException(Throwable cause) { super(cause); } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Logger.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/Logger.java deleted file mode 100644 index ccabd9849..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Logger.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.colosa.qa.automatization.common; - -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 6/6/13 - * Time: 2:44 PM - * To change this template use File | Settings | File Templates. - */ -public class Logger { - - public Logger(){ - - } - - public static void addLog(String logText) { - //System.out.println("VerifyPage Login ."); - //System.out.printf("Instance Remote browser:%s, version:%s, platform:%s, url:%s \n", - // browserName, browserVersion, browserPlatform, remoteServerUrl); - //debug.enable=1 - String debugEnabled = null; - try { - debugEnabled = ConfigurationSettings.getInstance().getSetting("debug.enable"); - } catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - if(debugEnabled.equals("1")){ - System.out.println(logText); - } - - //add log code - - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Registry.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/Registry.java deleted file mode 100644 index 2e9d77782..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Registry.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.colosa.qa.automatization.common; - - -import java.util.HashMap; -import java.util.Map; - -/** - * Registry pattern - * User: Herbert Saal - * Date: 3/7/13 - * Time: 3:50 PM - * To change this template use File | Settings | File Templates. - */ -public class Registry { - private static Registry ourInstance = new Registry(); - private final Map registry = new HashMap(); - - public static Registry getInstance() { - return ourInstance; - } - - private Registry() { - } - - /** - * Get Reference of stored object in registry identified by the key - * @param key the identifier of the object - * @return return the found object - */ - public Object getReference( - final Object key) { - Object result = null; - if (isRegistered(key)) { - result = registry.get(key); - } - return result; - } - - private boolean isRegistered(Object key) { - return registry.containsKey(key); - } - - /** - * Register the specified object (value) int he registry identified by the specified key - * @param key The identifier of the object. - * @param value The value - object to be stored in the registry - */ - public synchronized void register( - Object key, Object value) { - registry.put(key, value); - } - - /** - * Unregister the specified object from registry. - * @param key the identifier of the object -value to unregister - */ - public synchronized void unregister( - Object key) { - registry.remove(key); - - } - -} - - diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Utils.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/Utils.java deleted file mode 100644 index 423be8ecc..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/Utils.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.colosa.qa.automatization.common; - -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.firefox.FirefoxDriver; -import org.openqa.selenium.htmlunit.HtmlUnitDriver; -import org.openqa.selenium.ie.InternetExplorerDriver; -import org.openqa.selenium.By; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.Platform; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.remote.RemoteWebDriver; -import org.openqa.selenium.support.ui.Select; -import java.net.URL; -import java.io.FileNotFoundException; -import java.io.IOException; -import org.openqa.selenium.JavascriptExecutor; -import java.util.Random; - - -public class Utils{ - - public static String getRandomString (int longString){ - String randomString = ""; - long milis = new java.util.GregorianCalendar().getTimeInMillis(); - Random r = new Random(milis); - int i = 0; - while ( i < longString){ - char c = (char)r.nextInt(255); - if ( (c >= '0' && c <='9') || (c >='A' && c <='Z') ){ - randomString += c; - i ++; - } - } - return randomString; - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/WaitTool.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/WaitTool.java deleted file mode 100644 index 787bca35c..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/WaitTool.java +++ /dev/null @@ -1,652 +0,0 @@ -package com.colosa.qa.automatization.common; - -import org.openqa.selenium.*; -import org.openqa.selenium.support.ui.ExpectedCondition; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.Select; -import org.openqa.selenium.support.ui.WebDriverWait; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 11/1/13 - * Time: 4:43 PM - * To change this template use File | Settings | File Templates. - */ -public class WaitTool { - /** Default wait time for an element. 7 seconds. */ - public static final int DEFAULT_WAIT_4_ELEMENT = 7; - /** Default wait time for a page to be displayed. 12 seconds. - * The average webpage load time is 6 seconds in 2012. - * Based on your tests, please set this value. - * "0" will nullify implicitlyWait and speed up a test. */ - public static final int DEFAULT_WAIT_4_PAGE = 12; - - - - - /** - * Wait for the element to be present in the DOM, and displayed on the page. - * And returns the first WebElement using the given method. - * - * @param driver The driver object to be used - * @param by selector to find the element - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return WebElement the first WebElement using the given method, or null (if the timeout is reached) - */ - public static WebElement waitForElement(WebDriver driver, final By by, int timeOutInSeconds) { - WebElement element; - try{ - //To use WebDriverWait(), we would have to nullify implicitlyWait(). - //Because implicitlyWait time also set "driver.findElement()" wait time. - //info from: https://groups.google.com/forum/?fromgroups=#!topic/selenium-users/6VO_7IXylgY - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - - WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); - element = wait.until(ExpectedConditions.visibilityOfElementLocated(by)); - - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return element; //return the element - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * Wait for the specified element to be present in the DOM, and displayed on the page. - * And returns the first WebElement using the given method. - * - * @param driver The driver object to be used - * @param element The element - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return WebElement the first WebElement using the given method, or null (if the timeout is reached) - */ - public static void waitForElementVisibleAndEnable(WebDriver driver, final WebElement element, int timeOutInSeconds) { - //WebElement element; - try{ - //To use WebDriverWait(), we would have to nullify implicitlyWait(). - //Because implicitlyWait time also set "driver.findElement()" wait time. - //info from: https://groups.google.com/forum/?fromgroups=#!topic/selenium-users/6VO_7IXylgY - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - - WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); - wait.until(new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - return element.isDisplayed() && element.isEnabled(); - } - }); - - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return; //return - } catch (Exception e) { - e.printStackTrace(); - } - return; - } - - - - /** - * Wait for the element to be present in the DOM, regardless of being displayed or not. - * And returns the first WebElement using the given method. - * - * @param driver The driver object to be used - * @param by selector to find the element - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return WebElement the first WebElement using the given method, or null (if the timeout is reached) - */ - public static WebElement waitForElementPresent(WebDriver driver, final By by, int timeOutInSeconds) { - WebElement element; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - - WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); - element = wait.until(ExpectedConditions.presenceOfElementLocated(by)); - - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return element; //return the element - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - - /** - * Wait for the List to be present in the DOM, regardless of being displayed or not. - * Returns all elements within the current page DOM. - * - * @param driver The driver object to be used - * @param by selector to find the element - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return List all elements within the current page DOM, or null (if the timeout is reached) - */ - public static List waitForListElementsPresent(WebDriver driver, final By by, int timeOutInSeconds) { - List elements; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - - WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); - wait.until((new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - return areElementsPresent(driverObject, by); - } - })); - - elements = driver.findElements(by); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return elements; //return the element - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * Wait for an element to appear on the refreshed web-page. - * And returns the first WebElement using the given method. - * - * This method is to deal with dynamic pages. - * - * Some sites I (Mark) have tested have required a page refresh to add additional elements to the DOM. - * Generally you (Chon) wouldn't need to do this in a typical AJAX scenario. - * - * @param driver The driver object to use to perform this element search - * @param by selector to find the element - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return WebElement the first WebElement using the given method, or null(if the timeout is reached) - * - * @author Mark Collin - */ - public static WebElement waitForElementRefresh(WebDriver driver, final By by, - int timeOutInSeconds) { - WebElement element; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - driverObject.navigate().refresh(); //refresh the page **************** - return isElementPresentAndDisplay(driverObject, by); - } - }); - element = driver.findElement(by); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return element; //return the element - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * Wait for the Text to be present in the given element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param by selector of the given element, which should contain the text - * @param text The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForTextPresent(WebDriver driver, final By by, final String text, int timeOutInSeconds) { - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - return isTextPresent(driverObject, by, text); //is the Text in the DOM - } - }); - isPresent = isTextPresent(driver, by, text); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - - /** - * Wait for the Text to be present in the given element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param element The given element, which should contain the text - * @param text The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForTextPresent(WebDriver driver, final WebElement element, final String text, int timeOutInSeconds) { - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - return element.getText().contains(text); - } - }); - isPresent = element.getText().contains(text); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Wait for the Text to change in the given element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param by selector of the given element, which should contain the text - * @param currentText The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForTextToChange(WebDriver driver, final By by, final String currentText, int timeOutInSeconds) { - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - return !isTextPresent(driverObject, by, currentText); //is the Text different in the DOM - } - }); - isPresent = !isTextPresent(driver, by, currentText); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - - /** - * Wait for the Text to change in the given element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param element selector of the given element, which should contain the value - * @param currentText The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForValueToChange(WebDriver driver, final WebElement element, final String currentText, int timeOutInSeconds) { - - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - Logger.addLog("waitForValueToChange element value:" + element.getAttribute("value") + " != " + currentText + " => " + !element.getAttribute("value").equals("")); - if(currentText.equals("")){ - return !(element.getAttribute("value").equals("")); - }else{ - return !(element.getAttribute("value").contains(currentText)); - } - } - }); - if(currentText.equals("")){ - isPresent = !(element.getAttribute("value").equals("")); - }else{ - isPresent = !(element.getAttribute("value").contains(currentText)); - } - //isPresent = !element.getText().contains(currentText); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Wait for the Text to change in the given element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param element selector of the given element, which should contain the text - * @param currentText The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForTextToChange(WebDriver driver, final WebElement element, final String currentText, int timeOutInSeconds) { - - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - Logger.addLog("waitForTextToChange element text:" + element.getText() + " != " + currentText + " => " + !element.getText().equals("")); - if(currentText.equals("")){ - return !(element.getText().equals("")); - }else{ - return !(element.getText().contains(currentText)); - } - } - }); - if(currentText.equals("")){ - isPresent = !(element.getText().equals("")); - }else{ - isPresent = !(element.getText().contains(currentText)); - } - //isPresent = !element.getText().contains(currentText); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Wait for selected element to change in the given select element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param selectElement selector of the given element, which should contain the text - * @param currentText The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForSelectedTextToChange(WebDriver driver, final WebElement selectElement, final String currentText, int timeOutInSeconds) { - - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - Select selectList = new Select(selectElement); - String selectedText = ""; - try{ - WebElement selectedOption = selectList.getFirstSelectedOption(); - selectedText = selectedOption.getText(); - }catch (NoSuchElementException ex){ - //no selected element - selectedText = ""; - } - Logger.addLog("waitForSelectedTextToChange Element Text:" + selectedText + " != " + currentText); - return (!selectedText.equals(currentText)); - } - }); - Select selectList = new Select(selectElement); - String selectedText = ""; - try{ - WebElement selectedOption = selectList.getFirstSelectedOption(); - selectedText = selectedOption.getText(); - }catch (NoSuchElementException ex){ - //no selected element - selectedText = ""; - } - isPresent = !(selectedText.equals(currentText)); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Wait for selected element to change in the given select element, regardless of being displayed or not. - * - * @param driver The driver object to be used to wait and find the element - * @param selectElement selector of the given element, which should contain the text - * @param currentValue The text we are looking - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean - */ - public static boolean waitForSelectedValueToChange(WebDriver driver, final WebElement selectElement, final String currentValue, int timeOutInSeconds) { - - boolean isPresent = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - @Override - public Boolean apply(WebDriver driverObject) { - Select selectList = new Select(selectElement); - String selectedValue = ""; - try{ - WebElement selectedOption = selectList.getFirstSelectedOption(); - selectedValue = selectedOption.getAttribute("value"); - }catch (NoSuchElementException ex){ - //no selected element - selectedValue = ""; - } - Logger.addLog("waitForSelectedValueToChange Element Value:" + selectedValue + " != " + currentValue); - return (!selectedValue.equals(currentValue)); - } - }); - Select selectList = new Select(selectElement); - String selectedValue = ""; - try{ - WebElement selectedOption = selectList.getFirstSelectedOption(); - selectedValue = selectedOption.getAttribute("value"); - }catch (NoSuchElementException ex){ - //no selected element - selectedValue = ""; - } - isPresent = !(selectedValue.equals(currentValue)); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return isPresent; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Waits for the Condition of JavaScript. - * - * - * @param driver The driver object to be used to wait and find the element - * @param javaScript The javaScript condition we are waiting. e.g. "return (xmlhttp.readyState >= 2 && xmlhttp.status == 200)" - * @param timeOutInSeconds The time in seconds to wait until returning a failure - * - * @return boolean true or false(condition fail, or if the timeout is reached) - **/ - public static boolean waitForJavaScriptCondition(WebDriver driver, final String javaScript, - int timeOutInSeconds) { - boolean jscondition = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - return (Boolean) ((JavascriptExecutor) driverObject).executeScript(javaScript); - } - }); - jscondition = (Boolean) ((JavascriptExecutor) driver).executeScript(javaScript); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return jscondition; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - - /** Waits for the completion of Ajax jQuery processing by checking "return jQuery.active == 0" condition. - * - * @param driver - The driver object to be used to wait and find the element - * @param timeOutInSeconds - The time in seconds to wait until returning a failure - * - * @return boolean true or false(condition fail, or if the timeout is reached) - * */ - public static boolean waitForJQueryProcessing(WebDriver driver, int timeOutInSeconds){ - boolean jQcondition = false; - try{ - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - new WebDriverWait(driver, timeOutInSeconds) { - }.until(new ExpectedCondition() { - - @Override - public Boolean apply(WebDriver driverObject) { - return (Boolean) ((JavascriptExecutor) driverObject).executeScript("return jQuery.active == 0"); - } - }); - jQcondition = (Boolean) ((JavascriptExecutor) driver).executeScript("return jQuery.active == 0"); - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - return jQcondition; - } catch (Exception e) { - e.printStackTrace(); - } - return jQcondition; - } - - - /** - * Coming to implicit wait, If you have set it once then you would have to explicitly set it to zero to nullify it - - */ - public static void nullifyImplicitWait(WebDriver driver) { - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - } - - - /** - * Set driver implicitlyWait() time. - */ - public static void setImplicitWait(WebDriver driver, int waitTime_InSeconds) { - driver.manage().timeouts().implicitlyWait(waitTime_InSeconds, TimeUnit.SECONDS); - } - - /** - * Reset ImplicitWait. - * To reset ImplicitWait time you would have to explicitly - * set it to zero to nullify it before setting it with a new time value. - */ - public static void resetImplicitWait(WebDriver driver) { - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_4_PAGE, TimeUnit.SECONDS); //reset implicitlyWait - } - - - /** - * Reset ImplicitWait. - * @param newWaittime_InSeconds - a new wait time in seconds - */ - public static void resetImplicitWait(WebDriver driver, int newWaittime_InSeconds) { - driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); //nullify implicitlyWait() - driver.manage().timeouts().implicitlyWait(newWaittime_InSeconds, TimeUnit.SECONDS); //reset implicitlyWait - } - - - /** - * Checks if the text is present in the element. - * - * @param driver - The driver object to use to perform this element search - * @param by - selector to find the element that should contain text - * @param text - The Text element you are looking for - * @return true or false - */ - private static boolean isTextPresent(WebDriver driver, By by, String text) - { - try { - return driver.findElement(by).getText().contains(text); - } catch (NullPointerException e) { - return false; - } - } - - /** - * Checks if the current text is equal to the specified. - * - * @param driver - The driver object to use to perform this element search - * @param by - selector to find the element that should contain text - * @param text - The current Text element you are looking for - * @return true or false - */ - private static boolean isTextEqual(WebDriver driver, By by, String text) - { - try { - return driver.findElement(by).getText().equals(text); - } catch (NullPointerException e) { - return false; - } - } - - - /** - * Checks if the elment is in the DOM, regardless of being displayed or not. - * - * @param driver - The driver object to use to perform this element search - * @param by - selector to find the element - * @return boolean - */ - private static boolean isElementPresent(WebDriver driver, By by) { - try { - driver.findElement(by);//if it does not find the element throw NoSuchElementException, which calls "catch(Exception)" and returns false; - return true; - } catch (NoSuchElementException e) { - return false; - } - } - - - /** - * Checks if the List are in the DOM, regardless of being displayed or not. - * - * @param driver - The driver object to use to perform this element search - * @param by - selector to find the element - * @return boolean - */ - private static boolean areElementsPresent(WebDriver driver, By by) { - try { - driver.findElements(by); - return true; - } catch (NoSuchElementException e) { - return false; - } - } - - /** - * Checks if the elment is in the DOM and displayed. - * - * @param driver - The driver object to use to perform this element search - * @param by - selector to find the element - * @return boolean - */ - private static boolean isElementPresentAndDisplay(WebDriver driver, By by) { - try { - return driver.findElement(by).isDisplayed(); - } catch (NoSuchElementException e) { - return false; - } - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/ControlOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/ControlOptions.java deleted file mode 100644 index ea2eff7ce..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/ControlOptions.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions; - -import com.colosa.qa.automatization.common.BrowserInstance; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.Select; - -import java.util.ArrayList; - -public class ControlOptions{ - - //protected String fieldname = null; - //protected String label = ""; - protected Boolean required = false; - protected Boolean readOnly = false; - private ArrayList dependentFields = new ArrayList(); - protected String defaultValue = null; - protected String hint = ""; - public Mode mode = Mode.EDIT; - protected SQLConnection sqlConnection = null; - protected String sql = null; - protected DependentFieldsApplicableBehavior dependentFieldsApplicableBehavior; - - public enum Mode{ - EDIT("edit"), - VIEW("view"); - - private String value; - - Mode(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public enum SQLConnection{ - NONE(""), - DBARRAY("dbarray"), - WORKFLOW("workflow"), - RBAC("rbac"), - REPORT("rp"); - - private String value; - - SQLConnection(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public ControlOptions(){ - this.dependentFieldsApplicableBehavior = new DependentFieldsNotApplicableOption(); - this.sqlConnection = SQLConnection.NONE; - } - - protected void fillForm(BrowserInstance browser) throws Exception{ - Select ddown = null; - this.fillRequired(browser); - this.fillReadOnly(browser); - this.fillDependentFields(browser); - this.fillDefaultValue(browser); - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.hint").sendKeys(this.hint); - ddown = new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.mode")); - ddown.selectByValue(this.mode.getValue()); - this.fillSQLConnection(browser); - this.fillSQL(browser); - } - - protected void addDependentField(String fieldname){ - this.dependentFields.add(fieldname); - } -/* - public void setFieldName(String fieldname){ - this.fieldname = fieldname; - } - - public void setLabel(String label){ - this.label = label; - }*/ - - public void setSQL(String sql){ - this.sql = sql; - } - - public void setSQLConnection(SQLConnection connection){ - this.sqlConnection = connection; - } - - public void setReadOnly(Boolean readOnly){ - this.readOnly = readOnly; - } - - public void setRequired(Boolean required){ - this.required = required; - } - - public void setHint(String hint){ - this.hint = hint; - } - - public void setMode(Mode mode){ - this.mode = mode; - } - - private void fillRequired(BrowserInstance browser) throws Exception{ - if(this.required == null) - return; - WebElement we = null; - we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.required"); - if(this.required != we.isSelected()) - we.click(); - - } - - private void fillDependentFields(BrowserInstance browser) throws Exception{ - if(this.dependentFields != null) - this.dependentFieldsApplicableBehavior.fillDependentFields(browser, this.dependentFields); - } - - protected void fillDefaultValue(BrowserInstance browser) throws Exception{ - if(this.defaultValue == null) - return; - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.defaultValue").sendKeys(this.defaultValue); - } - - private void fillSQLConnection(BrowserInstance browser) throws Exception{ - if(this.sqlConnection == null) - return; - (new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.sqlConnection"))).selectByValue(this.sqlConnection.getValue()); - } - - private void fillSQL(BrowserInstance browser) throws Exception{ - if(this.sql == null) - return; - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.sql").sendKeys(this.sql); - } - - private void fillReadOnly(BrowserInstance browser) throws Exception{ - if(this.readOnly == null) - return; - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.readOnly"); - if(this.readOnly != we.isSelected()) - we.click(); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableBehavior.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableBehavior.java deleted file mode 100644 index 2c967512c..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableBehavior.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions; - -import com.colosa.qa.automatization.common.BrowserInstance; - -import java.util.ArrayList; - -interface DependentFieldsApplicableBehavior{ - public void fillDependentFields(BrowserInstance browser, ArrayList fields) throws Exception; -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableOption.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableOption.java deleted file mode 100644 index 0eb300acb..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsApplicableOption.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions; - -import com.colosa.qa.automatization.common.BrowserInstance; -import org.openqa.selenium.support.ui.Select; - -import java.util.ArrayList; - -public class DependentFieldsApplicableOption implements DependentFieldsApplicableBehavior{ - - public void fillDependentFields(BrowserInstance browser, ArrayList fields) throws Exception{ - if(fields == null) - return; - Select we = new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.dependentFields")); - for(String fieldName:fields) - { - we.selectByVisibleText(fieldName); - } - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsNotApplicableOption.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsNotApplicableOption.java deleted file mode 100644 index b3d092cee..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/DependentFieldsNotApplicableOption.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions; - -import com.colosa.qa.automatization.common.BrowserInstance; - -import java.util.ArrayList; - -public class DependentFieldsNotApplicableOption implements DependentFieldsApplicableBehavior{ - - public void fillDependentFields(BrowserInstance browser, ArrayList fields){} - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/InputControlOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/InputControlOptions.java deleted file mode 100644 index 430069667..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/InputControlOptions.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.controlOptions.ControlOptions; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.Select; - -import java.util.ArrayList; - -class InputControlOptions extends ControlOptions{ - - private ArrayList size = new ArrayList(); - protected String validate = null; - protected String mask = null; - protected int maxLength = -1; - - protected void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - this.fillSize(browser); - this.fillValidate(browser); - this.fillMask(browser); - this.fillMaxLength(browser); - } - - protected void setSize(int... args){ - this.size.clear(); - for(int i: args) - this.size.add(i); - } - - private void fillSize(BrowserInstance browser) throws Exception{ - if(this.size.size()==1) - { - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.size"); - we.clear(); - we.sendKeys(Integer.toString(this.size.get(0))); - } - else if(this.size.size()==2) - { - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.columns"); - we.clear(); - we.sendKeys(Integer.toString(this.size.get(0))); - we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.rows"); - we.clear(); - we.sendKeys(Integer.toString(this.size.get(1))); - } - } - - private void fillValidate(BrowserInstance browser) throws Exception{ - if(this.validate == null) - return; - Select we = new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.validate")); - we.selectByValue(this.validate); - } - - private void fillMask(BrowserInstance browser) throws Exception{ - if(this.mask == null) - return; - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.mask"); - we.clear(); - we.sendKeys(this.mask); - } - - private void fillMaxLength(BrowserInstance browser) throws Exception{ - if(this.maxLength < 0) - return; - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.maxLength"); - we.clear(); - we.sendKeys(Integer.toString(this.maxLength)); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/NumericOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/NumericOptions.java deleted file mode 100644 index 9867c131f..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/NumericOptions.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; -import org.openqa.selenium.support.ui.Select; - -public class NumericOptions extends InputControlOptions{ - - private Validate validate = Validate.REAL_NUMBER; - private DecimalSeparator decimalSeparator = DecimalSeparator.PERIOD; - private String formula = null; - - public enum Validate{ - INTEGER("Int"), REAL_NUMBER("Real"); - - private String value; - - Validate(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - }; - - public enum DecimalSeparator{ - PERIOD("."), COMMA(","); - - private String value; - - DecimalSeparator(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public void setMask(String mask){ - this.mask = mask; - } - - public void setSize(int i){ - super.setSize(i); - } - - public void setFormula(String formula){ - this.formula = formula; - } - - public void setValidate(Validate validate){ - this.validate = validate; - } - - public void setDecimalSeparator(DecimalSeparator decimalSeparator){ - this.decimalSeparator = decimalSeparator; - } - - public void setDefaultValue(String defaultValue){ - this.defaultValue = defaultValue; - } - - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.validate")).selectByValue(this.validate.getValue()); - new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.decimalSeparator")).selectByValue(this.decimalSeparator.getValue()); - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.formula").sendKeys(this.formula); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/PasswordOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/PasswordOptions.java deleted file mode 100644 index b20966ea7..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/PasswordOptions.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; -import org.openqa.selenium.WebElement; - -public class PasswordOptions extends InputControlOptions{ - - private Boolean autocomplete = false; - - public PasswordOptions(){ - this.sqlConnection = null; - this.sql = null; - } - - private void setSQLConnection(){} - private void setSQL(){} - - public void setMaxLength(int length){ - this.maxLength = length; - } - - public void setSize(int i){ - super.setSize(i); - } - - public void setAutocomplete(Boolean autocomplete){ - this.autocomplete = autocomplete; - } - - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.autocomplete"); - if(this.autocomplete != we.isSelected()) - we.click(); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/SuggestOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/SuggestOptions.java deleted file mode 100644 index 59cfccd43..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/SuggestOptions.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.Select; - -public class SuggestOptions extends InputControlOptions{ - - private SaveSelectedOptionAs saveSelectedOptionAs = SaveSelectedOptionAs.LABEL; - private StoreNewEntryPrimaryKeyType storeNewEntryPrimaryKeyType; - private int maxResults = 6; - private Boolean showNoResultsMessage = false; - private Boolean storeNewEntry = false; - private String javascript = ""; - private String table = "0"; - private String primaryKey = "0"; - - public enum SaveSelectedOptionAs{ - LABEL("1"), VALUE("0"); - - private String value; - - SaveSelectedOptionAs(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public enum StoreNewEntryPrimaryKeyType{ - NONE("0"), INTEGER("int"), VARCHAR("varchar"); - - private String value; - - StoreNewEntryPrimaryKeyType(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public SuggestOptions(){ - this.readOnly = null; - } - - public void setSize(int i){ - super.setSize(i); - } - - public void setSaveSelectedOptionAs(SaveSelectedOptionAs saveAs){ - this.saveSelectedOptionAs = saveAs; - } - - public void setMaxResults(int i){ - this.maxResults = i; - } - public void setShowNoResultsMessage(Boolean bln){ - this.showNoResultsMessage = bln; - } - public void enableStoreNewEntry(String table, String primaryKey, StoreNewEntryPrimaryKeyType type){ - this.storeNewEntry = true; - this.table = table; - this.primaryKey = primaryKey; - this.storeNewEntryPrimaryKeyType = type; - } - - public void disableStoreNewEntry(){ - this.storeNewEntry = false; - this.table = "0"; - this.primaryKey = "0"; - this.storeNewEntryPrimaryKeyType = StoreNewEntryPrimaryKeyType.NONE; - } - - public void setJavascript(String script){ - this.javascript = script; - } - - public void addDependentField(String fieldName){ - super.addDependentField(fieldName); - } - - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - (new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.saveSelectedOptionAs"))).selectByValue(this.saveSelectedOptionAs.getValue()); - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.maxResults").sendKeys(Integer.toString(this.maxResults)); - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.showNoResultsMessage"); - if(this.showNoResultsMessage != we.isSelected()) - we.click(); - we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.storeNewEntry"); - if(we.isSelected() != this.storeNewEntry) - we.click(); - (new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.storeNewEntry.table"))).selectByValue(this.table); - (new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.storeNewEntry.primaryKey"))).selectByValue(this.primaryKey); - (new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.storeNewEntry.primaryKeyType"))).selectByValue(storeNewEntryPrimaryKeyType.getValue()); - browser.findElement("dynaformDesigner.webElement.blankDynaformModal.javascriptCallback").sendKeys(this.javascript); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextAreaOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextAreaOptions.java deleted file mode 100644 index 73c18a726..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextAreaOptions.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; - -public class TextAreaOptions extends InputControlOptions{ - - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - } - - public void setSize(int columns, int rows){ - super.setSize(columns, rows); - } - - public void setSize(int i){ - this.setSize(i, i); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextFieldOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextFieldOptions.java deleted file mode 100644 index 68f72a361..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/input/TextFieldOptions.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.input; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.controlOptions.DependentFieldsApplicableOption; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.Select; - -public class TextFieldOptions extends InputControlOptions{ - - private TextTransform textTransform = TextTransform.NONE; - - public enum TextTransform{ - NONE(""), - UPPER_CASE("UPPER"), - LOWER_CASE("LOWER"); - - private String value; - - TextTransform(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public enum Validate{ - ANY("Any"), - ALPHA("Alpha"), - ALPHA_NUMERIC("AlphaNum"), - INT("Int"), - REAL("Real"), - EMAIL("Email"), - LOGIN("Login"); - - private String value; - - Validate(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public TextFieldOptions(){ - this.dependentFieldsApplicableBehavior = new DependentFieldsApplicableOption(); - this.validate = (Validate.ANY).getValue(); - } - - public void setValidate(Validate validate){ - this.validate = validate.getValue(); - } - - public void setTextTransform(TextTransform tf){ - this.textTransform = tf; - } - - public void setSize(int i){ - super.setSize(i); - } - - public void setMask(String mask){ - this.mask = mask; - } - - public void setMaxLength(int length){ - this.maxLength = length; - } - - public void setDefaultValue(String defaultValue){ - this.defaultValue = defaultValue; - } - - public void addDependentField(String fieldName){ - super.addDependentField(fieldName); - } - - @Override - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - WebElement we = null; - Select ddown = null; - - //ddown = new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.validate")); - //ddown.selectByValue(this.validate.getValue()); - //browser.findElement("dynaformDesigner.webElement.blankDynaformModal.mask").sendKeys(this.mask); - ddown = new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.textTransform")); - ddown.selectByValue(this.textTransform.getValue()); - //we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.size"); - //we.clear(); - //we.sendKeys(Integer.toString(this.size)); - } -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOption.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOption.java deleted file mode 100644 index 4d00ce7e8..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOption.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.selection; - -class DropDownOption{ - - private String key = null; - private String value = null; - - public DropDownOption(String key, String value){ - this.key = key; - this.value = value; - } - - public String getKey(){ - return this.key; - } - - public void setValue(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOptions.java deleted file mode 100644 index d57e09f55..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/DropDownOptions.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.selection; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.controlOptions.ControlOptions; -import com.colosa.qa.automatization.common.controlOptions.DependentFieldsApplicableOption; - -import java.util.ArrayList; - -public class DropDownOptions extends ControlOptions{ - - private ArrayList options = new ArrayList(); - - public DropDownOptions(){ - this.dependentFieldsApplicableBehavior = new DependentFieldsApplicableOption(); - } - - public void addOption(String label, String value){ - options.add(new DropDownOption(label, value)); - } - - public void addDependentField(String fieldName){ - super.addDependentField(fieldName); - } - - public void setDefaultValue(String value){ - this.defaultValue = value; - } - - @Override - public void fillForm(BrowserInstance browser) throws Exception{ - super.fillForm(browser); - int i = 1; - for(DropDownOption opt:this.options) - { - if(i>1) - browser.findElement("dynaformDesigner.webElement.dropdownModal.gridNewElementButton").click(); - browser.getElementf("dynaformDesigner.webElement.dropdownModal.gridValueElementLocator", i).sendKeys(opt.getValue()); - browser.getElementf("dynaformDesigner.webElement.dropdownModal.gridLabelElementLocator", i).sendKeys(opt.getKey()); - i++; - } - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/ListBoxOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/ListBoxOptions.java deleted file mode 100644 index 06fe0e20f..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/ListBoxOptions.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.selection; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.controlOptions.DependentFieldsNotApplicableOption; -import org.openqa.selenium.WebElement; - -public class ListBoxOptions extends DropDownOptions{ - - private int size = 4; - - public ListBoxOptions(){ - - } - - //protected void setReadOnly(Boolean readOnly){} - - public void setSize(int size){ - this.size = size; - } - - @Override - public void fillForm(BrowserInstance browser) throws Exception{ - this.dependentFieldsApplicableBehavior = new DependentFieldsNotApplicableOption();; - this.readOnly = null; - super.fillForm(browser); - WebElement we = browser.findElement("dynaformDesigner.webElement.blankDynaformModal.size"); - we.clear(); - we.sendKeys(Integer.toString(this.size)); - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/YesNoOptions.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/YesNoOptions.java deleted file mode 100644 index a7cac5f66..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/controlOptions/selection/YesNoOptions.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.colosa.qa.automatization.common.controlOptions.selection; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.controlOptions.ControlOptions; -import org.openqa.selenium.support.ui.Select; - -public class YesNoOptions extends ControlOptions{ - - public enum Options{ - YES("1"), NO(""); - - private String value; - - Options(String value){ - this.value = value; - } - - public String getValue(){ - return this.value; - } - } - - public void setDefaultValue(Options option){ - this.defaultValue = option.getValue(); - } - - @Override - protected void fillDefaultValue(BrowserInstance browser) throws Exception{ - new Select(browser.findElement("dynaformDesigner.webElement.blankDynaformModal.defaultValue")).selectByValue(this.defaultValue); - } - - private void setRequired(){} - - private void setSQL(/* String sql */){} - - private void setSQLConnection(/*SQLConnection connection*/){} - - public void fillForm(BrowserInstance browser) throws Exception{ - this.sqlConnection = null; - this.required = null; - super.fillForm(browser); - } -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFloatingMenu.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFloatingMenu.java deleted file mode 100644 index 637e69f3a..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFloatingMenu.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 12/17/13 - * Time: 12:35 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSFloatingMenu { - private BrowserInstance browserInstance; - //private WebElement floatingMenuParent; - private WebElement floatingMenu; - private WebElement floatingMenuListContent; - List auxSearchList; - List listExtJSMenuItem = null; - - public ExtJSFloatingMenu(BrowserInstance browserInstance) throws Exception { - //this.floatingMenuParent = floatingMenuParent; - this.browserInstance = browserInstance; - - - // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. - auxSearchList = browserInstance.getInstanceDriver().findElements(By.cssSelector("div.x-menu.x-menu-floating:not([style='visibility:hidden'])")); - //auxSearchList = this.floatingMenuParent.findElements(By.cssSelector("div.x-menu")); //:not([style='visibility:hidden']) - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.floatingMenu = auxSearchList.get(0); - Logger.addLog("FloatingMenu found div.x-menu.x-menu-floating"); - }else - { - throw new Exception("FloatingMenu not found in specified element."); - } - //mejorar la selección de elementos - - - /* - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.floatingMenu = auxSearchList.get(0); - Logger.addLog("FloatingMenu found div.x-menu.x-menu-floating"); - }else - { - throw new Exception("FloatingMenu not found in specified element."); - } - - //search visible floating menu - String classAttribute = floatingMenuParent.getAttribute("class"); - Logger.addLog("Attribute " + classAttribute); - if(classAttribute.contains("x-menu") && classAttribute.contains("x-menu-floating")){ - //this is the toolbar element - Logger.addLog("The passed element is the same floating menu: x-menu-floating"); - this.floatingMenu = floatingMenuParent; - }else{ - //search for the toolbar element - //Logger.addLog("before Toolbar find x-panel-tbar"); - // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. - browserInstance.getInstanceDriver().findElements(By.cssSelector("div.x-menu")); - auxSearchList = this.floatingMenuParent.findElements(By.cssSelector("div.x-menu")); //:not([style='visibility:hidden']) - - //mejorar la selección de elementos - - - - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.floatingMenu = auxSearchList.get(0); - Logger.addLog("FloatingMenu found div.x-menu.x-menu-floating"); - }else - { - throw new Exception("FloatingMenu not found in specified element."); - } - }*/ - - //Logger.addLog("before Toolbar find x-toolbar-ct"); - auxSearchList = this.floatingMenu.findElements(By.cssSelector("ul.x-menu-list")); - if(auxSearchList.size() > 0){ - this.floatingMenuListContent = auxSearchList.get(0); - Logger.addLog("FloatingMenu content found ul.x-menu-list"); - }else - { - throw new Exception("FloatingMenu content not found in toolbar element."); - } - - //detect all toolbar cells - this.listExtJSMenuItem = queryListMenuItems(); - } - - private List queryListMenuItems(){ - - List listItems = this.floatingMenuListContent.findElements(By.cssSelector("li.x-menu-list-item")); - Logger.addLog("Get current list of Menu Items: " + listItems.size()); - - - List listMenuItems = new ArrayList(listItems.size()); - - for (WebElement menuListItem : listItems) { - //get menu item - WebElement menuItem = menuListItem.findElement(By.className("x-menu-item")); - listMenuItems.add(new ExtJSMenuItem(menuItem)); - - Logger.addLog(" menu item data: " + menuItem.getTagName() + ":" + menuItem.getText()); - } - - return listMenuItems; - } - - /** - * Find menu item in menu based in the specified text. - * @param menuText text to search item - * @return ExtJSMenuItem found menu item, null in other case. - */ - public ExtJSMenuItem findMenuItem(String menuText){ - ExtJSMenuItem resultMenuItem = null; - - for (ExtJSMenuItem menuItem : this.listExtJSMenuItem) { - Logger.addLog(" if (menu item:" + menuItem.getText() + "==" + menuText + ")"); - - if(menuItem.getText().trim().equals(menuText)){ - Logger.addLog(" menu item found:" + menuItem.getText()); - resultMenuItem = menuItem; - break; - } - } - - return resultMenuItem; - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSForm.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSForm.java deleted file mode 100644 index 9e9c36be4..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSForm.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import com.colosa.qa.automatization.common.WaitTool; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 12/18/13 - * Time: 11:23 AM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSForm { - private BrowserInstance browserInstance; - private WebElement xForm; - List auxSearchList; - List xFormItems; - - public ExtJSForm(BrowserInstance browserInstance) throws Exception { - //search the first visible windows - this.browserInstance = browserInstance; - - // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. - auxSearchList = browserInstance.getInstanceDriver().findElements(By.cssSelector("form.x-form")); - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.xForm = auxSearchList.get(0); - Logger.addLog("xForm found form.x-form"); - }else - { - throw new Exception("xForm not found in specified element."); - } - - this.xFormItems = this.queryListFormItems(); - } - - private List queryListFormItems() throws Exception { - - List listFormItems = this.xForm.findElements(By.cssSelector("div.x-form-item")); - Logger.addLog("Get current list of form items: " + listFormItems.size()); - - List listXFormItems = new ArrayList(listFormItems.size()); - - for (WebElement xFormItem : listFormItems) { - listXFormItems.add(new ExtJSFormItem(xFormItem, this.browserInstance)); - - Logger.addLog(" form item: " + xFormItem.getTagName() + ":" + xFormItem.getText()); - } - - return listXFormItems; - } - - /** - * Find Form Item based in the item label. - * @param itemLabel text to search item - * @return ExtJSFormItem found form item null in other case. - */ - public ExtJSFormItem findFormItem(String itemLabel){ - ExtJSFormItem resultFormItem = null; - - for (ExtJSFormItem extJSFormItem : this.xFormItems) { - Logger.addLog(" form item:" + extJSFormItem.getLabel() + "==" + itemLabel); - - if(extJSFormItem.getLabel().trim().contains(itemLabel)){ - Logger.addLog(" form item found:" + extJSFormItem.getLabel()); - resultFormItem = extJSFormItem; - break; - } - } - - return resultFormItem; - } - - /** - * Find form item in base to zero based index - * @param formItemIndex The Zero based index of the form item. - * @return ExtJSFormItem the found form item - */ - public ExtJSFormItem findFormItem(int formItemIndex){ - ExtJSFormItem resultFormItem = null; - resultFormItem = this.xFormItems.get(formItemIndex); - Logger.addLog(" return toolbar cell:" + formItemIndex); - return resultFormItem; - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFormItem.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFormItem.java deleted file mode 100644 index 6feb3b6ad..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSFormItem.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 12/18/13 - * Time: 11:30 AM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSFormItem { - private BrowserInstance browserInstance; - private WebElement xFormItem; - private WebElement xFormItemLabel; - private WebElement xFormItemElement; - List auxSearchList; - - public ExtJSFormItem(WebElement xFormItem, BrowserInstance browserInstance) throws Exception { - //search the first visible windows - this.browserInstance = browserInstance; - - //verify that this is a form item - String classAttribute = xFormItem.getAttribute("class"); - if(classAttribute.contains("x-form-item")){ - //this is the toolbar element - Logger.addLog("The passed element is a form item: x-form-item"); - this.xFormItem = xFormItem; - }else{ - throw new Exception("xform item not found in specified element."); - } - - auxSearchList = this.xFormItem.findElements(By.cssSelector("label.x-form-item-label")); - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.xFormItemLabel = auxSearchList.get(0); - Logger.addLog("form found label.x-form-item-label"); - }else - { - throw new Exception("Form label not found in specified element."); - } - - auxSearchList = this.xFormItem.findElements(By.cssSelector("div.x-form-element")); - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.xFormItemElement = auxSearchList.get(0); - Logger.addLog("form found div.x-form-element"); - }else - { - throw new Exception("Form element not found in specified element."); - } - } - - /** - * Get item label - * @return - */ - public String getLabel(){ - - return this.xFormItemLabel.getText(); - } - - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGrid.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGrid.java deleted file mode 100644 index d41b10569..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGrid.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Created with IntelliJ IDEA. - * Author: Herbert Saal - * Date: 5/16/13 - * Time: 11:40 AM - * -*/ - -package com.colosa.qa.automatization.common.extJs; - -import java.util.ArrayList; -import java.util.List; -//import java.util.concurrent.TimeUnit; -import java.lang.Exception; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import com.colosa.qa.automatization.common.WaitTool; -import org.openqa.selenium.*; -//import org.openqa.selenium.Keys; -//import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.support.ui.WebDriverWait; -//import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.ExpectedCondition; - -public class ExtJSGrid{ - - private WebDriver driver; - private WebElement grid; - private WebElement headerToolbar; - private List headerToolbarCells; - private WebElement searchInput; - private WebElement gridBody; - private ExtJSGridHeader gridBodyHeader; - private ExtJSToolbar bottomToolbar = null; - private WebElement bottomCellCounterText; - //private List gridHeaders; - private List rows; - private List auxListElements; - - private List pager; - private WebElement btn_first; - private WebElement btn_previous; - private WebElement btn_next; - private WebElement btn_last; - private WebElement btn_refresh; - private int currentPage; - private int totalPages; - private int items; //*falta dar utilidad - private int timeout; - - /** - * Creates an ExtJsGrid class. - * @param grid The element that has the class = x-grid-panel - * @param browserInstance The browser driver - * @param timeout - */ - public ExtJSGrid(WebElement grid, BrowserInstance browserInstance, int timeout) throws Exception { - //verify x-grid-panel class - - this.driver = browserInstance.getInstanceDriver(); - this.grid = grid; - this.timeout = timeout; - this.headerToolbar = this.grid.findElement(By.cssSelector("div.x-panel-tbar")); - this.headerToolbarCells = this.headerToolbar.findElements(By.cssSelector("td.x-toolbar-cell")); - this.gridBody = this.grid.findElement(By.cssSelector("div.x-grid3")); - this.auxListElements = this.grid.findElements(By.cssSelector("div.x-panel-bbar")); - if(this.auxListElements.size()>0){ - this.bottomToolbar = new ExtJSToolbar(this.auxListElements.get(0), browserInstance); - this.bottomCellCounterText = this.bottomToolbar.findToolbarCell(11).getWebElement(); - Logger.addLog("Bottom Toolbar found, cell 11:" + this.bottomCellCounterText.getText()); - } - //this.gridBodyHeader = this.gridBody.findElement(By.cssSelector("div.x-grid3-header")); - - //this.gridHeaders = this.gridBodyHeader.findElements(By.cssSelector("td.x-grid3-hd.x-grid3-cell:not([style='display:none'])")); - this.pager = this.grid.findElements(By.xpath("div/div[3]/div/table/tbody/tr/td/table/tbody/tr/td")); - this.btn_first = this.pager.get(0).findElement(By.xpath("table/tbody/tr[2]/td[2]/em/button")); - this.btn_previous = this.pager.get(1).findElement(By.xpath("table/tbody/tr[2]/td[2]/em/button")); - this.btn_next = this.pager.get(7).findElement(By.xpath("table/tbody/tr[2]/td[2]/em/button")); - this.btn_last = this.pager.get(8).findElement(By.xpath("table/tbody/tr[2]/td[2]/em/button")); - this.btn_refresh = this.pager.get(10).findElement(By.xpath("table/tbody/tr[2]/td[2]/em/button")); - this.init(); - - WaitTool.waitForJavaScriptCondition(this.driver, "return (document.readyState == 'complete');", 15); - } - - /** - * - * @param grid - * @param browserInstance - */ - public ExtJSGrid(WebElement grid, BrowserInstance browserInstance) throws Exception { - this(grid, browserInstance, 30); - } - - private void init(){ - if(!this.driver.getClass().getName().equals("org.openqa.selenium.firefox.FirefoxDriver")) - { - WebDriverWait wait = new WebDriverWait(this.driver, this.timeout); - //try{ - //wait.until(new PageStatusChanged(this.grid.findElement(By.xpath("div/div[3]/div/table/tbody/tr/td[2]/table/tbody/tr/td[1]/table/tbody/tr/td/div")).getText().trim())); - //wait.until(new PageStatusChanged("")); - String[] statuses = {"", "Displaying Empty"}; - wait.until(new PageStatusChanged(statuses)); - //} - } - this.updateCurrentPage(); - this.updateTotalPages(); - } - - private void updateTotalPages(){ - this.totalPages = Integer.parseInt(this.pager.get(5).findElement(By.xpath("div")).getText().trim().substring(3)); - } - - private void updateCurrentPage(){ - this.currentPage = Integer.parseInt(this.pager.get(4).findElement(By.xpath("input")).getAttribute("value")); - } - - public int getCurrentPage(){ - return this.currentPage; - } - - public int getTotalPages(){ - return this.totalPages; - } - - public int nextPage(){ - Logger.addLog("next"); - return this.moveToPage(1); - } - - public int previousPage(){ - return this.moveToPage(0); - } - - public int firstPage(){ - return this.moveToPage(2); - } - - public int lastPage(){ - return this.moveToPage(3); - } - - public int refreshPage(){ - return this.moveToPage(4); - } - - public List getRows(){ - return this.grid.findElements(By.xpath("div/div[2]/div/div[1]/div[2]/div/div")); - } - - public void setSearchFieldGrid(Boolean headerToolBar, Integer cellNumber){ - this.searchInput = null; - /* - Logger.addLog("setSearchFieldGrid search cells: " + cellNumber); - //list of toolbar CELLS - Logger.addLog("setSearchFieldGrid Total toolbar cells: " + headerToolbarCells.size()); - Integer counter = 0; - for(WebElement toolbarElement: headerToolbarCells){ - counter++; - Logger.addLog(" setSearchFieldGrid Toolbar cells[" + counter + "]: " + toolbarElement.getText()); - }*/ - - //pm_search_text_field - - //set the search cell as a headerToolbar of footer cell in toolbar. - if(headerToolBar){ - this.searchInput = headerToolbarCells.get(cellNumber-1).findElement(By.cssSelector("input.x-form-text[type='text']")); - } - } - - public List getCurrentListRows(){ - //clear previous list of rows - - //div#ext-gen25.x-grid3 div#ext-gen26.x-grid3-viewport div#ext-gen28.x-grid3-scroller div#ext-gen30.x-grid3-body div.x-grid3-row - List listRows = this.gridBody.findElements(By.cssSelector("div.x-grid3-body div.x-grid3-row")); - Logger.addLog("Get current list of rows total: " + listRows.size()); - - //WaitTool.waitForJavaScriptCondition(this.driver, "return (document.readyState == 'complete');", 15); - - - List listGridRows = new ArrayList(listRows.size()); - - for (WebElement gridRow : listRows) { - Logger.addLog(" row data: " + gridRow.getText()); - - listGridRows.add(new ExtJSGridRow(gridRow)); - } - - return listGridRows; - } - - public List findRowsBySearchField(String searchCriteria) throws Exception { - if(this.searchInput == null){ - throw new Exception("Search field not defined, define it with setSearchFieldGrid function."); - } - - String currentTextStatus = this.bottomCellCounterText.getText().trim(); - - this.searchInput.sendKeys(searchCriteria); - this.searchInput.sendKeys(Keys.RETURN); - - //wait for counter of grid changes to one if the row is found. - //only wait for one, wait for text to change - //WaitTool.waitForTextPresent(this.driver, this.bottomCellCounterText, "Display Items 1 - 1 of 1", 15); - WaitTool.waitForTextToChange(this.driver, this.bottomCellCounterText, currentTextStatus, 15); - - //return list of rows, only the filtered list is returned - return this.getCurrentListRows(); - } - - public ExtJSGridRow searchAndReturnRow(String searchCriteria, String columnName) throws Exception { - ExtJSGridRow resultGridRow = null; - Boolean rowFound = false; - - if(this.searchInput == null){ - throw new Exception("Search field not defined, define it with setSearchFieldGrid function."); - } - - String currentTextStatus = this.bottomCellCounterText.getText().trim(); - - this.searchInput.sendKeys(searchCriteria); - this.searchInput.sendKeys(Keys.RETURN); - - //wait for counter of grid changes to one if the row is found. - //wait for text to change - WaitTool.waitForTextToChange(this.driver, this.bottomCellCounterText, currentTextStatus, 15); - - //return list of rows, only the filtered list is returned - List listFoundRows = this.getCurrentListRows(); - Logger.addLog("Search grid total items: " + listFoundRows.size()); - - //update header - this.gridBodyHeader = new ExtJSGridHeader(this.grid); - - //compare each found row with the value of the specified column - for (ExtJSGridRow gridRow:listFoundRows){ - //get the number of the column of the header - Integer headerIndex = this.gridBodyHeader.getHeaderColumnNumber(columnName); - Logger.addLog(" Header with name: " + columnName + " Index:" + headerIndex); - - Logger.addLog(" Row Data: " + gridRow.getRowColumnText(headerIndex)); - - if(gridRow.getRowColumnText(headerIndex).equals(searchCriteria)){ - resultGridRow = gridRow; - //rowFound = true; - break; - } - } - - return resultGridRow; - } - - public WebElement getRowByColumnValue(String columnName, String columnValue) throws Exception{ - WebElement header = this.grid.findElement(By.xpath("div/div[2]/div/div[1]/div[1]")); - List headerFields = header.findElements(By.xpath("div/div/table/thead/tr/td")); - int columnNumber = 1; - boolean flag = false; - for(WebElement field:headerFields) - { - if(field.getText().trim().equals(columnName)) - { - flag = true; - break; - } - columnNumber++; - } - if(!flag) - throw new Exception("No se encontro una columna en el grid con el nombre \""+columnName+"\""); - flag = false; - while(this.currentPage <= this.totalPages) - { - headerFields = this.getRows(); - Logger.addLog(headerFields.size() + " " + this.currentPage + " de " + this.totalPages); - for(WebElement row:headerFields) - if(row.findElement(By.xpath("table/tbody/tr/td["+Integer.toString(columnNumber)+"]/div")).getText().trim().equals(columnValue)) - return row; - if(this.currentPage == this.totalPages) - break; - this.nextPage(); - } - return null; - } - - public WebElement getRowByColumnsValue(String columnName, String otherColumnName, String columnValue, String otherColumnValue) throws Exception{ - WebElement header = this.grid.findElement(By.xpath("div/div[2]/div/div[1]/div[1]")); - List headerFields = header.findElements(By.xpath("div/div/table/thead/tr/td")); - int columnNumber = 1; - int otherColumnNumber = 1; - boolean flag = false; - for(WebElement field:headerFields) - { - if(field.getText().trim().equals(columnName)) - { - flag = true; - break; - } - columnNumber++; - } - if(!flag) - throw new Exception("No se encontraron columnas en el grid con el nombre \""+columnName+"\" "); - flag = false; - while(this.currentPage <= this.totalPages) - { - headerFields = this.getRows(); - Logger.addLog(headerFields.size() + " " + this.currentPage + " de " + this.totalPages); - for(WebElement row:headerFields) - if((row.findElement(By.xpath("table/tbody/tr/td["+Integer.toString(columnNumber)+"]/div")).getText().trim().equals(columnValue)) && (row.findElement(By.xpath("table/tbody/tr/td["+Integer.toString(otherColumnNumber)+"]/div")).getText().trim().equals(columnValue))) - return row; - if(this.currentPage == this.totalPages) - break; - this.nextPage(); - } - return null; - } - - - - private int moveToPage(int option){ - WebDriverWait wait = new WebDriverWait(this.driver, this.timeout); - PageStatusChanged statusChanged = new PageStatusChanged(); - PageRefreshed pageRefreshed = new PageRefreshed(); - - switch(option) - { - case 0: - if(this.currentPage == 1) - return 0; - this.btn_previous.click(); - break; - case 1: - if(this.currentPage >= this.totalPages) - return 0; - this.btn_next.click(); - break; - case 2: - if(this.currentPage == 1) - return 0; - this.btn_first.click(); - break; - case 3: - if(this.currentPage == this.totalPages) - return 0; - this.btn_last.click(); - break; - case 4: - this.btn_refresh.click(); - } - if(option!=4) - wait.until(statusChanged); - else - wait.until(pageRefreshed); - this.updateTotalPages(); - this.updateCurrentPage(); - return this.getCurrentPage(); - } - - private int inArray(String[] arr, String str){ - for(int i=0; i{ - - private String status; - private String[] statuses = {}; - - public PageStatusChanged(String status){ - this.status = status; - Logger.addLog("actual " + this.status); - } - - public PageStatusChanged(String[] statuses){ - this.statuses = statuses; - } - - public PageStatusChanged(){ - this.status = grid.findElement(By.xpath("div/div[3]/div/table/tbody/tr/td[2]/table/tbody/tr/td[1]/table/tbody/tr/td/div")).getText().trim(); - //Logger.addLog("actual "+this.status); - } - - @Override - public Boolean apply(WebDriver input) { - String actual = grid.findElement(By.xpath("div/div[3]/div/table/tbody/tr/td[2]/table/tbody/tr/td[1]/table/tbody/tr/td/div")).getText().trim(); - //Logger.addLog(actual+" / "+this.status+" => "+!actual.equals(this.status)); - if(this.statuses.length == 0) - return !actual.equals(this.status); - else - return !(inArray(this.statuses, actual)>-1); - } - } - - private class PageRefreshed implements ExpectedCondition{ - - @Override - public Boolean apply(WebDriver input) { - return pager.get(10).findElement(By.xpath("table")).getAttribute("class").indexOf("x-item-disabled") == -1; - } - } - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridHeader.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridHeader.java deleted file mode 100644 index ddec77654..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridHeader.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * Author: herbert - * Date: 5/16/13 - * Time: 11:40 AM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSGridHeader { - WebElement grid = null; - WebElement gridBody = null; - WebElement gridHeader = null; - List listColumns = null; - - /** - * Initialized the grid header with element that represent grid - * @param grid The element that has the class = x-grid-panel - */ - public ExtJSGridHeader(WebElement grid){ - - this.grid = grid; - this.gridBody = this.grid.findElement(By.cssSelector("div.x-grid3")); - - this.gridHeader = this.gridBody.findElement(By.cssSelector("div.x-grid3-header")); - this.listColumns = this.gridHeader.findElements(By.cssSelector("td.x-grid3-hd.x-grid3-cell:not([style='display:none'])")); - } - - /** - * Get the header column name in base to his position - * @param headerNumber one based index of the column - * @return the name of the column - */ - public String getHeaderColumnName(Integer headerNumber){ - WebElement cell = this.listColumns.get(headerNumber-1).findElement(By.className("x-grid3-hd-inner")); - return cell.getText(); - } - - public int countColumns(){ - return this.listColumns.size(); - } - - public Integer getHeaderColumnNumber(String headerName){ - Integer count = 0; - Boolean found = false; - for(WebElement header:this.listColumns){ - count++; - if(header.findElement(By.className("x-grid3-hd-inner")).getText().equals(headerName)){ - // - found = true; - break; - } - } - if(found){ - return count; - } - - return null; - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridRow.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridRow.java deleted file mode 100644 index 97521b882..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSGridRow.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 5/15/13 - * Time: 3:30 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSGridRow{ - WebElement gridRow = null; - List listColumns = null; - - /** - * Initialized with the webelement that represent a Tree-node
- * @param gridRow - */ - public ExtJSGridRow(WebElement gridRow){ - //validate - - this.gridRow = gridRow; - this.listColumns = this.gridRow.findElements(By.cssSelector("td.x-grid3-col.x-grid3-cell:not([style='display:none'])")); - } - - /** - * Get the cell(row, column) text - * @param columnNumber one based index of the column - * @return the text of the cell - */ - public String getRowColumnText(Integer columnNumber){ - WebElement cell = this.listColumns.get(columnNumber-1).findElement(By.className("x-grid3-cell-inner")); - return cell.getText(); - } - - public int countColumns(){ - return this.listColumns.size(); - } - - public WebElement getGridRow(){ - return this.gridRow; - } - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java deleted file mode 100644 index b6a83679f..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 12/17/13 - * Time: 2:16 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSMenuItem { - WebElement menuItem = null; - WebElement menuItemText = null; - - public ExtJSMenuItem(WebElement menuItem){ - this.menuItem = menuItem; - this.menuItemText = this.menuItem.findElement(By.className("x-menu-item-text")); - } - - /** - * Click element in Menu - */ - public void click(){ - this.menuItem.click(); - } - - /** - * Get text in menu - * @return - */ - public String getText(){ - - return this.menuItemText.getText(); - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java deleted file mode 100644 index dd249d904..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import com.colosa.qa.automatization.common.WaitTool; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 6/10/13 - * Time: 1:33 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSToolbar { - private BrowserInstance browserInstance; - private WebElement toolbar; - private WebElement toolbarContent; - private List listExtJSToolbarCells; - List auxSearchList; - - - /** - * Represents a ExtJs Toolbar - * @param toolbar element with class x-toolbar - * @param browserInstance browser instance - */ - public ExtJSToolbar(WebElement toolbar, BrowserInstance browserInstance) throws Exception { - this.browserInstance = browserInstance; - this.toolbar = toolbar; - - String classAttribute = toolbar.getAttribute("class"); - if(classAttribute.contains("x-toolbar")){ - //this is the toolbar element - Logger.addLog("The passed element is the same toolbar: x-toolbar"); - this.toolbar = toolbar; - }else{ - //search for the toolbar element - //Logger.addLog("before Toolbar find x-panel-tbar"); - // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. - auxSearchList = toolbar.findElements(By.className("x-toolbar")); - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.toolbar = auxSearchList.get(0); - Logger.addLog("Toolbar found x-toolbar"); - }else - { - throw new Exception("Toolbar not found in specified element."); - } - } - - //Logger.addLog("before Toolbar find x-toolbar-ct"); - auxSearchList = this.toolbar.findElements(By.className("x-toolbar-ct")); - if(auxSearchList.size() > 0){ - this.toolbarContent = auxSearchList.get(0); - Logger.addLog("Toolbar content found x-toolbar-ct"); - }else - { - throw new Exception("Toolbar content not found in toolbar element."); - } - - //detect all toolbar cells - this.listExtJSToolbarCells = queryListToolbarCells(); - } - - private List queryListToolbarCells(){ - - List listCells = this.toolbarContent.findElements(By.cssSelector("td.x-toolbar-cell")); - Logger.addLog("Get current list of cells: " + listCells.size()); - - - List listToolbarCells = new ArrayList(listCells.size()); - - for (WebElement toolbarCell : listCells) { - listToolbarCells.add(new ExtJSToolbarCell(toolbarCell, this.browserInstance)); - - Logger.addLog(" cell data: " + toolbarCell.getTagName() + ":" + toolbarCell.getText()); - } - - return listToolbarCells; - } - - public List getListToolbarCells(){ - return queryListToolbarCells(); - } - - /** - * Find cell in toolbar based in the cell text. - * @param buttonText text to search cell - * @return ExtJSToolbarCell found cell null in other case. - */ - public ExtJSToolbarCell findToolbarCell(String buttonText){ - ExtJSToolbarCell resultToolbarCell = null; - - for (ExtJSToolbarCell extjsToolbarCell : this.listExtJSToolbarCells) { - Logger.addLog(" toolbar cell:" + extjsToolbarCell.getCellText() + "==" + buttonText); - - if(extjsToolbarCell.getCellText().trim().equals(buttonText)){ - Logger.addLog(" toolbar cell found:" + extjsToolbarCell.getCellText()); - resultToolbarCell = extjsToolbarCell; - break; - } - } - - return resultToolbarCell; - } - - /** - * Find Toolbar cell in base to zero based index of cell - * @param cellIndex The Zero based index of the cell to return. - * @return ExtJSToolbarCell the found cell - */ - public ExtJSToolbarCell findToolbarCell(int cellIndex){ - ExtJSToolbarCell resultToolbarCell = null; - resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex); - WaitTool.waitForElementVisibleAndEnable(browserInstance.getInstanceDriver(), resultToolbarCell.getWebElement(), 5); - Logger.addLog(" return toolbar cell:" + cellIndex); - return resultToolbarCell; - } - - /* - public ExtJSToolbarCell waitForToolbarCellDisplay(int cellIndex){ - ExtJSToolbarCell resultToolbarCell = null; - resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex); - - //resultToolbarCell.getWebElement().isDisplayed(); - //Logger.addLog(" return toolbar cell:" + cellIndex); - return resultToolbarCell; - }*/ - - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java deleted file mode 100644 index 04b4ee0fc..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; - -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 6/10/13 - * Time: 1:45 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSToolbarCell { - private BrowserInstance browserInstance; - private WebElement toolbarCell; //element with class x-toolbar-cell - private List toolbarCellOptions; - /*private WebElement toolbarCellButton; - private WebElement toolbarCellText; - private WebElement toolbarCellSeparator; - private WebElement toolbarCellWrap;*/ - - /** - * Initialize with an element that represent a Toolbar Cell, that has the class x-toolbar-cell - * @param toolbarCell webelement with class x-toolbar-cell - * @param browserInstance browser instance - */ - public ExtJSToolbarCell(WebElement toolbarCell, BrowserInstance browserInstance) { - this.browserInstance = browserInstance; - - //this.headerToolbar = this.grid.findElement(By.cssSelector("div.x-panel-tbar")); - //this.headerToolbarCells = this.headerToolbar.findElements(By.cssSelector("td.x-toolbar-cell")); - this.toolbarCell = toolbarCell; - //WebElement toolbarCellContent; - //get the child - /* - this.toolbarCellTable = this.toolbarCell.findElement(By.cssSelector("table")); - this.driver = driver; - - //detect what type of cell is - String classAttribute = this.toolbarCellTable.getAttribute("class"); - - */ - /* - Logger.addLog("New Toolbar cell identify type"); - - this.browserInstance.turnOffImplicitWaits(); - this.toolbarCellOptions = this.toolbarCell.findElements(By.cssSelector(".x-btn, .xtb-text, .xtb-sep, .x-form-field-wrap")); - this.browserInstance.turnOnImplicitWaits(); - - if(this.toolbarCellOptions.size() > 0){ - Logger.addLog("Toolbar element found!!!"); - //an element was found - toolbarCellContent = this.toolbarCellOptions.get(0); - //detect what type of cell is - String classAttribute = toolbarCellContent.getAttribute("class"); - if(classAttribute.contains("x-btn")){ - Logger.addLog("It's a button!!!"); - this.toolbarCellButton = toolbarCellContent; - Logger.addLog(" text:" + getCellText()); - } - - if(classAttribute.contains("xtb-text")){ - Logger.addLog("It's a text!!!"); - this.toolbarCellText = toolbarCellContent; - Logger.addLog(" text:" + getCellText()); - } - - if(classAttribute.contains("xtb-sep")){ - Logger.addLog("It's a separator!!!"); - this.toolbarCellSeparator = toolbarCellContent; - Logger.addLog(" text:" + getCellText()); - } - - if(classAttribute.contains("x-form-field-wrap")){ - Logger.addLog("It's a wrapper!!!"); - this.toolbarCellWrap = toolbarCellContent; - Logger.addLog(" text:" + getCellText()); - } - } */ - } - - /** - * Get webelement of toolbar-cell - */ - public WebElement getWebElement(){ - return this.toolbarCell; - //html.ext-strict body#ext-gen3.ext-gecko div#navPanel.x-panel div#ext-gen16.x-panel-bwrap div#ext-gen17.x-panel-tbar div#ext-comp-1004.x-toolbar table.x-toolbar-ct tbody tr td.x-toolbar-left table tbody tr.x-toolbar-left-row td#ext-gen27.x-toolbar-cell table#caseNotes.x-btn tbody.x-btn-small tr td.x-btn-mc em button#ext-gen28.x-btn-text - } - - /** - * Click any non-identified element in toolbar-cell - */ - public void click(){ - this.toolbarCell.click(); - //html.ext-strict body#ext-gen3.ext-gecko div#navPanel.x-panel div#ext-gen16.x-panel-bwrap div#ext-gen17.x-panel-tbar div#ext-comp-1004.x-toolbar table.x-toolbar-ct tbody tr td.x-toolbar-left table tbody tr.x-toolbar-left-row td#ext-gen27.x-toolbar-cell table#caseNotes.x-btn tbody.x-btn-small tr td.x-btn-mc em button#ext-gen28.x-btn-text - } - - /** - * Click toolbar button - */ - public void clickButton() throws Exception { - WebElement cellButton = null; - Logger.addLog("click button"); - - this.browserInstance.turnOffImplicitWaits(); - this.toolbarCellOptions = this.toolbarCell.findElements(By.cssSelector(".x-btn")); - this.browserInstance.turnOnImplicitWaits(); - - if(this.toolbarCellOptions.size() > 0){ - Logger.addLog("button element found!!!"); - //an element was found - cellButton = this.toolbarCellOptions.get(0); - cellButton.findElement(By.cssSelector("button")).click(); - }else{ - throw new Exception("Button not found!!"); - } - - //x-btn x-btn-text-icon - //click the element if is a button - } - - /** - * Get text in cell - * @return - */ - public String getCellText(){ - String cellText = ""; - - cellText = this.toolbarCell.getText(); - - /* - //if is a button or a text get the text - // x-btn-text - if(this.toolbarCellText != null){ - - cellText = this.toolbarCellText.getText(); - //Logger.addLog("Cell text:" + cellText); - } - - if(this.toolbarCellButton != null){ - WebElement button = this.toolbarCellButton.findElement(By.className("x-btn-text")); - if(button != null){ - cellText = button.getText(); - //Logger.addLog("Button text:" + cellText); - } - } - - if(this.toolbarCellSeparator != null){ - cellText = "|"; - //Logger.addLog("Separator text:" + cellText); - } - - if(this.toolbarCellWrap != null){ - cellText = "[]"; - //Logger.addLog("Wrap text:" + cellText); - } */ - - return cellText; - } - - /** - * Set text in cell - * @param text - */ - public void setCellText(String text){ - this.toolbarCell.sendKeys(text); - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java deleted file mode 100644 index f7179db13..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java +++ /dev/null @@ -1,400 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import java.util.ArrayList; -import java.util.List; - -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.By; - -public class ExtJSTree{ - - private WebDriver driver; - private WebElement tree; - private int timeout; - private WebElement currentNode; - private WebElement root = null; - private List listTreeRootNodes; - - /** - * Class used to manage - navigate ext-js tree - * @param tree the web element that is most near to the element that has the class atribute= " x-tree-root-ct" - * The first element with this class is selected as the root of the tree. - * @param driver the web driver - */ - public ExtJSTree(WebElement tree, WebDriver driver) throws Exception { - this.driver = driver; - this.tree = tree; - //this.timeout = timeout; - //element with class x-tree-root-ct - Logger.addLog("ExtJSTree()->find x-tree-root-ct"); - this.root = tree.findElement(By.className("x-tree-root-ct"));//(By.xpath("div/div/ul/div")); - if(this.root == null){ - //change of root node - throw new Exception("No ExtJs tree structure found. The specified element is not a tree."); - } - - //check if there's another level - WebElement auxRoot = null; - auxRoot = this.root.findElement(By.className("x-tree-root-node")); - if(auxRoot != null){ - //change of root node - this.root =auxRoot; - } - - //this.currentNode = this.root; - - this.readTreeNodes(); - - //check if node was found - if(this.root == null){ - throw new Exception("No ExtJs tree structure found."); - } - } - - public List readTreeNodes(){ - List rootNodes = null; - - //search root nodes - rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node:not([style='display: none;'])")); //style="" [style=''] - //rootNodes = this.root.findElements(By.cssSelector("x-tree-node-el")); - - listTreeRootNodes = new ArrayList(rootNodes.size()); - - Logger.addLog("ExtJSTree()->getListRootNodes list x-tree-node-el: " + rootNodes.size()); - - for (WebElement rootNode : rootNodes) { - - ExtJSTreeNode newTreeNode = new ExtJSTreeNode(rootNode, this.driver); - - Logger.addLog("ExtJSTree()->rootNode: " + newTreeNode.getNodeText()); - - listTreeRootNodes.add(newTreeNode); - } - - return listTreeRootNodes; - } - - /** - * Go to element that represent the root "/" - */ - public void gotoRoot(){ - //this.root.findElement(By.xpath("div/a/span")).click(); - this.root = tree.findElement(By.className("x-tree-root-ct")); - this.currentNode = this.root; - } - - public void refresh(){ - this.tree.findElement(By.xpath("div[1]/div[1]")).click(); - //talvez esperar a que se termine de cargar - } - - public List getListRootNodes(){ - /*List rootNodes = null; - - //search root nodes - rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node")); //style="" [style=''] - //rootNodes = this.root.findElements(By.cssSelector("x-tree-node-el")); - - List listTreeRootNodes = new ArrayList(rootNodes.size()); - - Logger.addLog("ExtJSTree()->getListRootNodes list x-tree-node-el: " + listTreeRootNodes.size()); - - for (WebElement rootNode : rootNodes) { - - ExtJSTreeNode newTreeNode = new ExtJSTreeNode(rootNode, this.driver); - - Logger.addLog("ExtJSTree()->rootNode: " + newTreeNode.getNodeText()); - - listTreeRootNodes.add(newTreeNode); - } - - return listTreeRootNodes;*/ - return listTreeRootNodes; - } - - /** - * Select the specified node in the tree from the root - * @param nodePath The path to the node, start with /rootNode/nodelevel1/nodelevel2 etc. - * The complete path must be specified. Regular expressions are supported. - * @return The found tree node - */ - public ExtJSTreeNode getTreeNode(String nodePath, Boolean useRegularExpresion) throws Exception { - //ExtJSTreeNode treeNodeModel = new ExtJSTreeNode(); - - return ExtJSTreeNode.getTreeNodeInList(this.listTreeRootNodes, nodePath, useRegularExpresion); - - /* - ExtJSTreeNode resultTreeNode = null; - String searchPath = path; - - //search first node from left of path (root node) - String nodeName = getLeftNodePath(searchPath); - searchPath = removeLeftNodePath(searchPath); - - Logger.addLog("ExtJSTree()->getTreeNode: search node:" + nodeName + " pending path:" + searchPath ); - - - //search in root nodes - for(ExtJSTreeNode rootNodeElement:this.listTreeRootNodes){ - - //check if is the same node - if(useRegularExpresion){ - Logger.addLog("ExtJSTree()->getTreeNode: usign reg expresions if "+ rootNodeElement.getNodeText() + "== " + nodeName ); - if(rootNodeElement.getNodeText().matches(nodeName)){ - //verify if is the node that we are searching for - if(searchPath.equals("")){ - //this is the search node - resultTreeNode = rootNodeElement; - }else{ - //continue searching nodes - resultTreeNode = rootNodeElement.getTreeNode(searchPath, useRegularExpresion); - } - break; - } - }else{ - Logger.addLog("ExtJSTree()->getTreeNode: using equals if "+ rootNodeElement.getNodeText() + " == " + nodeName ); - if(rootNodeElement.getNodeText().equals(nodeName)){ - //verify if is the node that we are searching for - if(searchPath.equals("")){ - resultTreeNode = rootNodeElement; - }else{ - //continue searching nodes - resultTreeNode = rootNodeElement.getTreeNode(searchPath, useRegularExpresion); - } - break; - } - } - } - - if(resultTreeNode == null){ - throw new Exception("No treeNode found with the specified path."); - } - - return resultTreeNode; */ - } - - public ExtJSTreeNode getTreeNode(String path) throws Exception { - return getTreeNode(path, false); - } - -/* - public ExtJSTreeNode gotoNode(String path) throws Exception { - return gotoNode(path, false); - } */ - - /** - * Select the specified node in the tree from the root - * @param path The path to the node, start with /rootNode/nodelevel1/nodelevel2 etc. - * The complete path must be specified. Regular expressions are supported. - * @return The found tree node - */ - /* - public ExtJSTreeNode gotoNode(String path, Boolean useRegularExpresion) throws Exception { - String itemToSearch = null; - List rootNodes = null; - List filterNodes = null; - ExtJSTreeNode rootNode = null; - ExtJSTreeNode auxRootNode = null; - ExtJSTreeNode resultWebElement = null; - String searchPath = path; - - //search root nodes - Logger.addLog("ExtJsTree-> Root tagname:" + this.root.getTagName()); - rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node")); //style="" [style=''] - - //search first node from left of path (root node) - String nodeName = getLeftNodePath(searchPath); - searchPath = removeLeftNodePath(searchPath); - - //list of nodes - Logger.addLog("ExtJsTree->Number of root nodes found:" + rootNodes.size()); - Logger.addLog("ExtJsTree->Search root node:" + nodeName); - - //verify if list of nodes is available - if(rootNodes == null){ - throw new Exception("ExtJsTree->No root nodes detected in tree structure."); - } - - //x-tree-root-ct div.x-tree-root-node - //search the root node in the path - for(WebElement rootNodeElement:rootNodes){ - //check treenode text - auxRootNode = new ExtJSTreeNode(rootNodeElement, this.driver); - // - Logger.addLog("ExtJsTree->search rootNode:" + auxRootNode.getNodeText()); - - if(useRegularExpresion){ - if(auxRootNode.getNodeText().matches(nodeName)){ - rootNode = auxRootNode; - break; - } - }else{ - if(auxRootNode.getNodeText().equals(nodeName)){ - rootNode = auxRootNode; - break; - } - } - } - - //verify if root node is available - if(rootNode == null){ - throw new Exception("ExtJsTree->Root node not found."); - } - - //search for child nodes? - if(searchPath.trim().equals("")){ - //this is the search node - return rootNode; - } - - Logger.addLog("ExtJsTree-> Root node found:" + rootNode.getNodeText()); - - resultWebElement = gotoNodeFromNode(rootNode, searchPath, useRegularExpresion); - - return resultWebElement; - } - - public ExtJSTreeNode gotoNodeFromNode(ExtJSTreeNode currentNode, String path) throws Exception { - return this.gotoNodeFromNode(currentNode, path, false); - } - - */ - /** - * Find the node from the specified node, the path must not include the current node - * If the node is not found null is returned. - * @param currentNode the current node, is an element with the class = "x-tree-node" - * @param path path to the node, the current node must not be included. - * @return - */ - /* - public ExtJSTreeNode gotoNodeFromNode(ExtJSTreeNode currentNode, String path, Boolean useRegularExpresion) throws Exception { - ExtJSTreeNode rootNode = currentNode; - //ExtJSTreeNode auxRootNode = null; - String searchPath = path; - Boolean nodeFound =false; - - //current path - Logger.addLog("ExtJsTree->GotoNodeFromNode->current node Path:" + path); - - while(!searchPath.trim().equals("")){ - //verify if node is found in level - nodeFound =false; - - //search in list of nodes - //search first node from left of path (root node) - String auxNodeName = getLeftNodePath(searchPath); - searchPath = removeLeftNodePath(searchPath); - Logger.addLog("ExtJsTree->GotoNodeFromNode->find node:" + auxNodeName); - - //count child nodes - Logger.addLog("ExtJsTree->GotoNodeFromNode->child nodes:" + rootNode.getListChildNodes().size()); - for (ExtJSTreeNode childNode : rootNode.getListChildNodes()) { - - //check treenode text - //auxRootNode = new ExtJSTreeNode(webElement); - Logger.addLog("ExtJsTree->GotoNodeFromNode->search childNode:" + childNode.getNodeText()); - if(useRegularExpresion){ - if(childNode.getNodeText().matches(auxNodeName)){ - rootNode = childNode; - nodeFound = true; - break; - } - }else{ - if(childNode.getNodeText().equals(auxNodeName)){ - rootNode = childNode; - nodeFound = true; - break; - } - } - }; - //continue with the next level in path - if(nodeFound){ - //check if we are at the end of the path - if(!searchPath.trim().equals("")){ - //continue searching the path - //assign the new root node - //the found node was assigned to rootNode - } else - { - //the complete path was found - break; - } - }else{ - //node not found, return error - break; - } - } - //the found node is rootNode - if(nodeFound){ - //node found - Logger.addLog("Node found:" + rootNode.getNodeText()); - return rootNode; - } - else{ - throw new Exception("ExtJsTree->Node not found."); - } - }*/ - - public WebElement getRootNode(){ - return this.root; - } - - public WebElement getCurrentNode(){ - return this.currentNode; - } - /* - public String getLeftNodePath(String path){ - String workingPath = path; - - workingPath = removeSeparatorPath(workingPath); - - if(path.trim().equals("")){ - return ""; - } - - String[] splits = workingPath.split("/"); - - //se trata de - return splits[0]; - } - - public String removeLeftNodePath(String path){ - String workingPath = path; - - workingPath = removeSeparatorPath(workingPath); - - if(workingPath.trim().equals("")){ - return ""; - } - - int firstIndex = workingPath.indexOf("/"); - - //there's no more nodes - if(firstIndex == -1){ - return ""; - } - //se trata de - return workingPath.substring(firstIndex); - } - - public String removeSeparatorPath(String path){ - String workingPath = path; - - if(path.trim().equals("")){ - return ""; - } - - //quitar el nodo root si existe - if(workingPath.charAt(0) == '/'){ - workingPath = workingPath.substring(1); - } - //remove the last character - if(workingPath.charAt(workingPath.length()-1) == '/'){ - workingPath = workingPath.substring(0, workingPath.length()-1); - } - //se trata de - return workingPath; - }*/ -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java deleted file mode 100644 index cbb748661..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java +++ /dev/null @@ -1,202 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 5/7/13 - * Time: 2:07 PM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSTreeNode { - WebElement treeNode = null; - private WebDriver driver; - List childTreeNodes = null; - - /** - * This class represent a tree node element, must be initialized -> class x-tree-node-el - * @param treeNode element with class: x-tree-node-el - * @param driver - */ - public ExtJSTreeNode(WebElement treeNode, WebDriver driver){ - this.treeNode = treeNode; - this.driver = driver; - - //search the child nodes of this node - //childTreeNodes = findListChildNodes(); - } - - public String getNodeText(){ - WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el a.x-tree-node-anchor span")); - return node.getText(); - } - - public void click(){ - WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el a.x-tree-node-anchor")); - node.click(); - } - - public void doubleClick(){ - Actions action = new Actions(this.driver); - - WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el")); - action.doubleClick(node); - action.perform(); - } - - public int countChildNodes(){ - //List childList = this.treeNode.findElements(By.cssSelector("ul.x-tree-node-ct li.x-tree-node")); - return childTreeNodes.size(); - } - - private List findListChildNodes(){ - List childList = this.treeNode.findElements(By.cssSelector(this.treeNode.getTagName() + " > ul.x-tree-node-ct li.x-tree-node:not([style='display: none;'])")); //style="display: none;" - - Logger.addLog("ExtJSTreeNode()->findListChildNodes: " + this.treeNode.getTagName() + " > ul.x-tree-node-ct li.x-tree-node:not([style='display: none;']) count:" + childList.size()); - - List listTreeChildNodes = new ArrayList(childList.size()); - - for (WebElement childNode : childList) { - ExtJSTreeNode jsTreeNode = new ExtJSTreeNode(childNode, this.driver); - Logger.addLog("ExtJSTreeNode()->findListChildNodes add node to list: " + jsTreeNode.getNodeText()); - - listTreeChildNodes.add(jsTreeNode); - } - return listTreeChildNodes; - } - - public List getListChildNodes(){ - return childTreeNodes; - } - - /*public WebElement getWebElementNode(){ - return this.treeNode; - }*/ - - public ExtJSTreeNode getTreeNode(String nodePath, Boolean useRegularExpresion) throws Exception { - //find child tree nodes - this.childTreeNodes = findListChildNodes(); - - return this.getTreeNodeInList(this.childTreeNodes, nodePath, useRegularExpresion); - } - - /** - * Get the tree node in base to search path starting from current search node - * @param nodePath search path to find a node - * @param useRegularExpresion true if regular expression is used in search path - * @return - * @throws Exception - */ - public static ExtJSTreeNode getTreeNodeInList(List listTreeNodes, String nodePath, Boolean useRegularExpresion) throws Exception { - ExtJSTreeNode resultTreeNode = null; - String searchPath = nodePath; - - //search first node from left of path (root node) - String nodeName = getLeftNodePath(searchPath); - searchPath = removeLeftNodePath(searchPath); - - Logger.addLog("ExtJSTree()->getTreeNode: search node:" + nodeName + " pending path:" + searchPath ); - - //search in child nodes - for(ExtJSTreeNode treeNode:listTreeNodes){ - - //check if is the same node - if(useRegularExpresion){ - Logger.addLog("ExtJSTree()->getTreeNode: usign reg expresions if "+ treeNode.getNodeText() + " == " + nodeName ); - if(treeNode.getNodeText().matches(nodeName)){ - //verify if is the node that we are searching for - if(searchPath.equals("")){ - //this is the search node - resultTreeNode = treeNode; - }else{ - //continue searching nodes - resultTreeNode = treeNode.getTreeNode(searchPath, useRegularExpresion); - } - break; - } - }else{ - Logger.addLog("ExtJSTree()->getTreeNode: usign equals if "+ treeNode.getNodeText() + " == " + nodeName ); - if(treeNode.getNodeText().equals(nodeName)){ - //verify if is the node that we are searching for - if(searchPath.equals("")){ - resultTreeNode = treeNode; - }else{ - //continue searching nodes - resultTreeNode = treeNode.getTreeNode(searchPath, useRegularExpresion); - } - break; - } - } - } - - //if node null -> error - if(resultTreeNode == null){ - throw new Exception("No treeNode found with the specified path."); - } - - return resultTreeNode; - - } - - public static String getLeftNodePath(String path){ - String workingPath = path; - - workingPath = removeSeparatorPath(workingPath); - - if(path.trim().equals("")){ - return ""; - } - - String[] splits = workingPath.split("/"); - - //se trata de - return splits[0]; - } - - public static String removeLeftNodePath(String path){ - String workingPath = path; - - workingPath = removeSeparatorPath(workingPath); - - if(workingPath.trim().equals("")){ - return ""; - } - - int firstIndex = workingPath.indexOf("/"); - - //there's no more nodes - if(firstIndex == -1){ - return ""; - } - //se trata de - return workingPath.substring(firstIndex); - } - - public static String removeSeparatorPath(String path){ - String workingPath = path; - - if(path.trim().equals("")){ - return ""; - } - - //quitar el nodo root si existe - if(workingPath.charAt(0) == '/'){ - workingPath = workingPath.substring(1); - } - //remove the last character - if(workingPath.charAt(workingPath.length()-1) == '/'){ - workingPath = workingPath.substring(0, workingPath.length()-1); - } - //se trata de - return workingPath; - } - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java deleted file mode 100644 index 04df0b7d0..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.util.List; - -/** - * Created with IntelliJ IDEA. - * User: herbert - * Date: 12/18/13 - * Time: 10:14 AM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSWindow { - private BrowserInstance browserInstance; - private WebElement xWindow; - private WebElement xWindowContent; - List auxSearchList; - - public ExtJSWindow(BrowserInstance browserInstance) throws Exception { - //search the first visible windows - this.browserInstance = browserInstance; - - // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. - auxSearchList = browserInstance.getInstanceDriver().findElements(By.cssSelector("div.x-window")); //[style='visibility: visible'] - if(auxSearchList.size() > 0){ - //use the first x-toolbar found - this.xWindow = auxSearchList.get(0); - Logger.addLog("xWindow found div.x-window [style='visibility:visible']"); - }else - { - throw new Exception("xWindow not found in specified element."); - } - - auxSearchList = this.xWindow.findElements(By.cssSelector("div.x-window-body")); - if(auxSearchList.size() > 0){ - this.xWindowContent = auxSearchList.get(0); - Logger.addLog("xWindow content found div.x-window-body"); - }else - { - throw new Exception("xWindow content not found in browser."); - } - } - - public WebElement getWindowElement(){ - return this.xWindow; - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java deleted file mode 100644 index 36689be92..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.colosa.qa.automatization.common.extJs; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; - -import java.util.ArrayList; -import java.util.List; - -/** - * Represents a x windows Toolbar. - * User: herbert - * Date: 10/4/13 - * Time: 11:01 AM - * To change this template use File | Settings | File Templates. - */ -public class ExtJSWindowToolbar { - private BrowserInstance browserInstance; - private WebElement toolbar; - private WebElement toolbarContent; - private List listExtJSToolbarCells; - - /** - * Represents a ExtJs Window Toolbar - * @param toolbar element with class x-window-tbar - * @param browserInstance - */ - public ExtJSWindowToolbar(WebElement toolbar, BrowserInstance browserInstance){ - this.browserInstance = browserInstance; - this.toolbar = toolbar; - - String classAttribute = toolbar.getAttribute("class"); - if(classAttribute.contains("x-window-tbar")){ - //this is the toolbar element - Logger.addLog("The passed element is the same toolbar: x-window-tbar"); - this.toolbar = toolbar; - }else{ - //search for the toolbar element - //Logger.addLog("before Toolbar find x-panel-tbar"); - this.toolbar = toolbar.findElement(By.className("x-window-tbar")); - Logger.addLog("Toolbar found x-window-tbar"); - } - - //Logger.addLog("before Toolbar find x-toolbar-ct"); - //this.toolbarContent = this.toolbar.findElement(By.className("x-toolbar-ct")); - //Logger.addLog("Toolbar content found x-toolbar-ct"); - - this.listExtJSToolbarCells = queryListToolbarCells(); - } - - private List queryListToolbarCells(){ - - //List listCells = this.toolbarContent.findElements(By.cssSelector("td.x-toolbar-cell")); - List listCells = this.toolbar.findElements(By.cssSelector("td.x-toolbar-cell")); - Logger.addLog("Found current list of cells: " + listCells.size()); - - List listToolbarCells = new ArrayList(listCells.size()); - - for (WebElement toolbarCell : listCells) { - Logger.addLog(" create toolbar cell data."); - - listToolbarCells.add(new ExtJSToolbarCell(toolbarCell, this.browserInstance)); - - Logger.addLog(" cell data: " + toolbarCell.getTagName() + ":" + toolbarCell.getText()); - } - - return listToolbarCells; - } - - public ExtJSToolbarCell findToolbarCell(String buttonText){ - ExtJSToolbarCell resultToolbarCell = null; - - for (ExtJSToolbarCell extjsToolbarCell : this.listExtJSToolbarCells) { - //Logger.addLog(" toolbar cell:" + extjsToolbarCell.getCellText() + " vs " + buttonText); - - if(extjsToolbarCell.getCellText().trim().equals(buttonText)){ - Logger.addLog(" toolbar cell found:" + extjsToolbarCell.getCellText()); - resultToolbarCell = extjsToolbarCell; - break; - } - } - - return resultToolbarCell; - } - - public ExtJSToolbarCell findToolbarCell(int cellIndex){ - ExtJSToolbarCell resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex); - return resultToolbarCell; - } - - -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java b/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java deleted file mode 100644 index edb4f736d..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.colosa.qa.automatization.pages; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.ConfigurationSettings; - -public abstract class Page{ - protected String url; - protected String pageTitle; - protected BrowserInstance browser; - protected Integer implicitWaitSeconds = 0; - - public Page(BrowserInstance browser) throws Exception { - this.browser = browser; - - //init implicit wait time - implicitWaitSeconds = Integer.parseInt(ConfigurationSettings.getInstance().getSetting("implicit.wait.seconds")); - browser.setImplicitWait(implicitWaitSeconds); - - url = ""; - pageTitle = ""; - //Logger.addLog("Page contructor....:" + url); - } - - /** - * Go to default URL server - */ - public void gotoUrl(String url){ - this.url = url; - //Logger.addLog("Page.Goto url:" + url); - this.browser.gotoUrl(url); - //Logger.addLog("Browser.goto url:" + url); - } - - public boolean isAt(){ - return (this.browser.title() == pageTitle); - } - - public abstract void verifyPage() throws Exception; -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java b/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java deleted file mode 100644 index 706340024..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.colosa.qa.automatization.pages; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.ConfigurationSettings; - -import java.io.IOException; - -public class Pages{ - protected BrowserInstance _browserInstance; - - public Pages(BrowserInstance browserInstance){ - _browserInstance = browserInstance; - } - - public void gotoDefaultUrl() throws IOException { - String url; - //default url - url = ConfigurationSettings.getInstance().getSetting("server.url"); - - _browserInstance.gotoUrl(url); - } - - /* - public Login Login() throws Exception{ - - Login loginPage = new Login(_browserInstance); - - return loginPage; - } - - public Main Main() throws Exception{ - - Main mainPage = new Main(_browserInstance); - - return mainPage; - } - */ - - -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java b/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java deleted file mode 100644 index 748b01f6f..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.colosa.qa.automatization.tests.common; - -import com.colosa.qa.automatization.common.BrowserSettings; -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.ConfigurationSettings; -import com.colosa.qa.automatization.common.Logger; -import com.colosa.qa.automatization.pages.Pages; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; -import org.junit.After; -import org.junit.runners.Suite; - -import java.io.IOException; -import java.util.Arrays; -import java.util.Collection; - -/** - * Created with IntelliJ IDEA. - * User: Herbert Saal - * Date: 3/28/13 - * Time: 11:58 AM - * To change this template use File | Settings | File Templates. - */ -@RunWith(value = Parameterized.class) -public abstract class Test { - protected String browserName; - protected BrowserInstance browserInstance; - protected Pages pages; - - /*public Test() throws IOException { - - String browserName = "firefox"; - - this.browserName = browserName; - Logger.addLog("Test with browser:" + browserName); - //initialize test pages - initializeTest(browserName); - //initialize pages - pages = new Pages(browserInstance); - } */ - - public Test(String browserName) throws IOException { - - this.browserName = browserName; - Logger.addLog("Test with browser:" + browserName); - //initialize test pages - initializeTest(browserName); - //initialize pages - pages = new Pages(browserInstance); - } - - @Parameters - public static Collection data() { - int browserCount = 1; - Object[][] data = null; - //get the supported browsers from configuration file: - try { - browserCount = Integer.parseInt(ConfigurationSettings.getInstance().getSetting("browser.count")); - - data = new Object[browserCount][1]; - for (int i = 0; i< browserCount; i++){ - String browserName = ConfigurationSettings.getInstance().getSetting("browser.browser" + (i + 1)); - data[i][0] = browserName; - Logger.addLog("Add Browser for test: "+browserName); - } - } catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - - //Object[][] data = new Object[][] { { "firefox" }, { "chrome" }, { "ie" } }; - //Logger.addLog("Browsers to test with:" + Arrays.toString(data)); - - return Arrays.asList(data); - - /*return Arrays.asList(new Object[][]) { - { "AGCCG", "AGTTA" }, - { "AGTTA", "GATCA" }, - { "GGGAT", "AGCCA" } - } */ - } - - public void initializeTest(String browserName) throws IOException { - Logger.addLog("initializeTest ."); - //creates the instance of the Browser - BrowserSettings browserSettings = BrowserInstance.getDefaultBrowserSettings(browserName); - Logger.addLog("initializeTest .."); - //change browser name - browserSettings.setBrowserName(browserName); - Logger.addLog("initializeTest ..."); - browserInstance = new BrowserInstance(browserSettings); - Logger.addLog("initializeTest ...."); - } - - public void goToUrl(String url){ - browserInstance.gotoUrl(url); - } -} diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/WebDriverFunctionsPMOS2.java b/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/WebDriverFunctionsPMOS2.java deleted file mode 100644 index 26947b2c5..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/WebDriverFunctionsPMOS2.java +++ /dev/null @@ -1,348 +0,0 @@ -/* -Pensado y Desarrollado por Daniel Canedo -para Colosa QA -http://duhnnie.net -last update: 2012-10-23 Hrs. 16:40 -*/ - -package com.colosa.qa.automatization.tests.common; - -import com.colosa.qa.automatization.common.BrowserInstance; -import com.colosa.qa.automatization.common.Logger; -import com.colosa.qa.automatization.common.extJs.ExtJSGrid; -import org.openqa.selenium.By; -import org.openqa.selenium.Keys; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -public class WebDriverFunctionsPMOS2{ - - private WebDriver driver = null; - private BrowserInstance _browserInstance = null; - private int skin = 1; //0: classic / 1: uxmodern - private int timeout = 30; //default timeout in seconds - - public WebDriverFunctionsPMOS2(BrowserInstance browserInstance, int skin){ - this.driver = browserInstance.getInstanceDriver(); - this._browserInstance = browserInstance; - this.skin = skin; - } - - public WebDriverFunctionsPMOS2(BrowserInstance browserInstance, int skin, int timeout){ - this(browserInstance, skin); - this.timeout = timeout; - this.driver.manage().timeouts().implicitlyWait(this.timeout, TimeUnit.SECONDS); - } - - public boolean login(String username, String password, String workspace){ - this.waitForElementPresent(By.name("form[USR_USERNAME]")); - if(this.skin == 1) - { - WebElement we = this.driver.findElement(By.name("form[USR_USERNAME]")); - we.clear(); - we.sendKeys(username); - we = this.driver.findElement(By.name("form[USR_PASSWORD]")); - we.clear(); - we.sendKeys(password); - we = this.driver.findElement(By.id("workspace")); - we.clear(); - we.sendKeys(workspace); - this.driver.findElement(By.name("form[USR_PASSWORD]")).sendKeys(Keys.RETURN); - } - else - { - WebElement we = this.driver.findElement(By.id("form[USR_USERNAME]")); - we.clear(); - we.sendKeys(username); - we = this.driver.findElement(By.name("form[USR_PASSWORD]")); - we.clear(); - we.sendKeys(password); - we = this.driver.findElement(By.id("form[USER_ENV]")); - if(we.getAttribute("type").equals("text")) - we.clear(); - we.sendKeys(workspace); - we = this.driver.findElement(By.id("form[BSUBMIT]")); - we.click(); - } - return true; - } - - public void logout(){ - this.driver.switchTo().defaultContent(); - if(this.skin==0) - this.driver.findElement(By.xpath("//*[@id='pm_header']/table/tbody/tr[1]/td[2]/div/small/a")).click(); - } - - public boolean goSection(String sectionName){ - - WebElement we = null; - List wel; - this.driver.switchTo().defaultContent(); - Logger.addLog("Redireccionando a seccion " + sectionName + "..."); - if(this.skin == 0) - { - this.waitForElementPresent(By.cssSelector("ul#pm_menu li a"),60); - we = this.driver.findElement(By.id("pm_menu")); - we = we.findElement(By.linkText(sectionName)); - } - else - { - this.waitForElementPresent(By.xpath("//div[@id='mainTabPanel']"), 60); - wel = this.driver.findElements(By.xpath("//div[@id='mainTabPanel']/div/div/ul/li")); - for(WebElement we2:wel) - { - we = we2.findElement(By.xpath("a[2]/em/span/span")); - if(we.getText().equals(sectionName)) - break; - } - } - //Logger.addLog(we); //raro pero se necesita esta linea para que funcione correctamente - if(we == null) - return false; - we.click(); - return true; - } - - private String[] pathToArray(String path){ - if(path.charAt(0) == '/') - path = path.substring(1); - if(path.charAt(path.length()-1) == '/') - path = path.substring(0, path.length()); - - return path.split("/"); - } - - public boolean selectMenuTreePanelOption(String path) throws Exception{ - List wel; - WebElement option = null; - String[] pathLevels; - String aux=""; - - if(path.length() == 0) - return false; - - pathLevels = this.pathToArray(path.toLowerCase()); - - if(pathLevels.length>2) - throw new Exception("the PATH parameter must contain up to 2 path levels."); - - Logger.addLog("Intentando ingresar a " + pathLevels[0] + ((pathLevels.length > 1) ? " => " + pathLevels[1] : "") + "..."); - - this.goSection("HOME"); - if(this.skin == 0) - this.driver.switchTo().frame("casesFrame"); - else - { - this.waitForElementPresent(By.id("pm-frame-cases"),this.timeout); - this.driver.switchTo().frame("pm-frame-cases"); - } - - if(pathLevels.length==2 || path.charAt(path.length()-1)=='/') - wel = this.driver.findElements(By.xpath("//div[@id='tree-panel']/div/div/ul/div/li")); - else - wel = this.driver.findElements(By.xpath("//div[@id='tree-panel']/div/div/ul/div/li/ul/li")); - for(WebElement we:wel) - try{ - aux = we.findElement(By.xpath("div/a/span")).getText().toLowerCase(); - if(aux.length()>=pathLevels[0].length()) - if(aux.substring(0, pathLevels[0].length()).equals(pathLevels[0])) - { - option = we; - break; - } - }catch(java.lang.StringIndexOutOfBoundsException e){ - throw new Exception("No se encontró el grupo de opciones: \""+pathLevels[0]+"\""); - } - if(option == null) - throw new Exception("No se encontró el grupo de opciones: \""+pathLevels[0]+"\""); - if(pathLevels.length==2) - { - wel = option.findElements(By.xpath("ul/li")); - option = null; - for(WebElement we:wel) - { - aux = we.findElement(By.xpath("div/a/span")).getText().toLowerCase(); - try{ - if(aux.substring(0, pathLevels[1].length()).equals(pathLevels[1])) - { - option = we; - break; - } - }catch(java.lang.StringIndexOutOfBoundsException e) - { - throw new Exception("No se encontró opción: \""+pathLevels[1] + "\" en el grupo de opciones: \""+pathLevels[0]+"\""); - } - } - if(option == null) - throw new Exception("No se encontró opción: \""+pathLevels[1] + "\" en el grupo de opciones: \""+pathLevels[0]+"\""); - } - option.findElement(By.xpath("div/a/span")).click(); - return true; - } - - public int startCase(String processName) throws Exception{ - WebElement we; - String[] path = this.pathToArray(processName); - List wel; - Actions action = new Actions(this.driver); - boolean flag = false; - int value = 0; - - this.selectMenuTreePanelOption("Cases/New case"); - this.driver.switchTo().frame("casesSubFrame"); - //this.waitForElementPresent(By.id("startCaseTreePanel"),30);//para telefónica - we = this.driver.findElement(By.id("startCaseTreePanel")); - if(path.length>2) - throw new Exception("the string Path parameter can contain up to 2 segments, you asshole!"); - - Logger.addLog("Buscando caso " + processName + "..."); - if(path.length==2) - { - wel = we.findElements(By.xpath("div/div[2]/ul/div/li")); - we = null; - for(WebElement we2:wel) - if(we2.findElement(By.xpath("div/a/span")).getText().equals(path[0])) - { - we = we2; - break; - } - if(we == null) - throw new Exception("No se encontro el proceso: "+processName); - wel = we.findElements(By.xpath("ul/li")); - for(WebElement we2:wel) - { - we = we2.findElement(By.xpath("div/a/span")); - if(we.getText().equals(path[1])) - { - flag = true; - break; - } - } - if(!flag) - throw new Exception("No se encontro el proceso: "+processName); - } - else{ - wel = we.findElements(By.xpath("div/div[2]/ul/div/li/ul/li")); - for(WebElement we2:wel) - { - we = we2.findElement(By.xpath("div/a/span")); - if(we.getText().equals(path[0])) - { - flag = true; - break; - } - } - if(!flag) - throw new Exception("No se encontro el proceso: "+processName); - } - Logger.addLog("Iniciando caso " + processName + "..." + we); - action.doubleClick(we); - action.perform(); - - value = Integer.parseInt(this.driver.findElement(By.xpath("//div[@id='caseTabPanel']/div[1]/div[1]/ul/li[@id='caseTabPanel__casesTab']")).getText().trim().substring(8)); - return value; - } - - public int startCase(String processName, boolean flag) throws Exception{ - int value = this.startCase(processName); - if(flag) - { - this.waitForElementPresent(By.id("openCaseFrame"), this.timeout); - this.driver.switchTo().frame("openCaseFrame"); - } - return value; - } - - public boolean openProcess(String processName) throws Exception { - this.goSection("DESIGNER"); - WebElement we = null; - Actions action = new Actions(this.driver); - - if(this.skin == 0) - this.driver.switchTo().frame("frameMain"); - if(this.skin == 1) - this.driver.switchTo().frame("pm-frame-processes"); - - WebElement grid = this.driver.findElement(By.id("processesGrid")); - ExtJSGrid extGrid = new ExtJSGrid(grid, this._browserInstance); - WebElement pager = this.driver.findElement(By.xpath("//div[@id='processesGrid']/div/div[3]/div/table/tbody/tr/td[1]/table/tbody/tr")); - List wl; - int index = 1; - int pages = Integer.parseInt(pager.findElement(By.xpath("td[6]/div")).getText().trim().substring(3)); - - Logger.addLog("Buscando proceso \"" + processName + "\"..."); - - while(extGrid.getCurrentPage()<=extGrid.getTotalPages() && we==null){ - Logger.addLog("Buscando en pagina " + extGrid.getCurrentPage() + " de " + extGrid.getTotalPages() + "..."); - wl = grid.findElements(By.xpath("div/div[2]/div/div[1]/div[2]/div/div")); - for(WebElement we2:wl) - { - //Logger.addLog(we2.findElement(By.xpath("table/tbody/tr[1]/td[5]/div")).getText()+" "+processName); - if(we2.findElement(By.xpath("table/tbody/tr[1]/td[5]/div")).getText().equals(processName)) - { - we = we2; - Logger.addLog("Se encontro el proceso \"" + processName + "\""); - break; - } - } - if(extGrid.getCurrentPage()==extGrid.getTotalPages() || we!=null) - break; - extGrid.nextPage(); - } - - if(we==null) - Logger.addLog("ERROR al intentar abrir el proceso \"" + processName + "\", no se encontró el proceso"); //talvez se deberia lanzar un error - else - { - Logger.addLog("Abriendo proceso \"" + processName + "\"..."); - action.doubleClick(we); - action.perform(); - } - return true; - } -/* - public void openCase(int numCase){ - ExtJSGrid grid; - this.selectMenuTreePanelOption("Cases/Inbox"); - this.driver.switchTo().frame("casesSubFrame"); - grid = new ExtJSGrid(this.driver.findElement(By.id("casesGrid")), this.driver); - grid.getRowByColumn("#", Integer.toString(numCase)); - }*/ - - public boolean openProcess(String processName, String category){ - return true; - } - - public WebElement getTask(String taskName){ - WebElement designPanel = this.driver.findElement(By.xpath("//div[@id='pm_target']/div[1]/div[1]/div[3]")); - return designPanel.findElement(By.xpath("div[@class='processmap_task___processmaker'][div[1]='"+taskName.trim()+"']")); - } - - public void selectTaskContextMenuOption(String taskName, String option){ - WebElement contextMenu; - new Actions(this.driver).contextClick(this.getTask(taskName)).perform(); - contextMenu = this.driver.findElement(By.cssSelector("body > div.app_menuRight_container___processmaker")); - contextMenu.findElement(By.xpath("div[div[2]='"+option.trim()+"']")).click(); - } - - public boolean waitForElementPresent(By elementLocator){ - return this.waitForElementPresent(elementLocator, this.timeout); - } - - public boolean waitForElementPresent(By elementLocator, long timeout){ - this.driver.manage().timeouts().implicitlyWait(timeout, TimeUnit.SECONDS); - //try{ - this.driver.findElement(elementLocator); - - this.driver.manage().timeouts().implicitlyWait(this.timeout, TimeUnit.SECONDS); - return true; - //}catch(NoSuchElementException e){ - //System.err.print(e.getMessage()); - //} - //return false; - } -} \ No newline at end of file diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/test/Example.java b/tests/functional/src/main/java/com/colosa/qa/automatization/tests/test/Example.java deleted file mode 100644 index 993058c34..000000000 --- a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/test/Example.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.colosa.qa.automatization.tests.test; - -import com.colosa.qa.automatization.common.FieldType; -import com.colosa.qa.automatization.common.Logger; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Created with IntelliJ IDEA. - * User: marco - * Date: 09-07-13 - * Time: 04:41 PM - * To change this template use File | Settings | File Templates. - */ -public class Example extends com.colosa.qa.automatization.tests.common.Test { - - public Example(String browserName) throws IOException { - super(browserName); - } - - @Before - public void setup(){ - - } - - @After - public void cleanup(){ - //browserInstance.quit(); - } - - @Test - public void testExample() throws FileNotFoundException, IOException, Exception{ - pages.gotoDefaultUrl(); - - Logger.addLog("Test testDependentFieldsCase with browserName:" + this.browserName); - - } -} diff --git a/tests/functional/src/test/java/com/colosa/qa/automatization/TestSuiteAll.java b/tests/functional/src/test/java/com/colosa/qa/automatization/TestSuiteAll.java deleted file mode 100644 index 6801383f4..000000000 --- a/tests/functional/src/test/java/com/colosa/qa/automatization/TestSuiteAll.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.colosa.qa.automatization; - -import com.colosa.qa.automatization.common.Logger; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Created with IntelliJ IDEA. - * User: Herbert Saal - * Date: 3/4/13 - * Time: 2:27 PM - * To change this template use File | Settings | File Templates. - - */ -@RunWith(value = Suite.class) -@SuiteClasses({ - com.colosa.qa.automatization.tests.test.Example.class - - }) -public class TestSuiteAll { - @BeforeClass - public static void setUpClass() { - Logger.addLog("Master setup"); - - } - - @AfterClass public static void tearDownClass() { - // Logger.addLog("Master tearDown"); - } -} diff --git a/tests/tools/generateTestUnit.php b/tests/tools/generateTestUnit.php deleted file mode 100644 index 6e064fe63..000000000 --- a/tests/tools/generateTestUnit.php +++ /dev/null @@ -1,308 +0,0 @@ -#!/usr/bin/php - $token ) { - if ( is_array($token) && $token[0] != T_WHITESPACE ) { - $temp[] = $tokens[$k]; - } - if ( !is_array($token)) { - $temp[] = $token; - } - } - $tokens = $temp; - - $className = ''; - $comments = ''; - $path = '/' . str_replace (ROOT_PATH, '', $file); - - $atLeastOneClass = false; - - foreach ( $tokens as $k => $token ) { - if ( is_array($token) ) { - //looking for classes - if ( $token[0] == T_CLASS ) { - if ( $atLeastOneClass ) { - fprintf ( $fp, " } \n" ); - } - $atLeastOneClass = true; - $className = nextToken( T_STRING, $k ); - if (strpos(strtolower($entry), strtolower($className))) { - print "--> $className\n"; - } else { - print "--> $className ($entry)\n"; - } - $classFile = $folder . '/' . $entry; - if ( !is_dir($outputDir . $folder)) { - mkdir($outputDir . $folder, 0777, true); - } - $fp = fopen ( $outputDir . $folder . '/class' . $className . 'Test.php', 'w'); - fprintf ( $fp, "object = new %s();\n", $className); - fprintf ( $fp, " }\n\n"); - fprintf ( $fp, " /**\n" ); - fprintf ( $fp, " * Tears down the fixture, for example, closes a network connection.\n" ); - fprintf ( $fp, " * This method is called after a test is executed.\n" ); - fprintf ( $fp, " */\n" ); - fprintf ( $fp, " protected function tearDown()\n"); - fprintf ( $fp, " {\n"); - fprintf ( $fp, " }\n"); - fprintf ( $fp, "\n"); - - $methods = get_class_methods($className); - fprintf ( $fp, " /**\n" ); - fprintf ( $fp, " * This is the default method to test, if the class still having \n" ); - fprintf ( $fp, " * the same number of methods.\n" ); - fprintf ( $fp, " */\n" ); - fprintf ( $fp, " public function testNumberOfMethodsInThisClass()\n"); - fprintf ( $fp, " {\n"); - fprintf ( $fp, " \$methods = get_class_methods('%s');", $className ); - fprintf ( $fp, " \$this->assertTrue( count(\$methods) == %s);\n", count($methods) ); - fprintf ( $fp, " }\n"); - fprintf ( $fp, "\n"); - - } - - if ( $token[0] == T_FUNCTION ) { - $functionName = nextToken( T_STRING, $k ); - $public = previousToken( T_PUBLIC, $k ); - $comments = previousToken( T_DOC_COMMENT, $k ); - parseFunction ( $k, $path, $className, $functionName, $comments); - //if ( strtolower($public) == 'public' ) parsePublic ( $path, $className, $functionName, $comments ); - } - } - } - if ( $atLeastOneClass ) { - fprintf ( $fp, " } \n" ); - } -} - -/* -[GetCaseInfo] - class = BpmnEngine_Services_Case - path = /businessLogic/modules/bpmnEngine/Services/Case.php - gearman = false - rest = false - background = false -*/ - - function parseFunction ( $k, $path, $className, $functionName, $comments ) { - global $fp; - global $tokens; - if ( trim($className) == '' ) return; - $comm = explode ("\n", $comments); - - $params = array(); - //print " --> $functionName ( "; - - //search for first ( open parenthesis - $openParenthesis = false; - $closeParenthesis = false; - while ( ! $openParenthesis ) { - if (! is_array($tokens[$k]) && $tokens[$k] == '(' ) - $openParenthesis = true; - $k++; - } - while ( ! $closeParenthesis ) { - if (is_array($tokens[$k]) && $tokens[$k][0] == T_VARIABLE ) { - //print " " . $tokens[$k][1]; - } - if (! is_array($tokens[$k]) && $tokens[$k] == ')' ) { - $closeParenthesis = true; - //print " \n"; - } - $k++; - } - - $methods = get_class_methods($className); - if (!in_array($functionName, $methods ) ) { - return; - } - fprintf ( $fp, " /**\n" ); - fprintf ( $fp, " * @covers %s::%s\n", $className, $functionName ); - fprintf ( $fp, " * @todo Implement test%s().\n", $functionName ); - fprintf ( $fp, " */\n" ); - fprintf ( $fp, " public function test%s()\n", $functionName ); - fprintf ( $fp, " {\n" ); - fprintf ( $fp, " \$methods = get_class_methods(\$this->object);\n"); - fprintf ( $fp, " \$this->assertTrue( in_array('%s', \$methods ), 'exists method %s' );\n",$functionName,$functionName); - fprintf ( $fp, " \$r = new ReflectionMethod('%s', '%s');\n", $className, $functionName ); - fprintf ( $fp, " \$params = \$r->getParameters();\n"); - $r = new ReflectionMethod($className, $functionName); - $params = $r->getParameters(); - foreach ( $params as $key=>$param) { - fprintf ( $fp, " \$this->assertTrue( \$params[$key]->getName() == '%s');\n", $param->getName()); - fprintf ( $fp, " \$this->assertTrue( \$params[$key]->isArray() == %s);\n", $param->isArray() == true ? 'true':'false'); - fprintf ( $fp, " \$this->assertTrue( \$params[$key]->isOptional () == %s);\n", $param->isOptional() == true ? 'true':'false'); - if ($param->isOptional()) { - fprintf ( $fp, " \$this->assertTrue( \$params[$key]->getDefaultValue() == '%s');\n", $param->getDefaultValue() ); - } - } -// fprintf ( $fp, " \$this->markTestIncomplete('This test has not been implemented yet.');\n\n"); - - - fprintf ( $fp, " } \n\n" ); - } - - function parsePublic ( $path, $className, $functionName, $comments ) { - global $fp; - $comm = explode ("\n", $comments); - $gearman = false; - $rest = false; - $background = false; - foreach ( $comm as $k => $line ) { - $line = trim(str_replace('*','',$line)); - if (substr($line,0, 13) == '@background =') $background = strtolower(trim(substr( $line,14 ))); - if (substr($line,0, 10) == '@gearman =') $gearman = strtolower(trim(substr( $line,11 ))); - if (substr($line,0, 7) == '@rest =') $rest = strtolower(trim(substr( $line,7 ))); - } - fprintf ( $fp, "[$functionName]\n class = $className\n path = $path\n" ); - fprintf ( $fp, " gearman = " . ($gearman == 'true' ? 'true' : 'false') . "\n" ); - fprintf ( $fp, " background = " . ($background== 'true' ? 'true' : 'false') . "\n" ); - fprintf ( $fp, " rest = " . ($rest == 'true' ? 'true' : 'false') . "\n" ); - fprintf ( $fp, "\n" ); - } - - - - function nextToken( $type, $k ) { - global $tokens; - do { - $k++; - if ($tokens[$k][0] == T_FUNCTION || $tokens[$k][0] == T_CLASS ) { - return ''; - } - } while ( $k < count($tokens) && $tokens[$k][0] != $type ); - if ( isset($tokens[$k]) ) { - return $tokens[$k][1]; - } - else { - return ''; - } - } - - function previousToken( $type, $k ) { - global $tokens; - do { - $k--; - if ($tokens[$k][0] == T_FUNCTION || $tokens[$k][0] == T_CLASS ) { - return ''; - } - } while ( $k > 0 && $tokens[$k][0] != $type ); - - if ( isset($tokens[$k]) ) { - return $tokens[$k][1]; - } - else { - return ''; - } - } - - diff --git a/tests/unit/backend/README.txt b/tests/unit/backend/README.txt deleted file mode 100644 index 4fc8a25c7..000000000 --- a/tests/unit/backend/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Use this folder to store the backend test units (PHPUnit). -This folder must reflect the directory structure of the project. diff --git a/tests/unit/backend/gulliver/system/GTest.php b/tests/unit/backend/gulliver/system/GTest.php deleted file mode 100644 index 932eeb89f..000000000 --- a/tests/unit/backend/gulliver/system/GTest.php +++ /dev/null @@ -1,1810 +0,0 @@ -assertFalse(G::is_https()); - - $_SERVERÍ„['HTTPS'] = ''; - $this->assertFalse(G::is_https()); - - $_SERVER['HTTPS'] = 'on'; - $this->assertTrue(G::is_https()); - } - - /** - * @covers G::array_fill_value - * @todo Implement testArray_fill_value(). - */ - public function testArray_fill_value() - { - $arrayTest = '1'; - $arrayRes = G::array_fill_value($arrayTest); - $this->assertTrue( (is_array($arrayRes) && (count($arrayRes) == 0)) ); - - // $recursive = false and new Value = '' - $arrayTest = array('value1','value2','value3','value4'); - $arrayRes = G::array_fill_value($arrayTest); - $this->assertEquals($arrayRes['0'],''); - $this->assertEquals($arrayRes['1'],''); - $this->assertEquals($arrayRes['2'],''); - $this->assertEquals($arrayRes['3'],''); - - // $recursive = false and new Value = 'valueTest' - $arrayTest = array('value1','value2','value3','value4'); - $arrayRes = G::array_fill_value($arrayTest,'valueTest'); - $this->assertEquals($arrayRes['0'],'valueTest'); - $this->assertEquals($arrayRes['1'],'valueTest'); - $this->assertEquals($arrayRes['2'],'valueTest'); - $this->assertEquals($arrayRes['3'],'valueTest'); - - // $recursive = true and new Value = 'valueTest' - $arrayTestSub1 = array('value11', 'value12', 'value13'); - $arrayTestSub2 = array('value21', 'value22', 'value23'); - $arrayTestSub3 = array('value31', 'value32', 'value33'); - $arrayTest = array('value1', $arrayTestSub1, $arrayTestSub1, $arrayTestSub1); - $arrayRes = G::array_fill_value($arrayTest,'valueTest',true); - $this->assertEquals($arrayRes['0'],'valueTest'); - $this->assertEquals($arrayRes['1']['0'],'valueTest'); - $this->assertEquals($arrayRes['1']['1'],'valueTest'); - $this->assertEquals($arrayRes['1']['2'],'valueTest'); - - $this->assertEquals($arrayRes['2']['0'],'valueTest'); - $this->assertEquals($arrayRes['2']['1'],'valueTest'); - $this->assertEquals($arrayRes['2']['2'],'valueTest'); - - $this->assertEquals($arrayRes['3']['0'],'valueTest'); - $this->assertEquals($arrayRes['3']['1'],'valueTest'); - $this->assertEquals($arrayRes['3']['2'],'valueTest'); - - // $recursive = true and new Value = '' - $arrayTestSub1 = array('value11', 'value12', 'value13'); - $arrayTestSub2 = array('value21', 'value22', 'value23'); - $arrayTestSub3 = array('value31', 'value32', 'value33'); - $arrayTest = array('value1', $arrayTestSub1, $arrayTestSub1, $arrayTestSub1); - $arrayRes = G::array_fill_value($arrayTest,'',true); - $this->assertEquals($arrayRes['0'],''); - $this->assertEquals($arrayRes['1']['0'],''); - $this->assertEquals($arrayRes['1']['1'],''); - $this->assertEquals($arrayRes['1']['2'],''); - - $this->assertEquals($arrayRes['2']['0'],''); - $this->assertEquals($arrayRes['2']['1'],''); - $this->assertEquals($arrayRes['2']['2'],''); - - $this->assertEquals($arrayRes['3']['0'],''); - $this->assertEquals($arrayRes['3']['1'],''); - $this->assertEquals($arrayRes['3']['2'],''); - } - - /** - * @covers G::generate_password - * @todo Implement testGenerate_password(). - */ - public function testGenerate_password() - { - // $length = '' - $responsePass = G::generate_password(); - $this->assertEquals(strlen($responsePass),8); - - // $length = '32' - $responsePass = G::generate_password(10); - $this->assertEquals(strlen($responsePass),10); - } - - /** - * @covers G::array_concat - * @todo Implement testArray_concat(). - */ - public function testArray_concat() - { - $arrayTest1 = array('value11','value12'); - $arrayTest2 = array('value21','value22'); - $arrayTest3 = array('value31','value32'); - $arrayTest = array($arrayTest1, $arrayTest2, $arrayTest3); - - $arrayResponse = G::array_concat($arrayTest); - - $this->assertEquals($arrayResponse['0']['0'],'value11'); - $this->assertEquals($arrayResponse['0']['1'],'value12'); - $this->assertEquals($arrayResponse['1']['0'],'value21'); - $this->assertEquals($arrayResponse['1']['1'],'value22'); - $this->assertEquals($arrayResponse['2']['0'],'value31'); - $this->assertEquals($arrayResponse['2']['1'],'value32'); - } - - /** - * @covers G::var_compare - * @todo Implement testVar_compare(). - */ - public function testVar_compare() - { - /** - * @error : Function may receive only one variable, but fires a warning. - @example : - */ - // - - $this->assertTrue(G::var_compare(true,true)); - - $this->assertFalse(G::var_compare(true,false)); - - $this->assertTrue(G::var_compare(true,true,true)); - - $this->assertFalse(G::var_compare(true,true,false)); - } - - /** - * @covers G::var_probe - * @todo Implement testVar_probe(). - */ - public function testVar_probe() - { - $this->assertEquals(G::var_probe('string'),'string'); - $this->assertEquals(G::var_probe(false,false),1); - } - - /** - * @covers G::getVersion - * @todo Implement testGetVersion(). - */ - public function testGetVersion() - { - // @verify - //$this->assertEquals($valueResponse,'3.0-1'); - } - - /** - * @covers G::getIpAddress - * @todo Implement testGetIpAddress(). - */ - public function testGetIpAddress() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::getMacAddress - * @todo Implement testGetMacAddress(). - */ - public function testGetMacAddress() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::microtime_float - * @todo Implement testMicrotime_float(). - */ - public function testMicrotime_float() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::setFatalErrorHandler - * @todo Implement testSetFatalErrorHandler(). - */ - public function testSetFatalErrorHandler() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::setErrorHandler - * @todo Implement testSetErrorHandler(). - */ - public function testSetErrorHandler() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::fatalErrorHandler - * @todo Implement testFatalErrorHandler(). - */ - public function testFatalErrorHandler() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::customErrorHandler - * @todo Implement testCustomErrorHandler(). - */ - public function testCustomErrorHandler() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::showErrorSource - * @todo Implement testShowErrorSource(). - */ - public function testShowErrorSource() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::customErrorLog - * @todo Implement testCustomErrorLog(). - */ - public function testCustomErrorLog() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::verboseError - * @todo Implement testVerboseError(). - */ - public function testVerboseError() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::encrypt - * @todo Implement testEncrypt(). - */ - public function testEncrypt() - { - $encryptPassword = '6czY7OLU688'; - $encryptResponse = G::encrypt('password','key'); - $this->assertEquals($encryptResponse, $encryptPassword); - } - - /** - * @covers G::decrypt - * @todo Implement testDecrypt(). - */ - public function testDecrypt() - { - $encryptPassword = 'password'; - $encryptResponse = G::decrypt('6czY7OLU688','key'); - } - - /** - * @covers G::lookup - * @todo Implement testLookup(). - */ - public function testLookup() - { - // @verify function - } - - /** - * @covers G::mk_dir - * @todo Implement testMk_dir(). - */ - public function testMk_dir() - { - $newDir = PATH_HOME.'test'; - G::mk_dir($newDir); - $this->assertTrue(is_dir($newDir)); - if ( is_dir($newDir) ) - { - rmdir($newDir); - } - } - - /** - * @covers G::rm_dir - * @todo Implement testRm_dir(). - */ - public function testRm_dir() - { - /* - * - *@verify function does not work - - $newDir = PATH_HOME.'test'; - G::mk_dir($newDir); - if ( is_dir($newDir) ) - { - G::rm_dir($newDir); - $this->assertFalse(is_dir($newDir)); - } - */ - } - - /** - * @covers G::verifyPath - * @todo Implement testVerifyPath(). - */ - public function testVerifyPath() - { - $dirExist = PATH_HOME; - $this->assertTrue(G::verifyPath($dirExist)); - - $dirNoExist = PATH_HOME.'test'; - if ( is_dir($dirNoExist) ) { - rmdir($dirNoExist); - } - $this->assertFalse(G::verifyPath($dirNoExist)); - - $dirNoExist = PATH_HOME.'test'; - $this->assertFalse(G::verifyPath($dirNoExist,true)); - $this->assertTrue(G::verifyPath($dirNoExist)); - if ( is_dir($dirNoExist) ) { - rmdir($dirNoExist); - } - } - - /** - * @covers G::expandPath - * @todo Implement testExpandPath(). - */ - public function testExpandPath() - { - $valueResponse = G::expandPath(''); - $this->assertEquals($valueResponse, PATH_CORE); - - $valueResponse = G::expandPath('test'); - $this->assertEquals($valueResponse, PATH_CORE . "test/"); - } - - /** - * @covers G::LoadSystem - * @todo Implement testLoadSystem(). - */ - public function testLoadSystem() - { - G::LoadSystem("controller"); - $this->assertTrue(class_exists('Controller')); - } - - /** - * @covers G::LoadSystemExist - * @todo Implement testLoadSystemExist(). - */ - public function testLoadSystemExist() - { - $this->assertTrue(G::LoadSystemExist("controller")); - - $this->assertFalse(G::LoadSystemExist("noExist")); - } - - /** - * @covers G::RenderPage - * @todo Implement testRenderPage(). - */ - public function testRenderPage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadSkin - * @todo Implement testLoadSkin(). - */ - public function testLoadSkin() - { - // @verify useless function - } - - /** - * @covers G::LoadInclude - * @todo Implement testLoadInclude(). - */ - public function testLoadInclude() - { - $this->assertTrue( G::LoadInclude('application') && class_exists('App') ); - - $this->assertTrue( G::LoadInclude('ajax') && function_exists('ajax_show_menu')); - - $this->assertFalse( G::LoadInclude('test') ); - } - - /** - * @covers G::LoadAllModelClasses - * @todo Implement testLoadAllModelClasses(). - */ - public function testLoadAllModelClasses() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadAllPluginModelClasses - * @todo Implement testLoadAllPluginModelClasses(). - */ - public function testLoadAllPluginModelClasses() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadTemplate - * @todo Implement testLoadTemplate(). - */ - public function testLoadTemplate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadClassRBAC - * @todo Implement testLoadClassRBAC(). - */ - public function testLoadClassRBAC() - { - /* - * @verify useless function - */ - } - - /** - * @covers G::LoadClass - * @todo Implement testLoadClass(). - */ - public function testLoadClass() - { - G::LoadClass('cli'); - $this->assertTrue(class_exists('CLI')); - - G::LoadClass('rbac'); - $this->assertTrue(class_exists('RBAC')); - - $this->assertFalse(G::LoadClass('noExist')); - } - - /** - * @covers G::LoadThirdParty - * @todo Implement testLoadThirdParty(). - */ - public function testLoadThirdParty() - { - G::LoadThirdParty('lime','lime'); - $this->assertTrue(class_exists('lime_test')); - } - - /** - * @covers G::encryptlink - * @todo Implement testEncryptlink(). - */ - public function testEncryptlink() - { - $this->assertEquals(G::encryptlink('url'),'url'); - - define('ENABLE_ENCRYPT', 'yes'); - $urlEncrypt = 'qNWc'; - $this->assertEquals(G::encryptlink('url'),$urlEncrypt); - } - - /** - * @covers G::parseURI - * @todo Implement testParseURI(). - */ - public function testParseURI() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::strip_slashes - * @todo Implement testStrip_slashes(). - */ - public function testStrip_slashes() - { - $stringTest = 'h\e\l\l\o'; - $this->assertEquals(G::strip_slashes($stringTest),'hello'); - - $arrayTest = array('h\e\l\l\o', 'h\i' , 't\e\s\t'); - $arrayResponse = G::strip_slashes($arrayTest); - $this->assertEquals($arrayResponse['0'],'hello'); - $this->assertEquals($arrayResponse['1'],'hi'); - $this->assertEquals($arrayResponse['2'],'test'); - } - - /** - * @covers G::logTimeByPage - * @todo Implement testLogTimeByPage(). - */ - public function testLogTimeByPage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::streamCSSBigFile - * @todo Implement testStreamCSSBigFile(). - */ - public function testStreamCSSBigFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::streamJSTranslationFile - * @todo Implement testStreamJSTranslationFile(). - */ - public function testStreamJSTranslationFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::streamFile - * @todo Implement testStreamFile(). - */ - public function testStreamFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::trimSourceCodeFile - * @todo Implement testTrimSourceCodeFile(). - */ - public function testTrimSourceCodeFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::sendHeaders - * @todo Implement testSendHeaders(). - */ - public function testSendHeaders() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::virtualURI - * @todo Implement testVirtualURI(). - */ - public function testVirtualURI() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::createUID - * @todo Implement testCreateUID(). - */ - public function testCreateUID() - { - $uidTest001 = 'cDhpajRHQ2paUQ______'; - $responseUID = G::createUID('test','001'); - $this->assertEquals($responseUID, $uidTest001); - } - - /** - * @covers G::getUIDName - * @todo Implement testGetUIDName(). - */ - public function testGetUIDName() - { - $uidTest001 = 'cDhpajRHQ2paUQ______'; - $responseUID = G::getUIDName($uidTest001); - $this->assertEquals($responseUID, 'test'.'001'); - } - - /** - * @covers G::formatNumber - * @todo Implement testFormatNumber(). - */ - public function testFormatNumber() - { - $valueNum = 100; - $responseNum = G::formatNumber($valueNum); - $this->assertEquals($valueNum, $responseNum); - } - - /** - * @covers G::formatDate - * @todo Implement testFormatDate(). - */ - public function testFormatDate() - { - /* - * @verify function does not return the correct value in the variable F - * - * - */ - - $valueFormatDate = Date('d j F m n y Y g G h H i s'); - $stringDate = G::formatDate(Date("Y-m-d H:i:s"), 'd j F m n y Y g G h H i s', 'es'); - //$this->assertEquals($valueFormatDate, $responseNum); - } - - /** - * @covers G::getformatedDate - * @todo Implement testGetformatedDate(). - */ - public function testGetformatedDate() - { - /* - * @verify function does not return the correct value in the variable F - * - * - */ - - $valueFormatDate = Date('d j F m n y Y g G h H i s'); - $stringDate = G::formatDate(Date("Y-m-d H:i:s"), 'd j F m n y Y g G h H i s', 'es'); - //$this->assertEquals($valueFormatDate, $responseNum); - } - - /** - * @covers G::arrayDiff - * @todo Implement testArrayDiff(). - */ - public function testArrayDiff() - { - $arrayValues1 = array('value1', 'value2', 'value3', 'value4', 'value5', 'value6', 'value7', 'value8'); - $arrayValues2 = array('value1', 'value2', 'value3', 'value4'); - $arrayRes = G::arrayDiff($arrayValues1, $arrayValues2); - - $this->assertEquals($arrayRes['0'], 'value5'); - $this->assertEquals($arrayRes['1'], 'value6'); - $this->assertEquals($arrayRes['2'], 'value7'); - $this->assertEquals($arrayRes['3'], 'value8'); - - $arrayRes = G::arrayDiff($arrayValues2, $arrayValues1); - - $this->assertEquals(count($arrayRes), 0); - } - - /** - * @covers G::complete_field - * @todo Implement testComplete_field(). - */ - public function testComplete_field() - { - $intTest1 = 145; - $valueResponse = G::complete_field($intTest1, 3, 1); - $this->assertEquals($valueResponse, '145'); - - $intTest1 = 145; - $valueResponse = G::complete_field($intTest1, 5, 1); - $this->assertEquals($valueResponse, '00145'); - - $intTest1 = 'test'; - $valueResponse = G::complete_field($intTest1, 3, 2); - $this->assertEquals($valueResponse, 'test'); - - $intTest1 = 'test'; - $valueResponse = G::complete_field($intTest1, 8, 2); - $this->assertEquals($valueResponse, ' test'); - - $intTest1 = 541; - $valueResponse = G::complete_field($intTest1, 3, 2); - $this->assertEquals($valueResponse, '541.'); - - $intTest1 = 541; - $valueResponse = G::complete_field($intTest1, 5, 2); - $this->assertEquals($valueResponse, '00541.'); - - $intTest1 = 541.45; - $valueResponse = G::complete_field($intTest1, 3, 2); - $this->assertEquals($valueResponse, '541.45'); - - $intTest1 = 541.45; - $valueResponse = G::complete_field($intTest1, 5, 2); - $this->assertEquals($valueResponse, '00541.45'); - } - - /** - * @covers G::sqlEscape - * @todo Implement testSqlEscape(). - */ - public function testSqlEscape() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::MySQLSintaxis - * @todo Implement testMySQLSintaxis(). - */ - public function testMySQLSintaxis() - { - //define('DB_ADAPTER', 'mysql'); - $this->assertTrue(G::MySQLSintaxis()); - } - - /** - * @covers G::replaceDataField - * @todo Implement testReplaceDataField(). - */ - public function testReplaceDataField() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::loadLanguageFile - * @todo Implement testLoadLanguageFile(). - */ - public function testLoadLanguageFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::registerLabel - * @todo Implement testRegisterLabel(). - */ - public function testRegisterLabel() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadMenuXml - * @todo Implement testLoadMenuXml(). - */ - public function testLoadMenuXml() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::SendMessageXml - * @todo Implement testSendMessageXml(). - */ - public function testSendMessageXml() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::SendTemporalMessage - * @todo Implement testSendTemporalMessage(). - */ - public function testSendTemporalMessage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::SendMessage - * @todo Implement testSendMessage(). - */ - public function testSendMessage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::SendMessageText - * @todo Implement testSendMessageText(). - */ - public function testSendMessageText() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadMessage - * @todo Implement testLoadMessage(). - */ - public function testLoadMessage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadXmlLabel - * @todo Implement testLoadXmlLabel(). - */ - public function testLoadXmlLabel() - { - $response = 'xxxxxx'; - $this->assertEquals(G::LoadXmlLabel('test'),'xxxxxx'); - } - - /** - * @covers G::LoadMessageXml - * @todo Implement testLoadMessageXml(). - */ - public function testLoadMessageXml() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadTranslationObject - * @todo Implement testLoadTranslationObject(). - */ - public function testLoadTranslationObject() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadTranslation - * @todo Implement testLoadTranslation(). - */ - public function testLoadTranslation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::getTranslations - * @todo Implement testGetTranslations(). - */ - public function testGetTranslations() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::LoadArrayFile - * @todo Implement testLoadArrayFile(). - */ - public function testLoadArrayFile() - { - $this->assertEquals(G::LoadArrayFile(),null); - } - - /** - * @covers G::expandUri - * @todo Implement testExpandUri(). - */ - public function testExpandUri() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::genericForceLogin - * @todo Implement testGenericForceLogin(). - */ - public function testGenericForceLogin() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::capitalize - * @todo Implement testCapitalize(). - */ - public function testCapitalize() - { - $name = 'brayan'; - $this->assertEquals('Brayan',G::capitalize($name)); - } - - /** - * @covers G::toUpper - * @todo Implement testToUpper(). - */ - public function testToUpper() - { - $name = 'brayan'; - $this->assertEquals('BRAYAN',G::toUpper($name)); - } - - /** - * @covers G::toLower - * @todo Implement testToLower(). - */ - public function testToLower() - { - $name = 'BRAYAN'; - $this->assertEquals('brayan',G::toLower($name)); - } - - /** - * @covers G::http_build_query - * @todo Implement testHttp_build_query(). - */ - public function testHttp_build_query() - { - $response = G::http_build_query(array('valor1','valor2'),'num','val'); - $this->assertEquals('val[num0]=valor1&val[num1]=valor2', $response); - } - - /** - * @covers G::header - * @todo Implement testHeader(). - */ - public function testHeader() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::forceLogin - * @todo Implement testForceLogin(). - */ - public function testForceLogin() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::add_slashes - * @todo Implement testAdd_slashes(). - */ - public function testAdd_slashes() - { - // @verify : function not work - //$response = G::add_slashes('path\\dirc'); - //$this->assertEquals($response,'\\test\\ '); - } - - /** - * @covers G::uploadFile - * @todo Implement testUploadFile(). - */ - public function testUploadFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::resizeImage - * @todo Implement testResizeImage(). - */ - public function testResizeImage() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::array_merges - * @todo Implement testArray_merges(). - */ - public function testArray_merges() - { - $arrayTest1 = array( 'camp1' => 'val1', - 'camp2' => 'val2', - 'camp3' => 'val3', - 'camp4' => 'val4' - ); - - $arrayTest2 = array( 'camp1' => '1', - 'camp2' => '2' - ); - - $arrayResponse = G::array_merges($arrayTest1, $arrayTest2); - $this->assertEquals($arrayResponse['camp1'],'1'); - $this->assertEquals($arrayResponse['camp2'],'2'); - - $arrayResponse = G::array_merges($arrayTest2, $arrayTest1); - $this->assertEquals($arrayResponse['camp3'],'val3'); - $this->assertEquals($arrayResponse['camp4'],'val4'); - } - - /** - * @covers G::array_merge_2 - * @todo Implement testArray_merge_2(). - */ - public function testArray_merge_2() - { - $arrayTest1 = array( 'camp1' => 'val1', - 'camp2' => 'val2', - 'camp3' => 'val3', - 'camp4' => 'val4' - ); - - $arrayTest2 = array( 'camp1' => '1', - 'camp2' => '2' - ); - - $arrayResponse = G::array_merge_2($arrayTest1, $arrayTest2); - $this->assertEquals($arrayTest1['camp1'],'1'); - $this->assertEquals($arrayTest1['camp2'],'2'); - - $arrayResponse = G::array_merge_2($arrayTest2, $arrayTest1); - $this->assertEquals($arrayTest2['camp3'],'val3'); - $this->assertEquals($arrayTest2['camp4'],'val4'); - } - - /** - * @covers G::generateUniqueID - * @todo Implement testGenerateUniqueID(). - */ - public function testGenerateUniqueID() - { - $uid = G::generateUniqueID(); - $this->assertTrue(is_string($uid) && (strlen($uid) == 32)); - } - - /** - * @covers G::generateCode - * @todo Implement testGenerateCode(). - */ - public function testGenerateCode() - { - $uid = G::generateCode(); - $this->assertTrue(is_numeric($uid) && (strlen($uid) == 4)); - - $uid = G::generateCode(10); - $this->assertTrue(is_numeric($uid) && (strlen($uid) == 10)); - - $uid = G::generateCode('ALPHA'); - $this->assertTrue(is_string($uid) && (strlen($uid) == 4)); - } - - /** - * @covers G::verifyUniqueID - * @todo Implement testVerifyUniqueID(). - */ - public function testVerifyUniqueID() - { - $uid = G::generateUniqueID(); - $response = G::verifyUniqueID($uid); - $this->assertTrue($response); - } - - /** - * @covers G::is_utf8 - * @todo Implement testIs_utf8(). - */ - public function testIs_utf8() - { - $this->assertTrue(G::is_utf8('árbol')); - $this->assertTrue(G::is_utf8('árbol')); - } - - /** - * @covers G::CurDate - * @todo Implement testCurDate(). - */ - public function testCurDate() - { - $dateNow = Date('Y-m-d H:i:s'); - $this->assertEquals($dateNow,G::CurDate()); - - $dateNow = Date('H:i:s'); - $this->assertEquals($dateNow,G::CurDate('H:i:s')); - } - - /** - * @covers G::getSystemConstants - * @todo Implement testGetSystemConstants(). - */ - public function testGetSystemConstants() - { - $response = G::getSystemConstants(); - $this->assertTrue(is_array($response)); - } - - /** - * @covers G::capitalizeWords - * @todo Implement testCapitalizeWords(). - */ - public function testCapitalizeWords() - { - $response = G::capitalizeWords('brian real'); - $this->assertEquals('Brian Real', $response); - } - - /** - * @covers G::unhtmlentities - * @todo Implement testUnhtmlentities(). - */ - public function testUnhtmlentities() - { - $response = G::unhtmlentities('árbol'); - $this->assertEquals($response, 'árbol'); - } - - /** - * @covers G::xmlParser - * @todo Implement testXmlParser(). - */ - public function testXmlParser() - { - // conchalo : no file xml - } - - /** - * @covers G::_del_p - * @todo Implement test_del_p(). - */ - public function test_del_p() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::ary2xml - * @todo Implement testAry2xml(). - */ - public function testAry2xml() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::ins2ary - * @todo Implement testIns2ary(). - */ - public function testIns2ary() - { - $test = array('value1', 'value2'); - G::ins2ary($test,'newValue',0); - $this->assertEquals($test['0'],'newValue'); - $this->assertEquals($test['1'],'value1'); - } - - /** - * @covers G::evalJScript - * @todo Implement testEvalJScript(). - */ - public function testEvalJScript() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::inflect - * @todo Implement testInflect(). - */ - public function testInflect() - { - $this->assertEquals( G::inflect('àchélo'), 'achelo'); - } - - /** - * @covers G::pr - * @todo Implement testPr(). - */ - public function testPr() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::dump - * @todo Implement testDump(). - */ - public function testDump() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::stripCDATA - * @todo Implement testStripCDATA(). - */ - public function testStripCDATA() - { - $this->assertEquals('value',G::stripCDATA('')); - } - - /** - * @covers G::sys_get_temp_dir - * @todo Implement testSys_get_temp_dir(). - */ - public function testSys_get_temp_dir() - { - $tmpDir = G::sys_get_temp_dir(); - $this->assertFileExists($tmpDir); - $this->assertTrue(is_writable($tmpDir)); - } - - /** - * @covers G::PMWSCompositeResponse - * @todo Implement testPMWSCompositeResponse(). - */ - public function testPMWSCompositeResponse() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::emailAddress - * @todo Implement testEmailAddress(). - */ - public function testEmailAddress() - { - $this->assertFalse(G::emailAddress('email')); - - $response = G::emailAddress('test@email.com'); - $this->assertEquals('test@email.com',$response->email); - $this->assertEquals('',$response->name); - - $response = G::emailAddress('Person '); - //$this->assertEquals('test@email.com',$response->email); - //$this->assertEquals('',$response->name); - } - - /** - * @covers G::json_encode - * @todo Implement testJson_encode(). - */ - public function testJson_encode() - { - $arrayTest = array( 'pos1' => 'value1', - 'pos2' => 'value2', - 'pos3' => 'value3', - ); - $response = G::json_encode($arrayTest); - $this->assertEquals('{"pos1":"value1","pos2":"value2","pos3":"value3"}',$response); - } - - /** - * @covers G::json_decode - * @todo Implement testJson_decode(). - */ - public function testJson_decode() - { - $jsonTest = '{"pos1":"value1","pos2":"value2","pos3":"value3"}'; - $response = G::json_decode($jsonTest); - $this->assertEquals($response->pos1, 'value1'); - $this->assertEquals($response->pos2, 'value2'); - $this->assertEquals($response->pos3, 'value3'); - } - - /** - * @covers G::isHttpRequest - * @todo Implement testIsHttpRequest(). - */ - public function testIsHttpRequest() - { - $response = G::isHttpRequest(); - $this->assertFalse($response); - - $_SERVER['SERVER_SOFTWARE'] = 'Apache/2.2.8 (CentOS)'; - $response = G::isHttpRequest(); - $this->assertTrue($response); - } - - /** - * @covers G::sendMail - * @todo Implement testSendMail(). - */ - public function testSendMail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::envelopEmailAddresses - * @todo Implement testEnvelopEmailAddresses(). - */ - public function testEnvelopEmailAddresses() - { - $dataAddresses = array( 'to' => 'test1@colosa.com', - 'cc' => array( 'test2@colosa.com ', - 'test3@colosa.com', - 'test4@colosa.com' - ), - 'bcc'=> array( 'test5@colosa.com') - ); - $response = G::envelopEmailAddresses($dataAddresses); - - - $this->assertEquals($response['to']['0']['0'], 'test1@colosa.com'); - /* - $this->assertEquals($response['cc']['0']['0'], 'test2@colosa.com'); - $this->assertEquals($response['cc']['0']['1'], 'test3@colosa.com'); - $this->assertEquals($response['cc']['0']['2'], 'test4@colosa.com'); - */ - $this->assertEquals($response['bcc']['0']['0'], 'test5@colosa.com'); - } - - /** - * @covers G::gettype - * @todo Implement testGettype(). - */ - public function testGettype() - { - $value = NULL; - //$this->assertEquals(G::gettype($value),'NULL'); - // Remove the following lines when you implement this test. - // function no work with null - - $value = true; - $this->assertEquals(G::gettype($value),'boolean'); - - $value = 15.25; - $this->assertEquals(G::gettype($value),'double'); - - $value = 142; - $this->assertEquals(G::gettype($value),'integer'); - - $value = 'string'; - $this->assertEquals(G::gettype($value),'string'); - - $value = array('val1', 'val2'); - $this->assertEquals(G::gettype($value),'array'); - - $value = new stdClass(); - $this->assertEquals(G::gettype($value),'object'); - - // need conexion BD is_resource - - } - - /** - * @covers G::removeComments - * @todo Implement testRemoveComments(). - */ - public function testRemoveComments() - { - $value = 'code1 /* comment 1 */ code2 code3'; - $response = G::removeComments($value); - $this->assertEquals('code1 code2 code3',$response); - } - - /** - * @covers G::getMemoryUsage - * @todo Implement testGetMemoryUsage(). - */ - public function testGetMemoryUsage() - { - $response = G::getMemoryUsage(); - $mb = "Mb"; - $this->assertTrue($response != '' && strpos($response, $mb)); - } - - /** - * @covers G::getFormatUserList - * @todo Implement testGetFormatUserList(). - */ - public function testGetFormatUserList() - { - $aUserInfo['USR_USERNAME'] = 'fontiveros'; - $aUserInfo['USR_FIRSTNAME'] = 'Fernando'; - $aUserInfo['USR_LASTNAME'] = 'Ontiveros'; - - $response = G::getFormatUserList('@firstName @lastName', $aUserInfo); - $this->assertEquals('Fernando Ontiveros',$response); - - $response = G::getFormatUserList('@firstName @lastName (@userName)', $aUserInfo); - $this->assertEquals('Fernando Ontiveros (fontiveros)',$response); - - $response = G::getFormatUserList('@userName', $aUserInfo); - $this->assertEquals('fontiveros',$response); - - $response = G::getFormatUserList('@userName (@firstName @lastName)', $aUserInfo); - $this->assertEquals('fontiveros (Fernando Ontiveros)',$response); - - $response = G::getFormatUserList('@lastName @firstName', $aUserInfo); - $this->assertEquals('Ontiveros Fernando',$response); - - $response = G::getFormatUserList('@lastName, @firstName', $aUserInfo); - $this->assertEquals('Ontiveros, Fernando',$response); - - $response = G::getFormatUserList('@lastName, @firstName (@userName)', $aUserInfo); - $this->assertEquals('Ontiveros, Fernando (fontiveros)',$response); - - $response = G::getFormatUserList('test', $aUserInfo); - $this->assertEquals('fontiveros',$response); - } - - /** - * @covers G::getModel - * @todo Implement testGetModel(). - */ - public function testGetModel() - { - /* - require_once PATH_TRUNK . 'gulliver' . PATH_SEP . 'thirparty' . PATH_SEP . 'propel' . PATH_SEP . 'Propel.php'; - $model = 'AdditionalTables'; - $additionalTables = G::getModel($model); - $this->assertTrue(is_object($additionalTables) && class_exists($model)); - */ - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::is_rwritable - * @todo Implement testIs_rwritable(). - */ - public function testIs_rwritable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::rglob - * @todo Implement testRglob(). - */ - public function testRglob() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::browser_detection - * @todo Implement testBrowser_detection(). - */ - public function testBrowser_detection() - { - // $res = G::browser_detection('full_assoc'); - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - // $this->assertEquals(is_array($res)); - } - - /** - * @covers G::get_os_data - * @todo Implement testGet_os_data(). - */ - public function testGet_os_data() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::get_item_version - * @todo Implement testGet_item_version(). - */ - public function testGet_item_version() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::get_set_count - * @todo Implement testGet_set_count(). - */ - public function testGet_set_count() - { - $this->assertEquals(G::get_set_count('get'),1); - $this->assertEquals(G::get_set_count('set',0),''); - } - - /** - * @covers G::check_is_mobile - * @todo Implement testCheck_is_mobile(). - */ - public function testCheck_is_mobile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::get_mobile_data - * @todo Implement testGet_mobile_data(). - */ - public function testGet_mobile_data() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::getBrowser - * @todo Implement testGetBrowser(). - */ - public function testGetBrowser() - { - //$this->assertTrue(is_array(G::getBrowser())); - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::script_time - * @todo Implement testScript_time(). - */ - public function testScript_time() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::getDirectorySize - * @todo Implement testGetDirectorySize(). - */ - public function testGetDirectorySize() - { - $path = PATH_TRUNK . 'gulliver' . PATH_SEP . "system"; - $response = G::getDirectorySize($path); - $this->assertTrue(is_array($response) && count($response)); - } - - /** - * @covers G::getCacheFileNameByPattern - * @todo Implement testGetCacheFileNameByPattern(). - */ - public function testGetCacheFileNameByPattern() - { - $response = G::getCacheFileNameByPattern(PATH_TRUNK . 'gulliver' . PATH_SEP . "system" . PATH_SEP . "class.g.php" ,''); - $this->assertTrue(is_array($response) && count($response)); - } - - /** - * @covers G::getCheckSum - * @todo Implement testGetCheckSum(). - */ - public function testGetCheckSum() - { - $response = G::getCheckSum(PATH_TRUNK . 'gulliver' . PATH_SEP . "system" . PATH_SEP . "class.g.php"); - $this->assertTrue(is_string($response)); - } - - /** - * @covers G::parse_ini_string - * @todo Implement testParse_ini_string(). - */ - public function testParse_ini_string() - { - - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::disableEnableINIvariable - * @todo Implement testDisableEnableINIvariable(). - */ - public function testDisableEnableINIvariable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::setINIvariable - * @todo Implement testSetINIvariable(). - */ - public function testSetINIvariable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::write_php_ini - * @todo Implement testWrite_php_ini(). - */ - public function testWrite_php_ini() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::verifyWriteAccess - * @todo Implement testVerifyWriteAccess(). - */ - public function testVerifyWriteAccess() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::renderTemplate - * @todo Implement testRenderTemplate(). - */ - public function testRenderTemplate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::parseTemplate - * @todo Implement testParseTemplate(). - */ - public function testParseTemplate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::update_php_ini - * @todo Implement testUpdate_php_ini(). - */ - public function testUpdate_php_ini() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers G::is_writable_r - * @todo Implement testIs_writable_r(). - */ - public function testIs_writable_r() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } -} diff --git a/tests/unit/backend/gulliver/system/PHPSQLParserTest.php b/tests/unit/backend/gulliver/system/PHPSQLParserTest.php deleted file mode 100644 index 0c00e80c0..000000000 --- a/tests/unit/backend/gulliver/system/PHPSQLParserTest.php +++ /dev/null @@ -1,64 +0,0 @@ -object = new PHPSQLParser; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @covers PHPSQLParser::parse - * @todo Implement testParse(). - */ - public function testParse() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers PHPSQLParser::process_insert - * @todo Implement testProcess_insert(). - */ - public function testProcess_insert() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers PHPSQLParser::load_reserved_words - * @todo Implement testLoad_reserved_words(). - */ - public function testLoad_reserved_words() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } -} diff --git a/tests/unit/backend/gulliver/system/dynaFormHandlerTest.php b/tests/unit/backend/gulliver/system/dynaFormHandlerTest.php deleted file mode 100644 index 73970634a..000000000 --- a/tests/unit/backend/gulliver/system/dynaFormHandlerTest.php +++ /dev/null @@ -1,292 +0,0 @@ -object = new dynaFormHandler; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @covers dynaFormHandler::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::reload - * @todo Implement testReload(). - */ - public function testReload() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::__cloneEmpty - * @todo Implement test__cloneEmpty(). - */ - public function test__cloneEmpty() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::toString - * @todo Implement testToString(). - */ - public function testToString() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::getNode - * @todo Implement testGetNode(). - */ - public function testGetNode() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::setNode - * @todo Implement testSetNode(). - */ - public function testSetNode() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::add - * @todo Implement testAdd(). - */ - public function testAdd() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::replace - * @todo Implement testReplace(). - */ - public function testReplace() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::fixXmlFile - * @todo Implement testFixXmlFile(). - */ - public function testFixXmlFile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::setHeaderAttribute - * @todo Implement testSetHeaderAttribute(). - */ - public function testSetHeaderAttribute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::modifyHeaderAttribute - * @todo Implement testModifyHeaderAttribute(). - */ - public function testModifyHeaderAttribute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::updateAttribute - * @todo Implement testUpdateAttribute(). - */ - public function testUpdateAttribute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::remove - * @todo Implement testRemove(). - */ - public function testRemove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::nodeExists - * @todo Implement testNodeExists(). - */ - public function testNodeExists() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::moveUp - * @todo Implement testMoveUp(). - */ - public function testMoveUp() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::moveDown - * @todo Implement testMoveDown(). - */ - public function testMoveDown() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::getFields - * @todo Implement testGetFields(). - */ - public function testGetFields() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::getFieldNames - * @todo Implement testGetFieldNames(). - */ - public function testGetFieldNames() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::addChilds - * @todo Implement testAddChilds(). - */ - public function testAddChilds() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::addOrUpdateChild - * @todo Implement testAddOrUpdateChild(). - */ - public function testAddOrUpdateChild() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers dynaFormHandler::getArray - * @todo Implement testGetArray(). - */ - public function testGetArray() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } -} diff --git a/tests/unit/backend/gulliver/system/i18n_POTest.php b/tests/unit/backend/gulliver/system/i18n_POTest.php deleted file mode 100644 index 894d154de..000000000 --- a/tests/unit/backend/gulliver/system/i18n_POTest.php +++ /dev/null @@ -1,220 +0,0 @@ -object = new i18n_PO; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @covers i18n_PO::buildInit - * @todo Implement testBuildInit(). - */ - public function testBuildInit() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::readInit - * @todo Implement testReadInit(). - */ - public function testReadInit() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addHeader - * @todo Implement testAddHeader(). - */ - public function testAddHeader() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addTranslatorComment - * @todo Implement testAddTranslatorComment(). - */ - public function testAddTranslatorComment() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addExtractedComment - * @todo Implement testAddExtractedComment(). - */ - public function testAddExtractedComment() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addReference - * @todo Implement testAddReference(). - */ - public function testAddReference() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addFlag - * @todo Implement testAddFlag(). - */ - public function testAddFlag() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addPreviousUntranslatedString - * @todo Implement testAddPreviousUntranslatedString(). - */ - public function testAddPreviousUntranslatedString() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::addTranslation - * @todo Implement testAddTranslation(). - */ - public function testAddTranslation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::_writeLine - * @todo Implement test_writeLine(). - */ - public function test_writeLine() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::_write - * @todo Implement test_write(). - */ - public function test_write() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::prepare - * @todo Implement testPrepare(). - */ - public function testPrepare() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::headerStroke - * @todo Implement testHeaderStroke(). - */ - public function testHeaderStroke() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::getHeaders - * @todo Implement testGetHeaders(). - */ - public function testGetHeaders() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::getTranslation - * @todo Implement testGetTranslation(). - */ - public function testGetTranslation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers i18n_PO::__destruct - * @todo Implement test__destruct(). - */ - public function test__destruct() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } -} diff --git a/tests/unit/backend/services/AppOwnerTest.php b/tests/unit/backend/services/AppOwnerTest.php deleted file mode 100644 index d52383a3f..000000000 --- a/tests/unit/backend/services/AppOwnerTest.php +++ /dev/null @@ -1,184 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("741388075505cd6bba2e993094312973", "000000000000000000000000000002", "00000000000000000000000000000001"); - $table = "APP_OWNER"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - //$rest->displayResponse(); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - $queryTable = $this->getConnection()->createQueryTable( - 'APP_OWNER', 'SELECT * FROM APP_OWNER WHERE APP_UID = "741388075505cd6bba2e993094312973"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("741388075505cd6bba2e993094312900", "000000000000000000000000000003", "00000000000000000000000000000001"); - $table = "APP_OWNER"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("741388075505cd6bba2e993094312900", "000000000000000000000000000003", "00000000000000000000000000000001"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'APP_OWNER', 'SELECT * FROM APP_OWNER WHERE APP_UID = "741388075505cd6bba2e993094312900"' - ); - - $key2 = array(); - $rest->sendPOST($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("741388075505cd6bba2e993094312900", "000000000000000000000000000004", "00000000000000000000000000000001"); - $table = "APP_OWNER"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("741388075505cd6bba2e993094312900", "000000000000000000000000000004", "00000000000000000000000000000001"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'APP_OWNER', 'SELECT * FROM APP_OWNER WHERE APP_UID = "741388075505cd6bba2e993094312900"' - ); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("741388075505cd6bba2e993094312900", "000000000000000000000000000004", "00000000000000000000000000000001"); - $table = "APP_OWNER"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'APP_OWNER', 'SELECT * FROM APP_OWNER WHERE APP_UID = "741388075505cd6bba2e993094312900"' - ); - - $resp = array(); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } -} - diff --git a/tests/unit/backend/services/ApplicationTest.php b/tests/unit/backend/services/ApplicationTest.php deleted file mode 100644 index 3b8191fa9..000000000 --- a/tests/unit/backend/services/ApplicationTest.php +++ /dev/null @@ -1,167 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $APP_UID = array("741388075505cd6bba2e993094312973"); - $table = "APPLICATION"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$APP_UID); - //$rest->displayResponse(); - - $APP_UID2 = array("741973"); - $rest->sendGET($table,$APP_UID2); - - $queryTable = $this->getConnection()->createQueryTable( - 'APPLICATION', 'SELECT * FROM APPLICATION WHERE APP_UID = "741388075505cd6bba2e993094312973"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $APP_UID = array("4670755835065b7eb6a4187052654566", "2008", "", "DRAFT", "6548800755065a63d67f727063273525", "", "", "N", "00000000000000000000000000000001", "00000000000000000000000000000001", "2012-09-28 10:44:59", "2012-09-28 12:11:58", "2012-09-28 12:11:58", "2012-09-28 12:11:58", "", "00a9357205f5ea2d9325e166092b0e3f"); - $table = "APPLICATION"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$APP_UID); - //$rest->displayResponse(); - - $ID = array("4670755835065b7eb6a4187052654566"); - $resp = $rest->sendGET($table,$ID); - - $queryTable = $this->getConnection()->createQueryTable( - 'APPLICATION', 'SELECT * FROM APPLICATION WHERE APP_UID = "4670755835065b7eb6a4187052654566"' - ); - - $APP_UID2 = array(); - $rest->sendPOST($table,$APP_UID2); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $APP_UID = array("4670755835065b7eb6a4187052654566", "2008", "", "DRAFT", "6548800755065a63d67f727063273525", "", "", "N", "00000000000000000000000000000001", "00000000000000000000000000000001", "2012-09-28 10:44:59", "2012-09-28 12:11:58", "2012-09-28 12:11:58", "2012-09-28 12:11:58", "", "00a9357205f5ea2d9325e166092b0e3f"); - $table = "APPLICATION"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$APP_UID); - //$rest->displayResponse(); - - $APP_UID2 = array(); - $rest->sendPOST($table,$APP_UID2); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $APP_UID = array("4670755835065b7eb6a4187052654566"); - $table = "APPLICATION"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$APP_UID); - //$rest->displayResponse(); - - $APP_UID2 = array(""); - $rest->sendPOST($table,$APP_UID2); - } -} - diff --git a/tests/unit/backend/services/CalendarDefinitionTest.php b/tests/unit/backend/services/CalendarDefinitionTest.php deleted file mode 100644 index d6a1bc8d4..000000000 --- a/tests/unit/backend/services/CalendarDefinitionTest.php +++ /dev/null @@ -1,176 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000001" ); - $table = "CalendarDefinition"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - - $key1 = array( "942663514792946220"); - $rest->sendGET($table,$key1); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'CALENDAR_DEFINITION', 'SELECT * FROM CALENDAR_DEFINITION WHERE CALENDAR_UID = "00000000000000000000000000000001"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method,$msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000002", "Calendario Diario", "2012-09-17 13:00:04", "2012-09-17 13:01:06", "1", "horarios", "ACTIVE"); - //$table = "CALENDAR_DEFINITION"; - $table = "CalendarDefinition"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("00000000000000000000000000000002"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'CALENDAR_DEFINITION', 'SELECT * FROM CALENDAR_DEFINITION WHERE CALENDAR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - /* $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "9426635155057479305aa11012946220", "Calendario Empleados", "2012-09-17 12:00:04", "2012-09-17 12:01:06", "1|2|3|4|5", "Horarios laborales", "ACTIVE"); - $table = "CALENDAR_DEFINITION"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("9426635155057479305aa11012946220"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'CALENDAR_DEFINITION', 'SELECT * FROM CALENDAR_DEFINITION WHERE CALENDAR_UID = "66666635155057479305ab1101111111"' - ); - - $this->assertEquals($queryTable, $resp, "ERROR updating data");*/ - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("00000000000000000000000000000002"); - $table = "CalendarDefinition"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'CALENDAR_DEFINITION', 'SELECT * FROM CALENDAR_DEFINITION WHERE CALENDAR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR deleting data"); - } -} - diff --git a/tests/unit/backend/services/ContentTest.php b/tests/unit/backend/services/ContentTest.php deleted file mode 100644 index c973e92fd..000000000 --- a/tests/unit/backend/services/ContentTest.php +++ /dev/null @@ -1,174 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "PRO_TITLE", "", "6548800755065a63d67f727063273525", "en"); - $key1 = array( "PRO_DESCRIPTION", "", "4880075", "en"); - $table = "CONTENT"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - $rest->sendGET($table,$key1); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'CONTENT', 'SELECT * FROM CONTENT WHERE CON_CATEGORY = "PRO_TITLE" AND CON_ID = "6548800755065a63d67f727063273525"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "PRO_TITLE", "", "6666000755065a63d67f727063273222", "en", "SAMPLE"); - $table = "CONTENT"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("PRO_TITLE", "", "6666000755065a63d67f727063273222", "en"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'CONTENT', 'SELECT * FROM CONTENT WHERE CON_CATEGORY = "PRO_TITLE" AND CON_ID = "6666000755065a63d67f727063273222"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "PRO_TITLE", "", "6666000755065a63d67f727063273222", "en", "XAMPLE"); - $table = "CONTENT"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("PRO_TITLE", "", "6666000755065a63d67f727063273222", "en"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'CONTENT', 'SELECT * FROM CONTENT WHERE CON_CATEGORY = "PRO_TITLE" AND CON_ID = "6666000755065a63d67f727063273222"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR updating data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "PRO_TITLE", "", "6666000755065a63d67f727063273222", "en"); - $table = "CONTENT"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'CONTENT', 'SELECT * FROM CONTENT WHERE CON_CATEGORY = "PRO_TITLE" AND CON_ID = "6666000755065a63d67f727063273222"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR deleting data"); - } -} - diff --git a/tests/unit/backend/services/ProcessTest.php b/tests/unit/backend/services/ProcessTest.php deleted file mode 100644 index 1abf8df20..000000000 --- a/tests/unit/backend/services/ProcessTest.php +++ /dev/null @@ -1,173 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "6548800755065a63d67f727063273525"); - $key1 = array( "8421281685065a"); - $table = "PROCESS"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - $rest->sendGET($table,$key1); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'PROCESS', 'SELECT * FROM PROCESS WHERE PRO_UID = "6548800755065a63d67f727063273525"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "6548800755065a63d67f727063255555", "6548800755065a63d67f727063666665", "5", "HOURS", "ACTIVE", "0", "NORMAL", "FALSE", "1", "1", "1", "0", " ", " ", "1", "2012-09-28 09:29:33", "2012-09-28 09:29:33", "00000000000000000000000000000001", "5000", "10000", "0", "6", "0", " ", " " ); - $table = "PROCESS"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("6548800755065a63d67f727063255555"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'PROCESS', 'SELECT * FROM PROCESS WHERE PRO_UID = "6548800755065a63d67f727063255555"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "6548800755065a63d67f727063255555", "6548800755065a63d67f727063666665", "2", "DAYS", "ACTIVE", "0", "NORMAL", "FALSE", "1", "1", "1", "0", " ", " ", "1", "2012-09-28 09:29:33", "2012-09-28 09:29:33", "00000000000000000000000000000001", "5000", "10000", "0", "6", "0", " ", " " ); - $table = "PROCESS"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("6548800755065a63d67f727063255555"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'PROCESS', 'SELECT * FROM PROCESS WHERE PRO_UID = "6548800755065a63d67f727063255555"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR updating data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("6548800755065a63d67f727063255555"); - $table = "PROCESS"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'PROCESS', 'SELECT * FROM PROCESS WHERE PRO_UID = "6548800755065a63d67f727063255555"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR deleting data"); - } -} diff --git a/tests/unit/backend/services/Rest/CRUD.java b/tests/unit/backend/services/Rest/CRUD.java deleted file mode 100644 index eeafa5399..000000000 --- a/tests/unit/backend/services/Rest/CRUD.java +++ /dev/null @@ -1,204 +0,0 @@ -// Main class to sent differen kind of messages to the http server -import org.apache.http.impl.client.DefaultHttpClient; - -// Enter CRUD memebers -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpDelete; - - -// Used to set JSON or XML messages request -import org.apache.http.entity.StringEntity; - -// Needed for response fetch goal -import org.apache.http.HttpResponse; -import org.apache.http.HttpEntity; -import org.apache.http.util.EntityUtils; - -/** -* Single class containing functions to show how to use GET,POST,PUT,DELETE methods. -*/ -public class CRUD -{ - private static String m_user = "workflow"; // This member variable must be changed to its own dev workspace - - private static void PostSample() - { - System.out.println("POST: Enter login params\n"); - - String loginParamsXML = "\n" - +"\n" - +"admin\n" - +"admin\n" - +""; - String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/login/"; - - System.out.println( "Request: "+URI + "\n"+ loginParamsXML + "\n"); - - DefaultHttpClient httpClient = new DefaultHttpClient(); - HttpPost postRequest = new HttpPost(URI); - try - { - StringEntity input = new StringEntity( loginParamsXML); - input.setContentType("application/xml"); - postRequest.setEntity(input); - HttpResponse httpResponse = httpClient.execute(postRequest); - - HttpEntity responseEntity = httpResponse.getEntity(); - if( responseEntity != null) - { - String response = new String(); - response = EntityUtils.toString( responseEntity); - System.out.println( "Response: " + response + "\n"); - } - } - catch( java.io.IOException x) - { - throw new RuntimeException("I/O error: " + x.toString()); - } - } - - private static void GetSample() - { - System.out.println("GET: Display TRANSLATION table row\n"); - - String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/LABEL/LOGIN/en/"; - System.out.println( "Request: " + URI + "\n"); - - DefaultHttpClient httpClient = new DefaultHttpClient(); - HttpGet getRequest = new HttpGet(URI); - try - { - HttpResponse httpResponse = httpClient.execute(getRequest); - - HttpEntity responseEntity = httpResponse.getEntity(); - if( responseEntity != null) - { - String response = new String(); - response = EntityUtils.toString( responseEntity); - System.out.println( "Response: " + response + "\n"); - } - } - catch( java.io.IOException x) - { - throw new RuntimeException("I/O error: " + x.toString()); - } - } - - private static void AnotherPostSample() - { - System.out.println("POST: Insert new row in TRANLATION\n"); - - String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; - String newRow = "BUTTON/ESCAPE/en/sample/2012-05-05/"; - System.out.println( "Request: " + URI + " new row: " + newRow + "\n"); - URI = URI + newRow; - - DefaultHttpClient httpClient = new DefaultHttpClient(); - HttpPost postRequest = new HttpPost(URI); - try - { - HttpResponse httpResponse = httpClient.execute(postRequest); - - HttpEntity responseEntity = httpResponse.getEntity(); - if( responseEntity != null) - { - String response = new String(); - if(response.isEmpty()) - { - System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); - return; - } - response = EntityUtils.toString( responseEntity); - System.out.println( "Response: " + response + "\n"); - } - } - catch( java.io.IOException x) - { - throw new RuntimeException("I/O error: " + x.toString()); - } - } - - private static void PutSample() - { - System.out.println("POST: Update a row in TRANLATION\n"); - - String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; - String index = "BUTTON/ESCAPE/en/"; - String updateData = "changesample/2011-07-06/"; - - System.out.println( "Request: " + URI + " index: " + index + " updateData: " + updateData + "\n"); - URI = URI + index + updateData; - - DefaultHttpClient httpClient = new DefaultHttpClient(); - HttpPut putRequest = new HttpPut(URI); - try - { - HttpResponse httpResponse = httpClient.execute(putRequest); - - HttpEntity responseEntity = httpResponse.getEntity(); - if( responseEntity != null) - { - String response = new String(); - if(response.isEmpty()) - { - System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); - return; - } - response = EntityUtils.toString( responseEntity); - System.out.println( "Response: " + response + "\n"); - } - } - catch( java.io.IOException x) - { - throw new RuntimeException("I/O error: " + x.toString()); - } - } - - private static void DeleteSample() - { - System.out.println("DELETE: Remove a row in TRANLATION\n"); - - String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/"; - String index = "BUTTON/ESCAPE/en/"; - - System.out.println( "Request: " + URI + "index:" + index + "\n"); - URI = URI + index; - - DefaultHttpClient httpClient = new DefaultHttpClient(); - HttpDelete deleteRequest = new HttpDelete(URI); - try - { - HttpResponse httpResponse = httpClient.execute(deleteRequest); - - HttpEntity responseEntity = httpResponse.getEntity(); - if( responseEntity != null) - { - String response = new String(); - if(response.isEmpty()) - { - System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n"); - return; - } - response = EntityUtils.toString( responseEntity); - System.out.println( "Response: " + response + "\n"); - } - } - catch( java.io.IOException x) - { - throw new RuntimeException("I/O error: " + x.toString()); - } - } - - public static void main(String args[]) - { - System.out.println("CRUD samples."); - PostSample(); - GetSample(); - AnotherPostSample(); - PutSample(); - DeleteSample(); - - } -} \ No newline at end of file diff --git a/tests/unit/backend/services/Rest/CURLMessage.php b/tests/unit/backend/services/Rest/CURLMessage.php deleted file mode 100644 index 08e56e8fa..000000000 --- a/tests/unit/backend/services/Rest/CURLMessage.php +++ /dev/null @@ -1,149 +0,0 @@ -restServer = PROTOCOL_HTTP . COLON.PATH_SEP . PATH_SEP; - $this->restServer .= "jennylee.pmos.colosa.net"/*$_SERVER['SERVER_NAME'] */. PATH_SEP; - $this->restServer .= $this->serviceTechnic . PATH_SEP . $workspace . PATH_SEP; - - $this->ch = curl_init(); - curl_setopt($this->ch,CURLOPT_TIMEOUT, 2); - curl_setopt($this->ch,CURLOPT_POST, 1); - curl_setopt($this->ch,CURLOPT_RETURNTRANSFER, 1); - } - /** - * set the message in order to follow the message format - */ - abstract protected function format(array $message); - /** - * Set properties used in a simpleMessage Class like a set in a URI, or formatted as a JSon msg. - */ - abstract protected function setMoreProperties($messageFormated); - /** - * Attach the method to the restServer path, set the type of the message, and the message itself. - */ - protected function setMessageProperties($method,array $message) - { - $messageFormated = $this->format($message); - $this->server_method = $this->restServer . $method; - $this->setMoreProperties($messageFormated); - } - /** - * Send or execute(curl notation) the message using a rest method - **/ - public function send($method,array $message) - { - self::setMessageProperties($method,$message); - $this->output = curl_exec($this->ch); - return $this->output; - } - /** - * Set the message to GET method type - */ - public function sendGET($method,array $message) - { - curl_setopt($this->ch, CURLOPT_HTTPGET,true); - return $this->send($method,$message); - } - /** - * Set the message to POST method type - */ - public function sendPOST($method,array $message) - { - curl_setopt($this->ch,CURLOPT_POST,true); - return $this->send($method,$message); - } - /** - * Set the message to PUT method type - */ - public function sendPUT($method,array $message) - { - curl_setopt($this->ch,CURLOPT_PUT,true); - return $this->send($method,$message); - } - /** - * Set the message to DELETE method type - */ - public function sendDELETE($method,array $message) - { - curl_setopt($this->ch,CURLOPT_CUSTOMREQUEST,"DELETE"); - return $this->send($method,$message); - } - /** - * Display all the data that the response could got. - */ - public function displayResponse() - { - $error = curl_error($this->ch); - $result = array( 'header' => '', - 'body' => '', - 'curl_error' => '', - 'http_code' => '', - 'last_url' => ''); - if ($error != ""){ - $result['curl_error'] = $error; - return $result; - } - $response = $this->output; - $header_size = curl_getinfo($this->ch,CURLINFO_HEADER_SIZE); - $result['header'] = substr($response,0,$header_size); - $result['body'] = substr($response,$header_size); - $result['http_code'] = curl_getinfo($this -> ch,CURLINFO_HTTP_CODE); - $result['last_url'] = curl_getinfo($this -> ch,CURLINFO_EFFECTIVE_URL); - - echo $this->type." Response: ".$response."
"; - foreach($result as $index => $data) - { - if($data != ""){ - echo $index . "=" . $data . "
"; - } - } - echo "
"; - } - /** - * Close the Curl session using the Curl Handle set by curl_init() function. - */ - public function close() - { - curl_close($this->ch); - } -} - -?> diff --git a/tests/unit/backend/services/Rest/FormatedMessage.php b/tests/unit/backend/services/Rest/FormatedMessage.php deleted file mode 100644 index 191a693fe..000000000 --- a/tests/unit/backend/services/Rest/FormatedMessage.php +++ /dev/null @@ -1,46 +0,0 @@ -server_method . PATH_SEP . $messageFormated . "
"; - // - curl_setopt($this->ch,CURLOPT_URL,$this->server_method); - $contentSelected = $this->content . $this->type; - curl_setopt($this->ch,CURLOPT_HTTPHEADER,array($contentSelected)); - curl_setopt($this->ch,CURLOPT_POSTFIELDS,$messageFormated); - } -} -?> \ No newline at end of file diff --git a/tests/unit/backend/services/Rest/JsonMessage.php b/tests/unit/backend/services/Rest/JsonMessage.php deleted file mode 100644 index 2a8d8f332..000000000 --- a/tests/unit/backend/services/Rest/JsonMessage.php +++ /dev/null @@ -1,43 +0,0 @@ -type = "json"; - } - /** - * Format the array parameter to a json format. - */ - protected function format(array $message) - { - if (empty($message)){ - return ; - } - if (is_array($message)){ - $jsonMessage = json_encode( $message); - } - return $jsonMessage; - } -} - -?> \ No newline at end of file diff --git a/tests/unit/backend/services/Rest/RestMessage.php b/tests/unit/backend/services/Rest/RestMessage.php deleted file mode 100644 index f6c7488b6..000000000 --- a/tests/unit/backend/services/Rest/RestMessage.php +++ /dev/null @@ -1,47 +0,0 @@ -type = "rest"; - } - /** - * Format the array parameter to a single rest line format separed by '/'. - */ - protected function format(array $message) - { - $rest = ""; - if (!empty($message)){ - if (is_array($message)){ - foreach($message as $index => $data) - { - $rest .= "/" . $data; - } - $rest .= "/"; - } - } - return $rest; - } -} - -?> diff --git a/tests/unit/backend/services/Rest/SimpleMessage.php b/tests/unit/backend/services/Rest/SimpleMessage.php deleted file mode 100644 index 94cfd3ec1..000000000 --- a/tests/unit/backend/services/Rest/SimpleMessage.php +++ /dev/null @@ -1,43 +0,0 @@ -server_method . PATH_SEP . $messageFormated . "
"; - // - curl_setopt($this->ch,CURLOPT_URL,$this->server_method.$messageFormated); - } -} -?> \ No newline at end of file diff --git a/tests/unit/backend/services/Rest/XmlMessage.php b/tests/unit/backend/services/Rest/XmlMessage.php deleted file mode 100644 index 9d33db4fd..000000000 --- a/tests/unit/backend/services/Rest/XmlMessage.php +++ /dev/null @@ -1,48 +0,0 @@ -type = "xml"; - } - /** - * Format the array parameter to a xml valid format. TODO: Need to find out a better way to do it. - */ - protected function format(array $message) - { - if (empty($message)){ - return ; - } - if (is_array($message)){ - $xml = ""; - foreach($message as $index => $data) - { - $xml .= "<" . $index . ">" . $data . ""; - } - $xml .= ""; - } - return $xml; - } -} - -?> diff --git a/tests/unit/backend/services/Rest/fixtures/application.xml b/tests/unit/backend/services/Rest/fixtures/application.xml deleted file mode 100644 index 4de4dd037..000000000 --- a/tests/unit/backend/services/Rest/fixtures/application.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - SLA_UID - PRO_UID - SLA_NAME - SLA_DESCRIPTION - SLA_TYPE - SLA_TAS_START - SLA_TAS_END - SLA_TIME_DURATION - SLA_TIME_DURATION_MODE - SLA_CONDITIONS - SLA_PEN_ENABLED - SLA_PEN_TIME - SLA_PEN_TIME_MODE - SLA_PEN_VALUE - SLA_PEN_VALUE_UNIT - SLA_STATUS -
- - APP_UID - SLA_UID - APP_SLA_INIT_DATE - APP_SLA_DUE_DATE - APP_SLA_FINISH_DATE - APP_SLA_DURATION - APP_SLA_REMAINING - APP_SLA_EXCEEDED - APP_SLA_PEN_VALUE - APP_SLA_STATUS -
-
\ No newline at end of file diff --git a/tests/unit/backend/services/Rest/testing.php b/tests/unit/backend/services/Rest/testing.php deleted file mode 100644 index 14a2b3def..000000000 --- a/tests/unit/backend/services/Rest/testing.php +++ /dev/null @@ -1,37 +0,0 @@ -'admin' , 'password'=>'admin'); -$method = "login"; - -$jsonm = new JsonMessage(); -$jsonm->send($method,$msg); -$jsonm->displayResponse(); - -$xmlm = new XmlMessage(); -$xmlm->send($method, $msg); -$xmlm->displayResponse(); - -$msg0 = array( "LABEL", "LOGIN", "en"); -$table = "TRANSLATION"; - -$rest = new RestMessage(); -$rest->sendGET($table,$msg0); -$rest->displayResponse(); - -$msg1 = array( "HOUSE", "PUSHIN", "en", "sample", "2012-06-06" ); -$rest->sendPOST($table,$msg1); -$rest->displayResponse(); - -$msg2 = array( "HOUSE", "PUSHIN", "en", "samplemod", "2012-07-06" ); -$rest->sendPUT($table,$msg2); -$rest->displayResponse(); - -$msg3 = array( "HOUSE", "PUSHIN", "en"); -$rest->sendDELETE($table,$msg3); -$rest->displayResponse(); - -?> diff --git a/tests/unit/backend/services/SessionTest.php b/tests/unit/backend/services/SessionTest.php deleted file mode 100644 index 66b313d75..000000000 --- a/tests/unit/backend/services/SessionTest.php +++ /dev/null @@ -1,173 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "8421281685065aec01a7643096730466"); - $key1 = array( "8421281685065a"); - $table = "SESSION"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - $rest->sendGET($table,$key1); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'SESSION', 'SELECT * FROM SESSION WHERE SES_UID = "8421281685065aec01a7643096730466"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "2252443815002e3c2422675066811111", "ACTIVE", "00000000000000000000000000000001", "192.168.11.21", "2012-10-09 10:05:52", "2012-10-09 10:20:52", ""); - $table = "SESSION"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("2252443815002e3c2422675066811111"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'SESSION', 'SELECT * FROM SESSION WHERE SES_UID = "2252443815002e3c2422675066811111"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "2252443815002e3c2422675066811111", "XAMPLE", "00000000000000000000000000000001", "192.168.11.21", "2012-10-09 10:05:52", "2012-10-09 10:20:52", ""); - $table = "SESSION"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("2252443815002e3c2422675066811111"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'SESSION', 'SELECT * FROM SESSION WHERE SES_UID = "2252443815002e3c2422675066811111"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR updating data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("2252443815002e3c2422675066811111"); - $table = "SESSION"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'SESSION', 'SELECT * FROM SESSION WHERE SES_UID = "2252443815002e3c2422675066811111"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR deleting data"); - } -} diff --git a/tests/unit/backend/services/StepTest.php b/tests/unit/backend/services/StepTest.php deleted file mode 100644 index 2491b41ed..000000000 --- a/tests/unit/backend/services/StepTest.php +++ /dev/null @@ -1,183 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "440848627503b77c71a9637072432170"); - $table = "STEP"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'STEP', 'SELECT * FROM STEP WHERE STEP_UID = "440848627503b77c71a9637072432170"' - ); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "440848627503b77c71a9637074444444", "359728002502a792a568a54012111111", "499115418502a795a0cfb43043666666", "SAMPLE", "913768259503b76894536b2095222222", "", "1", "EDIT"); - $table = "STEP"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("440848627503b77c71a9637074444444"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'STEP', 'SELECT * FROM STEP WHERE STEP_UID = "440848627503b77c71a9637074444444"' - ); - - $key2 = array(); - $rest->sendPOST($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "440848627503b77c71a9637074444444", "359728002502a792a568a54012111111", "499115418502a795a0cfb43043666666", "XAMPLE", "913768259503b76894536b2095222222", "", "1", "VIEW"); - $table = "STEP"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("440848627503b77c71a9637074444444"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'STEP', 'SELECT * FROM STEP WHERE STEP_UID = "440848627503b77c71a9637074444444"' - ); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR updating data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("440848627503b77c71a9637074444444"); - $table = "STEP"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'STEP', 'SELECT * FROM STEP WHERE STEP_UID = "440848627503b77c71a9637074444444"' - ); - - $key2 = array("741973"); - $rest->sendGET($table,$key2); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } -} - diff --git a/tests/unit/backend/services/TranslationTest.php b/tests/unit/backend/services/TranslationTest.php deleted file mode 100644 index 103452b52..000000000 --- a/tests/unit/backend/services/TranslationTest.php +++ /dev/null @@ -1,169 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "LABEL", "LOGIN", "en"); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "LABEL" AND TRN_ID = "LOGIN"' - ); - - //$this->assertEquals($resp, $key, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "HOUSE", "PUSHIN", "en", "sample", "2012-06-06" ); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("HOUSE", "PUSHIN", "en"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "HOUSE" AND TRN_ID = "PUSHIN"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("HOUSE", "PUSHIN", "en", "samplemod", "2012-07-06"); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("HOUSE", "PUSHIN", "en"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "HOUSE" AND TRN_ID = "PUSHIN"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("HOUSE", "PUSHIN", "en"); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "HOUSE" AND TRN_ID = "PUSHIN"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } -} diff --git a/tests/unit/backend/services/UsersPropertiesTest.php b/tests/unit/backend/services/UsersPropertiesTest.php deleted file mode 100644 index d3104506a..000000000 --- a/tests/unit/backend/services/UsersPropertiesTest.php +++ /dev/null @@ -1,169 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000001"); - $table = "USERS_PROPERTIES"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS_PROPERTIES', 'SELECT * FROM USERS_PROPERTIES WHERE USR_UID = "00000000000000000000000000000001"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000002", "2012-09-04 09:48:57", "0", 'a:1:{i:0;s:32:"21232f297a57a5a743894a0e4a801fc3";}'); - $table = "USERS_PROPERTIES"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("00000000000000000000000000000002"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS_PROPERTIES', 'SELECT * FROM USERS_PROPERTIES WHERE USR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data"); - } - - public function testPut() - { - /* $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("HOUSE", "PUSHIN", "en", "samplemod", "2012-07-06"); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("HOUSE", "PUSHIN", "en"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "HOUSE" AND TRN_ID = "PUSHIN"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data");*/ - } - - public function testDelete() - { - /* $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("HOUSE", "PUSHIN", "en"); - $table = "TRANSLATION"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'TRANSLATION', 'SELECT * FROM TRANSLATION WHERE TRN_CATEGORY = "HOUSE" AND TRN_ID = "PUSHIN"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR getting data");*/ - } -} diff --git a/tests/unit/backend/services/UsersTest.php b/tests/unit/backend/services/UsersTest.php deleted file mode 100644 index a0cb3b1e2..000000000 --- a/tests/unit/backend/services/UsersTest.php +++ /dev/null @@ -1,177 +0,0 @@ -conn === null) { - $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host='. $_SERVER['PM_UNIT_DB_HOST']; - if (self::$pdo == null) { - self::$pdo = new PDO( - $dsn, - $_SERVER['PM_UNIT_DB_USER'], - $_SERVER['PM_UNIT_DB_PASS'] ); - } - $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); - } - return $this->conn; - } - - /** - *@return PHPUnit_Extensions_Database_DataSet_IDataSet - */ - - public function getDataSet() - { - return $this->createXMLDataSet('tests/unit/backend/services/Rest/fixtures/application.xml'); - } - - public function testGet() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000001" ); - $table = "USERS"; - - $rest = new RestMessage(); - $resp = $rest->sendGET($table,$key); - - $key1 = array( "942663514792946220"); - $rest->sendGET($table,$key1); - //$rest->displayResponse(); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS', 'SELECT * FROM USERS WHERE USR_UID = "00000000000000000000000000000001"' - ); - - //$this->assertEquals($resp, $queryTable, "ERROR getting data"); - } - - public function testPost() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method,$msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000002", "admin", "21232f297a57a5a743894a0e4a801fc3", - "Administrator", "Adminn", "admin@processmaker.com", "2020-01-01", "1999-11-30 00:00:00", - "2008-05-23 18:36:19", "ACTIVE", "US", "FL", "MMK", "Miraflores", "2240448", "1-305-402-0282", - "1-305-675-1400", "", "", "Administrator", "", "1999-02-25", "PROCESSMAKER_ADMIN", - "", "", "NORMAL"); - $table = "Users"; - - $rest = new RestMessage(); - $rest->sendPOST($table,$key); - //$rest->displayResponse(); - - $key1 = array("00000000000000000000000000000002"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS', 'SELECT * FROM USERS WHERE USR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR inserting data"); - } - - public function testPut() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array( "00000000000000000000000000000002", "adminsad", "21232f297a57a5a743894a0e4a801fc3", "Administrator", "adminsad@processmaker.com", "2020-01-01", "1999-11-30 00:00:00", "2008-05-23 18:36:19", "ACTIVE", "US", "FL", "MMK", "", "", "1-305-402-0282", "1-305-675-1400", "", "", "Administrator", "", "1999-02-25", "PROCESSMAKER_ADMIN", "", "", "NORMAL"); - $table = "USERS"; - - $rest = new RestMessage(); - $rest->sendPUT($table,$key); - //$rest->displayResponse(); - - $key1 = array("00000000000000000000000000000002"); - $resp = $rest->sendGET($table,$key1); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS', 'SELECT * FROM USERS WHERE USR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR updating data"); - } - - public function testDelete() - { - $msg = array( 'user'=>'admin' , 'password'=>'admin'); - $method = "login"; - - $jsonm = new JsonMessage(); - $jsonm->send($method,$msg); - //$jsonm->displayResponse(); - - $xmlm = new XmlMessage(); - $xmlm->send($method, $msg); - //$xmlm->displayResponse(); - - $key = array("00000000000000000000000000000002"); - $table = "USERS"; - - $rest = new RestMessage(); - $rest->sendDELETE($table,$key); - //$rest->displayResponse(); - $resp = $rest->sendGET($table,$key); - - $queryTable = $this->getConnection()->createQueryTable( - 'USERS', 'SELECT * FROM USERS WHERE USR_UID = "00000000000000000000000000000002"' - ); - - //$this->assertEquals($queryTable, $resp, "ERROR deleting data"); - } -} diff --git a/tests/unit/backend/workflow/engine/classes/AppSolrTest.php b/tests/unit/backend/workflow/engine/classes/AppSolrTest.php deleted file mode 100644 index b031d7959..000000000 --- a/tests/unit/backend/workflow/engine/classes/AppSolrTest.php +++ /dev/null @@ -1,252 +0,0 @@ - 1, - 'solr_host' => 'localhost', - 'solr_instance' => 'os' - ); - G::LoadClass ('AppSolr'); - $this->object = new AppSolr ($solrConf ['solr_enabled'], $solrConf ['solr_host'], $solrConf ['solr_instance']); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @covers AppSolr::isSolrEnabled - */ - public function testIsSolrEnabled() - { - // display messages with --debug option - // print "XXXXXXXXXXXXXXXXXXXXX"; - $result = $this->object->isSolrEnabled (); - $this->assertEquals ($result, true, "Assert error testIsSolrEnabled"); - } - - /** - * @covers AppSolr::reindexAllApplications - * executed first to copy all the application records to the search server - * @depends testIsSolrEnabled - */ - public function testReindexAllApplications() - { - $this->object->reindexAllApplications (); - } - - /** - * @covers AppSolr::getCountApplicationsPMOS2 - * - * @depends testReindexAllApplications - */ - public function testGetCountApplicationsPMOS2() - { - $result = $this->object->getCountApplicationsPMOS2 (); - $this->assertGreaterThan (0, $result, "Assert error testGetCountApplicationsPMOS2"); - print "Applications count: " . $result . "\n"; - - return $result; - } - - - /** - * @covers AppSolr::getPagedApplicationUids - * - * @depends testGetCountApplicationsPMOS2 - */ - public function testGetPagedApplicationUids($totalNumApplications) - { - $pagesize = 2; - - $aAppUids = $this->object->getPagedApplicationUids(0, $pagesize); - - if($totalNumApplications >= $pagesize){ - $this->assertCount(2, $aAppUids, 'Error returned paginated list of AppUids'); - } - else{ - $this->assertGreaterThan(0, $aAppUids, 'No AppUids found'); - } - - return $aAppUids; - } - - /** - * @covers AppSolr::getAppGridData - * - * @depends testReindexAllApplications - */ - public function testGetAppGridData() - { - //$userUid, $start = null, $limit = null, $action = null, $filter = null, $search = null, $process = null, $user = null, - //$status = null, $type = null, $dateFrom = null, $dateTo = null, $callback = null, $dir = null, $sort = 'APP_CACHE_VIEW.APP_NUMBER', $doCount = false - $userUid = '00000000000000000000000000000001'; //admin user - $start = 0; - $limit = 20; - $action = 'todo'; - $sort = 'APP_NUMBER'; - $dir = 'ASC'; - $result = $this->object->getAppGridData ($userUid, $start, $limit, $action, null, null, null, null, - null, null, null, null, null, $dir, $sort, false); - print_r($result); - if(!$result ['success']){ - $this->assertEmpty($result ['message'], 'The message is only display in not success'); - } - if(!$result ['result']){ - $this->assertCount(0, $result ['data'], 'Returned data when not success reported'); - } - - //verify the number of returned rows - print 'count results: ' . count($result ['data']); - //$this->assertGreaterThan($result ['totalCount'], count($result ['data']), 'The returned records are less than the total'); - - - - //test all the views - $userUid = '00000000000000000000000000000001'; //admin user - $start = 0; - $limit = 20; - $action = 'participated'; - $sort = 'APP_NUMBER'; - $dir = 'ASC'; - $result = $this->object->getAppGridData ($userUid, $start, $limit, $action, null, null, null, null, - null, null, null, null, null, $dir, $sort, false); - - - $userUid = '00000000000000000000000000000001'; //admin user - $start = 0; - $limit = 20; - $action = 'draft'; - $sort = 'APP_NUMBER'; - $dir = 'ASC'; - $result = $this->object->getAppGridData ($userUid, $start, $limit, $action, null, null, null, null, - null, null, null, null, null, $dir, $sort, false); - - $userUid = '00000000000000000000000000000001'; //admin user - $start = 0; - $limit = 20; - $action = 'unassigned'; - $sort = 'APP_NUMBER'; - $dir = 'ASC'; - $result = $this->object->getAppGridData ($userUid, $start, $limit, $action, null, null, null, null, - null, null, null, null, null, $dir, $sort, false); - - //test search functionality - - - } - - /** - * @covers AppSolr::getCasesCount - * - */ - public function testGetCasesCount() - { - $userUid = '00000000000000000000000000000001'; - $result = $this->object->getCasesCount($userUid); - print_r($result); - $this->assertNotEmpty($result, 'Empty array of counters'); - } - - /** - * @covers AppSolr::updateApplicationSearchIndex - * - * @depends testGetPagedApplicationUids - */ - public function testUpdateApplicationSearchIndex($aAppUids) - { - - $this->object->updateApplicationSearchIndex($aAppUids); - - } - - /** - * @covers AppSolr::deleteApplicationSearchIndex - * - * @depends testGetPagedApplicationUids - */ - public function testDeleteApplicationSearchIndex($aAppUids) - { - $appUID = $aAppUids[0]['APP_UID']; - - $count = $this->object->getCountApplicationsSearchIndex(); - $this->object->deleteApplicationSearchIndex($appUID); - $count2 = $this->object->getCountApplicationsSearchIndex(); - - $this->assertEquals($count, $count2 + 1, 'Error deleting application in search index'); - - //leave index as in the beginning - $this->object->reindexAllApplications(); - - $count3 = $this->object->getCountApplicationsSearchIndex(); - - $this->assertEquals($count, $count3, 'Error restoring deleted application in search index'); - } - - - /** - * @covers AppSolr::applicationChangedUpdateSolrQueue - * - * @depends testGetPagedApplicationUids - */ - public function testApplicationChangedUpdateSolrQueue($aAppUids) - { - $appUID = $aAppUids[0]['APP_UID']; - - //mark application for deletion - $this->object->applicationChangedUpdateSolrQueue($appUID, 2); //to delete - - } - - /** - * @covers AppSolr::synchronizePendingApplications - * - * @depends testApplicationChangedUpdateSolrQueue - */ - public function testSynchronizePendingApplications() - { - //count number of indexed applications - $count = $this->object->getCountApplicationsSearchIndex(); - - print "Total applications:" . $count; - //delete application marked in previous test - $this->object->synchronizePendingApplications(); - - $count2 = $this->object->getCountApplicationsSearchIndex(); - print "Total applications deleted record:" . $count2; - - $this->assertEquals($count, $count2 + 1, 'Error synchronizing applications in search index'); - - //leave index as in the beginning - $this->object->reindexAllApplications(); - - $count3 = $this->object->getCountApplicationsSearchIndex(); - - $this->assertEquals($count, $count3, 'Error restoring deleted application in search index'); - } - -} diff --git a/tests/unit/backend/workflow/engine/classes/triggers/pmAlfrescoFunctionsTest.php b/tests/unit/backend/workflow/engine/classes/triggers/pmAlfrescoFunctionsTest.php deleted file mode 100644 index 189647bf5..000000000 --- a/tests/unit/backend/workflow/engine/classes/triggers/pmAlfrescoFunctionsTest.php +++ /dev/null @@ -1,44 +0,0 @@ -object = new pmAlfrescoFunctions(); - } - - protected function tearDown() - { - } - - public function testDownloadDoc() - { - $alfrescoServerUrl = 'http://192.168.11.30:8080/alfresco'; - $pathFile = 'notas.txt'; - $pathFile1 = 'notas222.txt'; - $pathFolder = '/tmp'; - $pathFolder1 = '/home/jennyleekkkkk/processmaker'; - $user = 'admin'; - $pwd = 'atopml2005'; - - $adownloadDoc = downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd); - - try { - $adownloadDoc1 = downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder1, $user, $pwd); - } catch (Exception $e) { - $this->assertEquals( "Undefined index: HTTP_REFERER", $e->getMessage(), 'ERROR!'); - } - - $this->assertEquals($adownloadDoc, true); - - try { - $adownloadDoc1 = downloadDoc($alfrescoServerUrl, $pathFile1, $pathFolder, $user, $pwd); - } catch (Exception $e) { - $this->assertEquals( "simplexml_load_string(): Entity: line 1: parser error : Entity 'nbsp' not defined", $e->getMessage(), 'ERROR!'); - } - } -} \ No newline at end of file diff --git a/tests/unit/frontend/README.txt b/tests/unit/frontend/README.txt deleted file mode 100644 index e2ee5f5e8..000000000 --- a/tests/unit/frontend/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Use this folder to include the front end test units. (Jasmine) -The structure inside this folder must reflect the proyect structure. diff --git a/workflow/engine/src/Tests/BusinessModel/CalendarTest.php b/workflow/engine/src/Tests/BusinessModel/CalendarTest.php deleted file mode 100644 index 337b25e9f..000000000 --- a/workflow/engine/src/Tests/BusinessModel/CalendarTest.php +++ /dev/null @@ -1,403 +0,0 @@ - "PHPUnit Calendar$i", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5), - "CAL_WORK_HOUR" => array( - array("DAY" => 0, "HOUR_START" => "00:00", "HOUR_END" => "00:00"), - array("DAY" => 1, "HOUR_START" => "09:00", "HOUR_END" => "17:00") - ), - "CAL_HOLIDAY" => array( - array("NAME" => "holiday1", "DATE_START" => "2014-03-01", "DATE_END" => "2014-03-31"), - array("NAME" => "holiday2", "DATE_START" => "2014-03-01", "DATE_END" => "2014-03-31") - ) - ); - - $arrayCalendar = self::$calendar->create($arrayData); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertTrue(isset($arrayCalendar["CAL_UID"])); - - $arrayRecord[] = $arrayCalendar; - } - - //Create - Japanese characters - $arrayData = array( - "CAL_NAME" => "ç§ã®åå‰ï¼ˆPHPUnitã®ï¼‰", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5) - ); - - $arrayCalendar = self::$calendar->create($arrayData); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertTrue(isset($arrayCalendar["CAL_UID"])); - - $arrayRecord[] = $arrayCalendar; - - //Return - return $arrayRecord; - } - - /** - * Test update calendars - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - */ - public function testUpdate($arrayRecord) - { - $arrayData = array("CAL_DESCRIPTION" => "Description..."); - - $arrayCalendar = self::$calendar->update($arrayRecord[1]["CAL_UID"], $arrayData); - - $arrayCalendar = self::$calendar->getCalendar($arrayRecord[1]["CAL_UID"]); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertEquals($arrayCalendar["CAL_DESCRIPTION"], $arrayData["CAL_DESCRIPTION"]); - } - - /** - * Test get calendars - * - * @covers \ProcessMaker\BusinessModel\Calendar::getCalendars - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - */ - public function testGetCalendars($arrayRecord) - { - $arrayCalendar = self::$calendar->getCalendars(); - - $this->assertNotEmpty($arrayCalendar); - - $arrayCalendar = self::$calendar->getCalendars(null, null, null, 0, 0); - - $this->assertEmpty($arrayCalendar); - - $arrayCalendar = self::$calendar->getCalendars(array("filter" => "PHPUnit")); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertEquals($arrayCalendar[0]["CAL_UID"], $arrayRecord[0]["CAL_UID"]); - $this->assertEquals($arrayCalendar[0]["CAL_NAME"], $arrayRecord[0]["CAL_NAME"]); - $this->assertEquals($arrayCalendar[0]["CAL_DESCRIPTION"], $arrayRecord[0]["CAL_DESCRIPTION"]); - } - - /** - * Test get calendar - * - * @covers \ProcessMaker\BusinessModel\Calendar::getCalendar - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - */ - public function testGetCalendar($arrayRecord) - { - //Get - $arrayCalendar = self::$calendar->getCalendar($arrayRecord[0]["CAL_UID"]); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertEquals($arrayCalendar["CAL_UID"], $arrayRecord[0]["CAL_UID"]); - $this->assertEquals($arrayCalendar["CAL_NAME"], $arrayRecord[0]["CAL_NAME"]); - $this->assertEquals($arrayCalendar["CAL_DESCRIPTION"], $arrayRecord[0]["CAL_DESCRIPTION"]); - - //Get - Japanese characters - $arrayCalendar = self::$calendar->getCalendar($arrayRecord[self::$numCalendar]["CAL_UID"]); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertNotEmpty($arrayCalendar); - - $this->assertEquals($arrayCalendar["CAL_UID"], $arrayRecord[self::$numCalendar]["CAL_UID"]); - $this->assertEquals($arrayCalendar["CAL_NAME"], "ç§ã®åå‰ï¼ˆPHPUnitã®ï¼‰"); - $this->assertEquals($arrayCalendar["CAL_DESCRIPTION"], "Description"); - } - - /** - * Test exception when data not is array - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", this value must be an array. - */ - public function testCreateExceptionNoIsArrayData() - { - $arrayData = 0; - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testCreateExceptionEmptyData() - { - $arrayData = array(); - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception for required data (CAL_NAME) - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage Undefined value for "CAL_NAME", it is required. - */ - public function testCreateExceptionRequiredDataCalName() - { - $arrayData = array( - //"CAL_NAME" => "PHPUnit Calendar", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5) - ); - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception for invalid data (CAL_NAME) - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAL_NAME", it can not be empty. - */ - public function testCreateExceptionInvalidDataCalName() - { - $arrayData = array( - "CAL_NAME" => "", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5) - ); - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception for invalid data (CAL_WORK_DAYS) - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAL_WORK_DAYS", it only accepts values: "1|2|3|4|5|6|7". - */ - public function testCreateExceptionInvalidDataCalWorkDays() - { - $arrayData = array( - "CAL_NAME" => "PHPUnit Calendar", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(10, 2, 3, 4, 5) - ); - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception for calendar name existing - * - * @covers \ProcessMaker\BusinessModel\Calendar::create - * - * @expectedException Exception - * @expectedExceptionMessage The calendar name with CAL_NAME: "PHPUnit Calendar0" already exists. - */ - public function testCreateExceptionExistsCalName() - { - $arrayData = array( - "CAL_NAME" => "PHPUnit Calendar0", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5), - ); - - $arrayCalendar = self::$calendar->create($arrayData); - } - - /** - * Test exception when data not is array - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", this value must be an array. - */ - public function testUpdateExceptionNoIsArrayData() - { - $arrayData = 0; - - $arrayCalendar = self::$calendar->update("", $arrayData); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testUpdateExceptionEmptyData() - { - $arrayData = array(); - - $arrayCalendar = self::$calendar->update("", $arrayData); - } - - /** - * Test exception for invalid calendar UID - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @expectedException Exception - * @expectedExceptionMessage The calendar with CAL_UID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist. - */ - public function testUpdateExceptionInvalidCalUid() - { - $arrayData = array( - "CAL_NAME" => "PHPUnit Calendar", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5), - ); - - $arrayCalendar = self::$calendar->update("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $arrayData); - } - - /** - * Test exception for invalid data (CAL_NAME) - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAL_NAME", it can not be empty. - */ - public function testUpdateExceptionInvalidDataCalName($arrayRecord) - { - $arrayData = array( - "CAL_NAME" => "", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(1, 2, 3, 4, 5), - ); - - $arrayCalendar = self::$calendar->update($arrayRecord[0]["CAL_UID"], $arrayData); - } - - /** - * Test exception for invalid data (CAL_WORK_DAYS) - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAL_WORK_DAYS", it only accepts values: "1|2|3|4|5|6|7". - */ - public function testUpdateExceptionInvalidDataCalWorkDays($arrayRecord) - { - $arrayData = array( - "CAL_NAME" => "PHPUnit Calendar", - "CAL_DESCRIPTION" => "Description", - "CAL_WORK_DAYS" => array(10, 2, 3, 4, 5), - ); - - $arrayCalendar = self::$calendar->update($arrayRecord[0]["CAL_UID"], $arrayData); - } - - /** - * Test exception for calendar name existing - * - * @covers \ProcessMaker\BusinessModel\Calendar::update - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - * - * @expectedException Exception - * @expectedExceptionMessage The calendar name with CAL_NAME: "PHPUnit Calendar1" already exists. - */ - public function testUpdateExceptionExistsCalName($arrayRecord) - { - $arrayData = $arrayRecord[1]; - - $arrayCalendar = self::$calendar->update($arrayRecord[0]["CAL_UID"], $arrayData); - } - - /** - * Test delete calendars - * - * @covers \ProcessMaker\BusinessModel\Calendar::delete - * - * @depends testCreate - * @param array $arrayRecord Data of the calendars - */ - public function testDelete($arrayRecord) - { - foreach ($arrayRecord as $value) { - self::$calendar->delete($value["CAL_UID"]); - } - - $arrayCalendar = self::$calendar->getCalendars(array("filter" => "PHPUnit")); - - $this->assertTrue(is_array($arrayCalendar)); - $this->assertEmpty($arrayCalendar); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/CasesActionTest13_17.php b/workflow/engine/src/Tests/BusinessModel/CasesActionTest13_17.php deleted file mode 100644 index aab2a9d87..000000000 --- a/workflow/engine/src/Tests/BusinessModel/CasesActionTest13_17.php +++ /dev/null @@ -1,392 +0,0 @@ - - * @copyright Colosa - Bolivia - * - * @protected - * @package Tests\BusinessModel - */ -class CasesAction13_17Test extends \PHPUnit_Framework_TestCase -{ - protected $oCases; - protected $nowCountTodo = 0; - protected $nowCountDraft = 0; - protected $nowCountPaused = 0; - protected $idCaseToDo = ''; - protected $idCaseDraft = ''; - - /** - * Set class for test - * - * @coversNothing - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function setUp() - { - \G::loadClass('pmFunctions'); - - $usrUid = '00000000000000000000000000000001'; - $proUid = '2317283235320c1a36972b2028131767'; - $tasUid = '7983935495320c1a75e1df6068322280'; - $idCaseToDo = PMFNewCase($proUid, $usrUid, $tasUid, array()); - PMFDerivateCase($idCaseToDo, 1); - $this->idCaseToDo = $idCaseToDo; - - $idCaseDraft = PMFNewCase($proUid, $usrUid, $tasUid, array()); - $this->idCaseDraft = $idCaseDraft; - - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - $listToDo = $this->oCases->getList(array('userId' => '00000000000000000000000000000001')); - $this->nowCountTodo = $listToDo['total']; - - $listDraft = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'draft')); - $this->nowCountDraft = $listDraft['total']; - - $listPaused = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'paused')); - $this->nowCountPaused = $listPaused['total']; - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$app_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCaseErrorAppUidArray() - { - $this->oCases->putCancelCase(array(), '00000000000000000000000000000001'); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * @expectedException Exception - * @expectedExceptionMessage The application with $app_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCaseErrorAppUidIncorrect() - { - $this->oCases->putCancelCase('IdDoesNotExists', '00000000000000000000000000000001'); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$usr_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCaseErrorUsrUidArray() - { - $this->oCases->putCancelCase($this->idCaseDraft, array()); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * @expectedException Exception - * @expectedExceptionMessage The user with $usr_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCaseErrorUsrUidIncorrect() - { - $this->oCases->putCancelCase($this->idCaseDraft, 'IdDoesNotExists'); - } - - /** - * Test error for type in third field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$del_index' it must be a integer. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCaseErrorDelIndexIncorrect() - { - $this->oCases->putCancelCase($this->idCaseDraft, '00000000000000000000000000000001', 'string'); - } - - /** - * Test for cancel case - * - * @covers \ProcessMaker\BusinessModel\Cases::putCancelCase - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutCancelCase() - { - $this->oCases->putCancelCase($this->idCaseDraft, '00000000000000000000000000000001'); - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - $listDraft = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'draft')); - $this->assertNotEquals($this->nowCountDraft, $listDraft['total']); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$app_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorAppUidArray() - { - $this->oCases->putPauseCase(array(), '00000000000000000000000000000001'); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage The application with $app_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorAppUidIncorrect() - { - $this->oCases->putPauseCase('IdDoesNotExists', '00000000000000000000000000000001'); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$usr_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorUsrUidArray() - { - $this->oCases->putPauseCase($this->idCaseDraft, array()); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage The user with $usr_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorUsrUidIncorrect() - { - $this->oCases->putPauseCase($this->idCaseDraft, 'IdDoesNotExists'); - } - - /** - * Test error for type in third field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$del_index' it must be a integer. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorDelIndexIncorrect() - { - $this->oCases->putPauseCase($this->idCaseDraft, '00000000000000000000000000000001', 'string'); - } - - /** - * Test error for type in fourth field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * @expectedException Exception - * @expectedExceptionMessage The value '2014-44-44' is not a valid date for the format 'Y-m-d'. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCaseErrorDateIncorrect() - { - $this->oCases->putPauseCase($this->idCaseDraft, '00000000000000000000000000000001', false, '2014-44-44'); - } - - /** - * Test for cancel case - * - * @covers \ProcessMaker\BusinessModel\Cases::putPauseCase - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutPauseCase() - { - $this->oCases->putPauseCase($this->idCaseToDo, '00000000000000000000000000000001'); - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - $listPaused = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'paused')); - $this->assertNotEquals($this->nowCountPaused, $listPaused['total']); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$app_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCaseErrorAppUidArray() - { - $this->oCases->putUnpauseCase(array(), '00000000000000000000000000000001'); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * @expectedException Exception - * @expectedExceptionMessage The application with $app_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCaseErrorAppUidIncorrect() - { - $this->oCases->putUnpauseCase('IdDoesNotExists', '00000000000000000000000000000001'); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$usr_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCaseErrorUsrUidArray() - { - $this->oCases->putUnpauseCase($this->idCaseDraft, array()); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * @expectedException Exception - * @expectedExceptionMessage The user with $usr_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCaseErrorUsrUidIncorrect() - { - $this->oCases->putUnpauseCase($this->idCaseDraft, 'IdDoesNotExists'); - } - - /** - * Test error for type in third field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$del_index' it must be a integer. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCaseErrorDelIndexIncorrect() - { - $this->oCases->putUnpauseCase($this->idCaseDraft, '00000000000000000000000000000001', 'string'); - } - - /** - * Test for cancel case - * - * @covers \ProcessMaker\BusinessModel\Cases::putUnpauseCase - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testPutUnpauseCase() - { - $this->oCases->putUnpauseCase($this->idCaseToDo, '00000000000000000000000000000001'); - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - $listPaused = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'paused')); - $this->assertEquals($this->nowCountPaused, $listPaused['total']); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::deleteCase - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$app_uid' it must be a string. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testDeleteCaseErrorAppUidArray() - { - $this->oCases->deleteCase(array()); - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Cases::deleteCase - * @expectedException Exception - * @expectedExceptionMessage The application with $app_uid: 'IdDoesNotExists' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testDeleteCaseErrorAppUidIncorrect() - { - $this->oCases->deleteCase('IdDoesNotExists'); - } - - /** - * Test for cancel case - * - * @covers \ProcessMaker\BusinessModel\Cases::deleteCase - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testDeleteCase() - { - $this->oCases->deleteCase($this->idCaseToDo); - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - $listToDo = $this->oCases->getList(array('userId' => '00000000000000000000000000000001')); - $this->assertNotEquals($this->nowCountTodo, $listToDo['total']); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/BusinessModel/CasesTest.php b/workflow/engine/src/Tests/BusinessModel/CasesTest.php deleted file mode 100644 index 412926c95..000000000 --- a/workflow/engine/src/Tests/BusinessModel/CasesTest.php +++ /dev/null @@ -1,175 +0,0 @@ - - * @copyright Colosa - Bolivia - * - * @protected - * @package Tests\BusinessModel - */ -class CasesTest extends \PHPUnit_Framework_TestCase -{ - protected $oCases; - - /** - * Set class for test - * - * @coversNothing - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function setUp() - { - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - return true; - } - - /** - * Test error for type in first field the function - * - * @covers \BusinessModel\Cases::getList - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$dataList' it must be an array. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesErrorArray() - { - $this->oCases->getList(true); - } - - /** - * Test error for empty userId in array - * - * @covers \BusinessModel\Cases::getList - * @expectedException Exception - * @expectedExceptionMessage The user with userId: '' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesErrorUserIdArray() - { - $this->oCases->getList(array()); - } - - /** - * Test error for not exists userId in array - * - * @covers \BusinessModel\Cases::getList - * @expectedException Exception - * @expectedExceptionMessage The user with userId: 'UidInexistente' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesErrorNotExistsUserIdArray() - { - $this->oCases->getList(array('userId' => 'UidInexistente')); - } - - /** - * Test error for incorrect value $action in array - * - * @covers \BusinessModel\Cases::getList - * @expectedException Exception - * @expectedExceptionMessage The value for $action is incorrect. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesErrorIncorrectValueArray() - { - $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'incorrect')); - } - - /** - * Test get list to do - * - * @covers \BusinessModel\Cases::getList - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesToDo() - { - $response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001')); - $this->assertTrue(is_array($response)); - $this->assertTrue(is_numeric($response['totalCount'])); - $this->assertTrue(is_array($response['data'])); - } - - /** - * Test get list draft - * - * @covers \BusinessModel\Cases::getList - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesDraft() - { - $response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'draft')); - $this->assertTrue(is_array($response)); - $this->assertTrue(is_numeric($response['totalCount'])); - $this->assertTrue(is_array($response['data'])); - } - - /** - * Test get list participated - * - * @covers \BusinessModel\Cases::getList - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesParticipated() - { - $response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'sent')); - $this->assertTrue(is_array($response)); - $this->assertTrue(is_numeric($response['totalCount'])); - $this->assertTrue(is_array($response['data'])); - } - - /** - * Test get list unassigned - * - * @covers \BusinessModel\Cases::getList - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesUnassigned() - { - $response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'unassigned')); - $this->assertTrue(is_array($response)); - $this->assertTrue(is_numeric($response['totalCount'])); - $this->assertTrue(is_array($response['data'])); - } - - /** - * Test get list search - * - * @covers \BusinessModel\Cases::getList - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetListCasesSearch() - { - $response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'search')); - $this->assertTrue(is_array($response)); - $this->assertTrue(is_numeric($response['totalCount'])); - $this->assertTrue(is_array($response['data'])); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/CasesTest7_12.php b/workflow/engine/src/Tests/BusinessModel/CasesTest7_12.php deleted file mode 100644 index 1477fd50f..000000000 --- a/workflow/engine/src/Tests/BusinessModel/CasesTest7_12.php +++ /dev/null @@ -1,356 +0,0 @@ -create(array("type"=>"classicProject", "PRO_TITLE"=> "NEW TEST PHP UNIT", "PRO_DESCRIPTION"=> "465", - "PRO_CATEGORY"=> "", "PRO_CREATE_USER"=> "00000000000000000000000000000001", - "PRO_UID"=> self::$proUid, "USR_UID"=> "00000000000000000000000000000001"), false); - - $task = new \Task(); - $task->create(array("TAS_START"=>"TRUE", "TAS_UID"=> self::$tasUid, "PRO_UID"=> self::$proUid, "TAS_TITLE" => "NEW TASK TEST PHP UNIT", - "TAS_POSX"=> 581, "TAS_POSY"=> 47, "TAS_WIDTH"=> 165, "TAS_HEIGHT"=> 40), false); - $task = new \Task(); - $task->create(array( "TAS_UID"=> self::$tasUid2, "PRO_UID"=> self::$proUid, "TAS_TITLE" => "NEW TASK ONE", - "TAS_POSX"=> 481, "TAS_POSY"=> 127, "TAS_WIDTH"=> 165, "TAS_HEIGHT"=> 40), false); - $task = new \Task(); - $task->create(array( "TAS_UID"=> self::$tasUid3, "PRO_UID"=> self::$proUid, "TAS_TITLE" => "NEW TASK TWO", - "TAS_POSX"=> 681, "TAS_POSY"=> 127, "TAS_WIDTH"=> 165, "TAS_HEIGHT"=> 40), false); - - $nw = new \processMap(); - $nw->saveNewPattern(self::$proUid, self::$tasUid, self::$tasUid2, 'PARALLEL', true); - $nw = new \processMap(); - $nw->saveNewPattern(self::$proUid, self::$tasUid, self::$tasUid3, 'PARALLEL', true); - - $user = new \Users(); - $user->create(array("USR_ROLE"=> "PROCESSMAKER_ADMIN","USR_UID"=> self::$usrUid2, "USR_USERNAME"=> "dummy", - "USR_PASSWORD"=>"21232f297a57a5a743894a0e4a801fc3", "USR_FIRSTNAME"=>"dummy_firstname", "USR_LASTNAME"=>"dummy_lastname", - "USR_EMAIL"=>"dummy@dummy.com", "USR_DUE_DATE"=>'2020-01-01', "USR_CREATE_DATE"=>"2014-01-01 12:00:00", "USR_UPDATE_DATE"=>"2014-01-01 12:00:00", - "USR_STATUS"=>"ACTIVE", "USR_UX"=>"NORMAL")); - - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid, "USR_UID"=> self::$usrUid, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid, "USR_UID"=> self::$usrUid2, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid2, "USR_UID"=> self::$usrUid, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid2, "USR_UID"=> self::$usrUid2, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid3, "USR_UID"=> self::$usrUid, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid3, "USR_UID"=> self::$usrUid2, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - } - - - /** - * Set class for test - * - * @coversNothing - * - * @copyright Colosa - Bolivia - */ - public function setUp() - { - $this->oCases = new \ProcessMaker\BusinessModel\Cases(); - return true; - } - - /** - * Test error for incorrect value of process in array - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * @expectedException Exception - * @expectedExceptionMessage Invalid process 12345678912345678912345678912345678 - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseErrorIncorrectProcessValueArray() - { - $this->oCases->addCase('12345678912345678912345678912345678', self::$tasUid, self::$usrUid, array()); - } - - /** - * Test error for incorrect value of task in array - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * @expectedException Exception - * @expectedExceptionMessage Task invalid or the user is not assigned to the task - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseErrorIncorrectTaskValueArray() - { - $this->oCases->addCase(self::$proUid, '12345678912345678912345678912345678', self::$usrUid, array()); - } - - /** - * Test add Case - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * - * @copyright Colosa - Bolivia - */ - public function testAddCase() - { - $response = $this->oCases->addCase(self::$proUid, self::$tasUid, self::$usrUid, array()); - $this->assertTrue(is_object($response)); - $aResponse = json_decode(json_encode($response), true); - return $aResponse; - } - - /** - * Test error for incorrect value of case in array - * - * @covers \ProcessMaker\BusinessModel\Cases::getTaskCase - * @expectedException Exception - * @expectedExceptionMessage Incorrect or unavailable information about this case: 12345678912345678912345678912345678 - * - * @copyright Colosa - Bolivia - */ - public function testGetTaskCaseErrorIncorrectCaseValueArray() - { - $this->oCases->getTaskCase('12345678912345678912345678912345678', self::$usrUid); - } - - /** - * Test get Task Case - * - * @covers \ProcessMaker\BusinessModel\Cases::getTaskCase - * @depends testAddCase - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetTaskCase(array $aResponse) - { - $response = $this->oCases->getTaskCase($aResponse['app_uid'], self::$usrUid); - $this->assertTrue(is_array($response)); - } - - /** - * Test error for incorrect value of case in array - * - * @covers \ProcessMaker\BusinessModel\Cases::getCaseInfo - * @expectedException Exception - * @expectedExceptionMessage The Application row '12345678912345678912345678912345678' doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCaseInfoErrorIncorrectCaseValueArray() - { - $this->oCases->getCaseInfo('12345678912345678912345678912345678', self::$usrUid); - } - - /** - * Test get Case Info - * - * @covers \ProcessMaker\BusinessModel\Cases::getCaseInfo - * @depends testAddCase - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetCaseInfo(array $aResponse) - { - $response = $this->oCases->getCaseInfo($aResponse['app_uid'], self::$usrUid); - $this->assertTrue(is_object($response)); - } - - /** - * Test error for incorrect value of user delegation in array - * - * @covers \ProcessMaker\BusinessModel\Cases::updateReassignCase - * @depends testAddCase - * @param array $aResponse - * @expectedException Exception - * @expectedExceptionMessage Invalid Case Delegation index for this user - * - * @copyright Colosa - Bolivia - */ - public function testUpdateReassignCaseErrorIncorrectUserValueArray(array $aResponse) - { - $this->oCases->updateReassignCase($aResponse['app_uid'], self::$usrUid, null, self::$usrUid, self::$usrUid2); - } - - /** - * Test error for incorrect value of case in array - * - * @covers \ProcessMaker\BusinessModel\Cases::updateReassignCase - * @expectedException Exception - * @expectedExceptionMessage The Application with app_uid: 12345678912345678912345678912345678 doesn't exist - * - * @copyright Colosa - Bolivia - */ - public function testUpdateReassignCaseErrorIncorrectCaseValueArray() - { - $this->oCases->updateReassignCase('12345678912345678912345678912345678', self::$usrUid, null, self::$usrUid2, self::$usrUid); - } - - /** - * Test put reassign case - * - * @covers \ProcessMaker\BusinessModel\Cases::updateReassignCase - * @depends testAddCase - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testUpdateReassignCase(array $aResponse) - { - $response = $this->oCases->updateReassignCase($aResponse['app_uid'], self::$usrUid, null, self::$usrUid2, self::$usrUid); - $this->assertTrue(empty($response)); - } - - /** - * Test add Case to test route case - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseRouteCase() - { - $response = $this->oCases->addCase(self::$proUid, self::$tasUid, self::$usrUid, array()); - $this->assertTrue(is_object($response)); - $aResponseRouteCase = json_decode(json_encode($response), true); - return $aResponseRouteCase; - } - - /** - * Test error for incorrect value of case in array - * - * @covers \ProcessMaker\BusinessModel\Cases::updateRouteCase - * @expectedException Exception - * @expectedExceptionMessage The row '12345678912345678912345678912345678, ' in table AppDelegation doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testUpdateRouteCaseErrorIncorrectCaseValueArray() - { - $this->oCases->updateRouteCase('12345678912345678912345678912345678', self::$usrUid, null); - } - - /** - * Test put route case - * - * @covers \ProcessMaker\BusinessModel\Cases::updateRouteCase - * @depends testAddCaseRouteCase - * @param array $aResponseRouteCase - * - * @copyright Colosa - Bolivia - */ - public function testUpdateRouteCase(array $aResponseRouteCase) - { - $response = $this->oCases->updateRouteCase($aResponseRouteCase['app_uid'], self::$usrUid, null); - $this->assertTrue(empty($response)); - } - - /** - * Test error for incorrect value of process in array - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * @expectedException Exception - * @expectedExceptionMessage Invalid process 12345678912345678912345678912345678 - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseImpersonateErrorIncorrectProcessValueArray() - { - $this->oCases->addCaseImpersonate('12345678912345678912345678912345678', self::$usrUid2, self::$tasUid, array()); - } - - /** - * Test error for incorrect value of task in array - * - * @covers \ProcessMaker\BusinessModel\Cases::addCase - * @expectedException Exception - * @expectedExceptionMessage User not registered! 12345678912345678912345678912345678!! - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseImpersonateErrorIncorrectTaskValueArray() - { - $this->oCases->addCaseImpersonate(self::$proUid, '12345678912345678912345678912345678', self::$tasUid, array()); - } - - - /** - * Test add Case impersonate - * - * @covers \ProcessMaker\BusinessModel\Cases::addCaseImpersonate - * - * @copyright Colosa - Bolivia - */ - public function testAddCaseImpersonate() - { - $response = $this->oCases->addCaseImpersonate(self::$proUid, self::$usrUid2, self::$tasUid, array()); - $this->assertTrue(is_object($response)); - } - - public static function tearDownAfterClass() - { - $assign = new \TaskUser(); - $assign->remove(self::$tasUid, self::$usrUid, 1,1); - - $task = new \Task(); - $task->remove(self::$tasUid); - - $task = new \Task(); - $task->remove(self::$tasUid2); - - $task = new \Task(); - $task->remove(self::$tasUid3); - - $process = new \Process(); - $process->remove(self::$proUid); - - $criteria = new \Criteria("workflow"); - $criteria->addSelectColumn(\RoutePeer::PRO_UID); - $criteria->add(\RoutePeer::PRO_UID, self::$proUid, \Criteria::EQUAL); - \ProcessFilesPeer::doDelete($criteria); - - $user = new \Users(); - $user->remove(self::$usrUid2); - - $oConnection = \Propel::getConnection( \UsersPeer::DATABASE_NAME ); - try { - $oUser = \UsersPeer::retrieveByPK( self::$usrUid2 ); - if (! is_null( $oUser )) { - $oConnection->begin(); - $oUser->delete(); - $oConnection->commit(); - } - } catch (Exception $oError) { - $oConnection->rollback(); - throw ($oError); - } - } -} diff --git a/workflow/engine/src/Tests/BusinessModel/DepartmentTest.php b/workflow/engine/src/Tests/BusinessModel/DepartmentTest.php deleted file mode 100644 index a3b63a7ba..000000000 --- a/workflow/engine/src/Tests/BusinessModel/DepartmentTest.php +++ /dev/null @@ -1,354 +0,0 @@ - - * @copyright Colosa - Bolivia - * - * @protected - * @package Tests\BusinessModel - */ -class DepartmentTest extends \PHPUnit_Framework_TestCase -{ - protected $oDepartment; - - /** - * Set class for test - * - * @coversNothing - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function setUp() - { - $this->oDepartment = new \ProcessMaker\BusinessModel\Department(); - return true; - } - - /** - * Test error for type in first field the function - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$dep_data' it must be an array. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArray() - { - $this->oDepartment->saveDepartment(true); - } - - /** - * Test error for type in second field the function - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage Invalid value for '$create' it must be a boolean. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorBoolean() - { - $this->oDepartment->saveDepartment(array('1'),array()); - } - - /** - * Test error for empty array in first field the function - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The field '$dep_data' is empty. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayEmpty() - { - $this->oDepartment->saveDepartment(array()); - } - - /** - * Test error for create department with nonexistent dep_parent - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The departament with dep_parent: 'testUidDepartment' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayDepParentExist() - { - $data = array('dep_parent' => 'testUidDepartment'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Test error for create department with nonexistent dep_manager - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The user with dep_manager: 'testUidUser' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayDepManagerExist() - { - $data = array('dep_manager' => 'testUidUser'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Test error for create department with incorrect dep_status - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The departament with dep_status: 'SUPER ACTIVO' is incorrect. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayDepStatus() - { - $data = array('dep_status' => 'SUPER ACTIVO'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Test error for create department untitled - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The field dep_title is required. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayDepTitleEmpty() - { - $data = array('dep_status' => 'ACTIVE'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Save department parent - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @return array - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentParent() - { - $data = array('dep_title' => 'Departamento Padre'); - $dep_data = $this->oDepartment->saveDepartment($data); - $this->assertTrue(is_array($dep_data)); - $this->assertTrue(isset($dep_data['dep_uid'])); - $this->assertEquals($dep_data['dep_parent'], ''); - $this->assertEquals($dep_data['dep_title'], 'Departamento Padre'); - $this->assertEquals($dep_data['dep_status'], 'ACTIVE'); - $this->assertEquals($dep_data['dep_manager'], ''); - $this->assertEquals($dep_data['has_children'], 0); - return $dep_data; - } - - /** - * Test error for create department with title exist - * - * @depends testCreateDepartmentParent - * @param array $dep_data, Data for parent department - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The departament with dep_title: 'Departamento Padre' already exists. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentErrorArrayDepTitleRepeated(array $dep_data) - { - $data = array('dep_title' => 'Departamento Padre'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Test error for create department untitled - * - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The departament with dep_uid: 'testUidDepartment' does not exist. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testUpdateDepartmentErrorArrayDepUidExist() - { - $data = array('dep_uid' => 'testUidDepartment'); - $this->oDepartment->saveDepartment($data); - } - - /** - * Save department child - * - * @depends testCreateDepartmentParent - * @param array $dep_data, Data for parent department - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @return array - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testCreateDepartmentChild(array $dep_data) - { - $data = array( - 'dep_title' => 'Departamento Child', - 'dep_parent' => $dep_data['dep_uid'], - 'dep_status' => 'INACTIVE', - 'dep_manager' => '00000000000000000000000000000001' - ); - $child_data = $this->oDepartment->saveDepartment($data); - $this->assertTrue(is_array($child_data)); - $this->assertTrue(isset($child_data['dep_uid'])); - $this->assertEquals($child_data['dep_parent'], $dep_data['dep_uid']); - $this->assertEquals($child_data['dep_title'], 'Departamento Child'); - $this->assertEquals($child_data['dep_status'], 'INACTIVE'); - $this->assertEquals($child_data['dep_manager'], '00000000000000000000000000000001'); - $this->assertEquals($child_data['has_children'], 0); - return $child_data; - } - - /** - * Test error for update department with title exist - * - * @depends testCreateDepartmentParent - * @depends testCreateDepartmentChild - * @param array $dep_data, Data for parent department - * @param array $child_data, Data for child department - * @covers \ProcessMaker\BusinessModel\Department::saveDepartment - * @expectedException Exception - * @expectedExceptionMessage The departament with dep_title: 'Departamento Padre' already exists. - * @return array - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testUpdateDepartmentErrorArrayDepTitleRepeated(array $dep_data, array $child_data) - { - $dataUpdate = array ( - 'dep_uid' => $child_data['dep_uid'], - 'dep_title' => 'Departamento Padre' - ); - $this->oDepartment->saveDepartment($dataUpdate, false); - } - - /** - * Test get departments array - * - * @depends testCreateDepartmentParent - * @depends testCreateDepartmentChild - * @param array $dep_data, Data for parent department - * @param array $child_data, Data for child department - * @covers \ProcessMaker\BusinessModel\Department::getDepartments - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetDepartments(array $dep_data, array $child_data) - { - $arrayDepartments = $this->oDepartment->getDepartments(); - $this->assertTrue(is_array($arrayDepartments)); - $this->assertEquals(count($arrayDepartments), 1); - $this->assertTrue(is_array($arrayDepartments[0]['dep_children'])); - $this->assertEquals(count($arrayDepartments[0]['dep_children']), 1); - - $dataParent = $arrayDepartments[0]; - $this->assertEquals($dep_data['dep_parent'], $dataParent['dep_parent']); - $this->assertEquals($dep_data['dep_title'], $dataParent['dep_title']); - $this->assertEquals($dep_data['dep_status'], $dataParent['dep_status']); - $this->assertEquals($dep_data['dep_manager'], $dataParent['dep_manager']); - - $dataChild = $arrayDepartments[0]['dep_children'][0]; - $this->assertEquals($child_data['dep_parent'], $dataChild['dep_parent']); - $this->assertEquals($child_data['dep_title'], $dataChild['dep_title']); - $this->assertEquals($child_data['dep_status'], $dataChild['dep_status']); - $this->assertEquals($child_data['dep_manager'], $dataChild['dep_manager']); - } - - /** - * Test get department array - * - * @depends testCreateDepartmentParent - * @param array $dep_data, Data for parent department - * @covers \ProcessMaker\BusinessModel\Department::getDepartment - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testGetDepartment(array $dep_data) - { - $dataParent = $this->oDepartment->getDepartment($dep_data['dep_uid']); - $this->assertTrue(is_array($dataParent)); - - $this->assertEquals($dep_data['dep_parent'], $dataParent['dep_parent']); - $this->assertEquals($dep_data['dep_title'], $dataParent['dep_title']); - $this->assertEquals($dep_data['dep_status'], $dataParent['dep_status']); - $this->assertEquals($dep_data['dep_manager'], $dataParent['dep_manager']); - } - - // TODO: Assigned Users to department - public function testDeleteDepartmentErrorUsersSelections() - { - - } - - /** - * Test error for delete department with children - * - * @depends testCreateDepartmentParent - * @depends testCreateDepartmentChild - * @param array $dep_data, Data for parent department - * @param array $child_data, Data for child department - * @covers \ProcessMaker\BusinessModel\Department::deleteDepartment - * @expectedException Exception - * @expectedExceptionMessage Can not delete the department, it has a children department. - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testDeleteDepartmentErrorDepartmentParent(array $dep_data, array $child_data) - { - $this->oDepartment->deleteDepartment($dep_data['dep_uid']); - } - - /** - * Test get departments array - * - * @depends testCreateDepartmentParent - * @depends testCreateDepartmentChild - * @param array $dep_data, Data for parent department - * @param array $child_data, Data for child department - * @covers \ProcessMaker\BusinessModel\Department::deleteDepartment - * - * @author Brayan Pereyra (Cochalo) - * @copyright Colosa - Bolivia - */ - public function testDeleteDepartments(array $dep_data, array $child_data) - { - $this->oDepartment->deleteDepartment($child_data['dep_uid']); - $this->oDepartment->deleteDepartment($dep_data['dep_uid']); - $dataParent = $this->oDepartment->getDepartments(); - $this->assertTrue(empty($dataParent)); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/InputDocumentsCasesTest.php b/workflow/engine/src/Tests/BusinessModel/InputDocumentsCasesTest.php deleted file mode 100644 index 286244aa8..000000000 --- a/workflow/engine/src/Tests/BusinessModel/InputDocumentsCasesTest.php +++ /dev/null @@ -1,204 +0,0 @@ -create(array("type"=>"classicProject", "PRO_TITLE"=> "NEW TEST PHP UNIT", "PRO_DESCRIPTION"=> "465", - "PRO_CATEGORY"=> "", "PRO_CREATE_USER"=> "00000000000000000000000000000001", - "PRO_UID"=> self::$proUid, "USR_UID"=> "00000000000000000000000000000001"), false); - - $task = new \Task(); - $task->create(array("TAS_START"=>"TRUE", "TAS_UID"=> self::$tasUid, "PRO_UID"=> self::$proUid, "TAS_TITLE" => "NEW TASK TEST PHP UNIT", - "TAS_POSX"=> 581, "TAS_POSY"=> 17, "TAS_WIDTH"=> 165, "TAS_HEIGHT"=> 40), false); - - $inputDocument = new \InputDocument(); - $inputDocument->create(array("INP_DOC_UID"=> self::$inpUid, "PRO_UID"=> self::$proUid, "INP_DOC_TITLE"=> "INPUTDOCUMENT TEST UNIT", "INP_DOC_FORM_NEEDED"=> "VIRTUAL", - "INP_DOC_ORIGINAL"=> "ORIGINAL", "INP_DOC_DESCRIPTION"=> "", "INP_DOC_VERSIONING"=> "", - "INP_DOC_DESTINATION_PATH"=> "", "INP_DOC_TAGS"=> "INPUT", "ACCEPT"=> "Save", "BTN_CANCEL"=>"Cancel")); - - $step = new \Step(); - $step->create(array( "PRO_UID"=> self::$proUid, "TAS_UID"=> self::$tasUid, "STEP_UID"=> self::$steUid, "STEP_TYPE_OBJ" => "INPUT_DOCUMENT", "STEP_UID_OBJ" =>self::$inpUid)); - - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid, "USR_UID"=> self::$usrUid, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - } - - public static function tearDownAfterClass() - { - $assign = new \TaskUser(); - $assign->remove(self::$tasUid, self::$usrUid, 1,1); - - $step = new \Step(); - $step->remove(self::$steUid); - - $inputDocument = new \InputDocument(); - $inputDocument->remove(self::$inpUid); - - $task = new \Task(); - $task->remove(self::$tasUid); - - $process = new \Process(); - $process->remove(self::$proUid); - } - - /** - * Set class for test - * - * @coversNothing - * - * @copyright Colosa - Bolivia - */ - public function setUp() - { - $this->oInputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument(); - } - - /** - * Test add a test InputDocument - * - * - * @copyright Colosa - Bolivia - */ - public function testAddInputDocument() - { - \G::loadClass('pmFunctions'); - $idCase = PMFNewCase(self::$proUid, self::$usrUid, self::$tasUid, array()); - $case = new \Cases(); - $appDocUid = $case->addInputDocument(self::$inpUid, $appDocUid = \G::generateUniqueID(), '', 'INPUT', - 'PHPUNIT TEST', '', $idCase, \AppDelegation::getCurrentIndex($idCase), - self::$tasUid, self::$usrUid, "xmlform", PATH_DATA_SITE.'db.php', - 0, PATH_DATA_SITE.'db.php'); - $aResponse = array(); - $aResponse = array_merge(array("idCase" => $idCase, "appDocUid" => $appDocUid, "inpDocUid" => self::$inpUid), $aResponse); - return $aResponse; - } - - /** - * Test error for incorrect value of case in array - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::getCasesInputDocuments - * @expectedException Exception - * @expectedExceptionMessage The Application row '12345678912345678912345678912345678' doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesInputDocumentsErrorIncorrectCaseValueArray() - { - $this->oInputDocument->getCasesInputDocuments('12345678912345678912345678912345678', self::$usrUid); - } - - /** - * Test get InputDocuments - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::getCasesInputDocuments - * @depends testAddInputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesInputDocuments(array $aResponse) - { - $response = $this->oInputDocument->getCasesInputDocuments($aResponse["idCase"], self::$usrUid); - $this->assertTrue(is_array($response)); - } - - /** - * Test error for incorrect value of task in array - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::getCasesInputDocument - * @depends testAddInputDocument - * @param array $aResponse - * @expectedException Exception - * @expectedExceptionMessage The Application row '12345678912345678912345678912345678' doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesInputDocumentErrorIncorrectCaseValueArray(array $aResponse) - { - $this->oInputDocument->getCasesInputDocument('12345678912345678912345678912345678', self::$usrUid, $aResponse["appDocUid"]); - } - - /** - * Test error for incorrect value of input document in array - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::getCasesInputDocument - * @depends testAddInputDocument - * @param array $aResponse - * @expectedException Exception - * @expectedExceptionMessage This input document with id: 12345678912345678912345678912345678 doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesInputDocumentErrorIncorrectInputDocumentValueArray(array $aResponse) - { - $this->oInputDocument->getCasesInputDocument($aResponse["idCase"], self::$usrUid, '12345678912345678912345678912345678'); - } - - /** - * Test get InputDocument - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::getCasesInputDocument - * @depends testAddInputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesInputDocument(array $aResponse) - { - $response = $this->oInputDocument->getCasesInputDocument($aResponse["idCase"], self::$usrUid, $aResponse["appDocUid"]); - $this->assertTrue(is_object($response)); - } - - /** - * Test error for incorrect value of input document in array - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::removeInputDocument - * @expectedException Exception - * @expectedExceptionMessage This input document with id: 12345678912345678912345678912345678 doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testRemoveInputDocumentErrorIncorrectApplicationValueArray() - { - $this->oInputDocument->removeInputDocument('12345678912345678912345678912345678'); - } - - /** - * Test remove InputDocument - * - * @covers \ProcessMaker\BusinessModel\Cases\InputDocument::removeInputDocument - * @depends testAddInputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testRemoveInputDocument(array $aResponse) - { - $response = $this->oInputDocument->removeInputDocument($aResponse["appDocUid"]); - $this->assertTrue(empty($response)); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/BusinessModel/OutputDocumentsCasesTest.php b/workflow/engine/src/Tests/BusinessModel/OutputDocumentsCasesTest.php deleted file mode 100644 index 59972c8d4..000000000 --- a/workflow/engine/src/Tests/BusinessModel/OutputDocumentsCasesTest.php +++ /dev/null @@ -1,212 +0,0 @@ -create(array("type"=>"classicProject", "PRO_TITLE"=> "NEW TEST PHP UNIT", "PRO_DESCRIPTION"=> "465", - "PRO_CATEGORY"=> "", "PRO_CREATE_USER"=> "00000000000000000000000000000001", - "PRO_UID"=> self::$proUid, "USR_UID"=> "00000000000000000000000000000001"), false); - - $task = new \Task(); - $task->create(array("TAS_START"=>"TRUE", "TAS_UID"=> self::$tasUid, "PRO_UID"=> self::$proUid, "TAS_TITLE" => "NEW TASK TEST PHP UNIT", - "TAS_POSX"=> 581, "TAS_POSY"=> 17, "TAS_WIDTH"=> 165, "TAS_HEIGHT"=> 40), false); - - $outputDocument = new \OutputDocument(); - $outputDocument->create(array("OUT_DOC_UID"=> self::$outUid, "PRO_UID"=> self::$proUid, "OUT_DOC_TITLE"=> "NEW OUPUT TEST", "OUT_DOC_FILENAME"=> "NEW_OUPUT_TEST", - "OUT_DOC_DESCRIPTION"=> "", "OUT_DOC_REPORT_GENERATOR"=> "HTML2PDF", "OUT_DOC_REPORT_GENERATOR_label"=> "HTML2PDF (Old Version)", - "OUT_DOC_LANDSCAPE"=> "", "OUT_DOC_LANDSCAPE_label"=> "Portrait", "OUT_DOC_GENERATE"=> "BOTH", "OUT_DOC_GENERATE_label"=> "BOTH", - "OUT_DOC_VERSIONING"=> "", "OUT_DOC_VERSIONING_label"=> "NO", "OUT_DOC_MEDIA"=> "Letter", "OUT_DOC_MEDIA_label"=> "Letter", - "OUT_DOC_LEFT_MARGIN"=> "", "OUT_DOC_RIGHT_MARGIN"=> "", "OUT_DOC_TOP_MARGIN"=> "", "OUT_DOC_BOTTOM_MARGIN"=> "", - "OUT_DOC_DESTINATION_PATH"=> "", "OUT_DOC_TAGS"=> "", "OUT_DOC_PDF_SECURITY_ENABLED"=> "0", "OUT_DOC_PDF_SECURITY_ENABLED_label"=> "Disabled", - "OUT_DOC_PDF_SECURITY_OPEN_PASSWORD"=>"", "OUT_DOC_PDF_SECURITY_OWNER_PASSWORD"=> "", "OUT_DOC_PDF_SECURITY_PERMISSIONS"=> "", - "OUT_DOC_OPEN_TYPE"=> "0", "OUT_DOC_OPEN_TYPE_label"=> "Download the file", "BTN_CANCEL"=> "Cancel", "ACCEPT"=> "Save")); - - $step = new \Step(); - $step->create(array( "PRO_UID"=> self::$proUid, "TAS_UID"=> self::$tasUid, "STEP_UID"=> self::$steUid, "STEP_TYPE_OBJ" => "OUTPUT_DOCUMENT", "STEP_UID_OBJ" =>self::$outUid)); - - $assign = new \TaskUser(); - $assign->create(array("TAS_UID"=> self::$tasUid, "USR_UID"=> self::$usrUid, "TU_TYPE"=> "1", "TU_RELATION"=> 1)); - - } - - public static function tearDownAfterClass() - { - $assign = new \TaskUser(); - $assign->remove(self::$tasUid, self::$usrUid, 1,1); - - $step = new \Step(); - $step->remove(self::$steUid); - - $outputDocument = new \OutputDocument(); - $outputDocument->remove(self::$outUid); - - $task = new \Task(); - $task->remove(self::$tasUid); - - $process = new \Process(); - $process->remove(self::$proUid); - } - - /** - * Set class for test - * - * @coversNothing - * - * @copyright Colosa - Bolivia - */ - public function setUp() - { - $this->oOutputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument(); - } - - /** - * Test add OutputDocument - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::addCasesOutputDocument - * - * @copyright Colosa - Bolivia - */ - public function testAddCasesOutputDocument() - { - \G::loadClass('pmFunctions'); - $idCase = PMFNewCase(self::$proUid, self::$usrUid, self::$tasUid, array()); - $response = $this->oOutputDocument->addCasesOutputDocument($idCase, self::$outUid, self::$usrUid); - $this->assertTrue(is_object($response)); - $aResponse = json_decode(json_encode($response), true); - $aResponse = array_merge(array("idCase" => $idCase), $aResponse); - return $aResponse; - } - - /** - * Test error for incorrect value of application in array - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::getCasesOutputDocuments - * @expectedException Exception - * @expectedExceptionMessage The Application row '12345678912345678912345678912345678' doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesOutputDocumentsErrorIncorrectApplicationValueArray() - { - $this->oOutputDocument->getCasesOutputDocuments('12345678912345678912345678912345678', self::$usrUid); - } - - /** - * Test get OutputDocuments - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::getCasesOutputDocuments - * @depends testAddCasesOutputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesOutputDocuments(array $aResponse) - { - $response = $this->oOutputDocument->getCasesOutputDocuments($aResponse["idCase"], self::$usrUid); - $this->assertTrue(is_array($response)); - } - - /** - * Test error for incorrect value of application in array - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::getCasesOutputDocument - * @depends testAddCasesOutputDocument - * @param array $aResponse - * @expectedException Exception - * @expectedExceptionMessage The Application row '12345678912345678912345678912345678' doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesOutputDocumentErrorIncorrectApplicationValueArray(array $aResponse) - { - $this->oOutputDocument->getCasesOutputDocument('12345678912345678912345678912345678', self::$usrUid, $aResponse["app_doc_uid"]); - } - - /** - * Test error for incorrect value of output document in array - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::getCasesOutputDocument - * @depends testAddCasesOutputDocument - * @param array $aResponse - * @expectedException Exception - * @expectedExceptionMessage This output document with id: 12345678912345678912345678912345678 doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesOutputDocumentErrorIncorrectOutputDocumentValueArray(array $aResponse) - { - $this->oOutputDocument->getCasesOutputDocument($aResponse["idCase"], self::$usrUid, '12345678912345678912345678912345678'); - } - - /** - * Test get OutputDocument - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::getCasesOutputDocument - * @depends testAddCasesOutputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testGetCasesOutputDocument(array $aResponse) - { - $response = $this->oOutputDocument->getCasesOutputDocument($aResponse["idCase"], self::$usrUid, $aResponse["app_doc_uid"]); - $this->assertTrue(is_object($response)); - } - - /** - * Test error for incorrect value of output document in array - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::removeOutputDocument - * @expectedException Exception - * @expectedExceptionMessage This output document with id: 12345678912345678912345678912345678 doesn't exist! - * - * @copyright Colosa - Bolivia - */ - public function testRemoveOutputDocumentErrorIncorrectOutputDocumentValueArray() - { - $this->oOutputDocument->removeOutputDocument('12345678912345678912345678912345678'); - } - - /** - * Test remove OutputDocument - * - * @covers \ProcessMaker\BusinessModel\Cases\OutputDocument::removeOutputDocument - * @depends testAddCasesOutputDocument - * @param array $aResponse - * - * @copyright Colosa - Bolivia - */ - public function testRemoveOutputDocument(array $aResponse) - { - $response = $this->oOutputDocument->removeOutputDocument($aResponse["app_doc_uid"]); - $this->assertTrue(empty($response)); - - //remove Case - $case = new \Cases(); - $case->removeCase( $aResponse["idCase"] ); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php b/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php deleted file mode 100644 index f03e5fb3e..000000000 --- a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php +++ /dev/null @@ -1,320 +0,0 @@ - "PHPUnit My Category " . $i - ); - - $arrayCategory = self::$category->create($arrayData); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertTrue(isset($arrayCategory["CAT_UID"])); - - $arrayRecord[] = $arrayCategory; - } - - //Create - Japanese characters - $arrayData = array( - "CAT_NAME" => "テスト(PHPUnitã®ï¼‰", - ); - - $arrayCategory = self::$category->create($arrayData); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertTrue(isset($arrayCategory["CAT_UID"])); - - $arrayRecord[] = $arrayCategory; - - //Return - return $arrayRecord; - } - - /** - * Test update categories - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::update - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - */ - public function testUpdate(array $arrayRecord) - { - $arrayData = array("CAT_NAME" => "PHPUnit My Category 1..."); - - $arrayCategory = self::$category->update($arrayRecord[1]["CAT_UID"], $arrayData); - - $arrayCategory = self::$category->getCategory($arrayRecord[1]["CAT_UID"]); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertEquals($arrayCategory["CAT_NAME"], $arrayData["CAT_NAME"]); - } - - /** - * Test get categories - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::getCategories - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - */ - public function testGetCategories(array $arrayRecord) - { - $arrayCategory = self::$category->getCategories(); - - $this->assertNotEmpty($arrayCategory); - - $arrayCategory = self::$category->getCategories(null, null, null, 0, 0); - - $this->assertEmpty($arrayCategory); - - $arrayCategory = self::$category->getCategories(array("filter" => "PHPUnit")); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertEquals($arrayCategory[0]["CAT_UID"], $arrayRecord[0]["CAT_UID"]); - $this->assertEquals($arrayCategory[0]["CAT_NAME"], $arrayRecord[0]["CAT_NAME"]); - } - - /** - * Test get category - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::getCategory - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - */ - public function testGetCategory(array $arrayRecord) - { - //Get - $arrayCategory = self::$category->getCategory($arrayRecord[0]["CAT_UID"]); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertEquals($arrayCategory["CAT_UID"], $arrayRecord[0]["CAT_UID"]); - $this->assertEquals($arrayCategory["CAT_NAME"], $arrayRecord[0]["CAT_NAME"]); - - //Get - Japanese characters - $arrayCategory = self::$category->getCategory($arrayRecord[self::$numCategory]["CAT_UID"]); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertNotEmpty($arrayCategory); - - $this->assertEquals($arrayCategory["CAT_UID"], $arrayRecord[self::$numCategory]["CAT_UID"]); - $this->assertEquals($arrayCategory["CAT_NAME"], "テスト(PHPUnitã®ï¼‰"); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testCreateExceptionEmptyData() - { - $arrayData = array(); - - $arrayCategory = self::$category->create($arrayData); - } - - /** - * Test exception for required data (CAT_NAME) - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::create - * - * @expectedException Exception - * @expectedExceptionMessage Undefined value for "CAT_NAME", it is required. - */ - public function testCreateExceptionRequiredDataCatName() - { - $arrayData = array( - "CAT_NAMEX" => "PHPUnit My Category N" - ); - - $arrayCategory = self::$category->create($arrayData); - } - - /** - * Test exception for invalid data (CAT_NAME) - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAT_NAME", it can not be empty. - */ - public function testCreateExceptionInvalidDataCatName() - { - $arrayData = array( - "CAT_NAME" => "" - ); - - $arrayCategory = self::$category->create($arrayData); - } - - /** - * Test exception for category name existing - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::create - * - * @expectedException Exception - * @expectedExceptionMessage The category name with CAT_NAME: "PHPUnit My Category 0" already exists. - */ - public function testCreateExceptionExistsCatName() - { - $arrayData = array( - "CAT_NAME" => "PHPUnit My Category 0" - ); - - $arrayCategory = self::$category->create($arrayData); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::update - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testUpdateExceptionEmptyData() - { - $arrayData = array(); - - $arrayCategory = self::$category->update("", $arrayData); - } - - /** - * Test exception for invalid category UID - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::update - * - * @expectedException Exception - * @expectedExceptionMessage The category with CAT_UID: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' does not exist. - */ - public function testUpdateExceptionInvalidCatUid() - { - $arrayData = array( - "CAT_NAME" => "PHPUnit My Category N" - ); - - $arrayCategory = self::$category->update("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $arrayData); - } - - /** - * Test exception for invalid data (CAT_NAME) - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::update - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "CAT_NAME", it can not be empty. - */ - public function testUpdateExceptionInvalidDataCatName(array $arrayRecord) - { - $arrayData = array( - "CAT_NAME" => "" - ); - - $arrayCategory = self::$category->update($arrayRecord[0]["CAT_UID"], $arrayData); - } - - /** - * Test exception for category name existing - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::update - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - * - * @expectedException Exception - * @expectedExceptionMessage The category name with CAT_NAME: "PHPUnit My Category 0" already exists. - */ - public function testUpdateExceptionExistsCatName(array $arrayRecord) - { - $arrayData = $arrayRecord[0]; - - $arrayCategory = self::$category->update($arrayRecord[1]["CAT_UID"], $arrayData); - } - - /** - * Test delete categories - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::delete - * - * @depends testCreate - * @param array $arrayRecord Data of the categories - */ - public function testDelete(array $arrayRecord) - { - foreach ($arrayRecord as $value) { - self::$category->delete($value["CAT_UID"]); - } - - $arrayCategory = self::$category->getCategories(array("filter" => "PHPUnit")); - - $this->assertTrue(is_array($arrayCategory)); - $this->assertEmpty($arrayCategory); - } - - /** - * Test exception for invalid category UID - * - * @covers \ProcessMaker\BusinessModel\ProcessCategory::delete - * - * @expectedException Exception - * @expectedExceptionMessage The category with CAT_UID: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' does not exist. - */ - public function testDeleteExceptionInvalidCatUid() - { - self::$category->delete("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/Role/PermissionTest.php b/workflow/engine/src/Tests/BusinessModel/Role/PermissionTest.php deleted file mode 100644 index ea8af1ad8..000000000 --- a/workflow/engine/src/Tests/BusinessModel/Role/PermissionTest.php +++ /dev/null @@ -1,208 +0,0 @@ - "PHPUNIT_MY_ROLE_0", - "ROL_NAME" => "PHPUnit My Role 0" - ); - - $arrayRole = self::$role->create($arrayData); - - self::$roleUid = $arrayRole["ROL_UID"]; - - //Role and Permission - self::$rolePermission = new \ProcessMaker\BusinessModel\Role\Permission(); - } - - /** - * Delete - * - * @coversNothing - */ - public static function tearDownAfterClass() - { - self::$role->delete(self::$roleUid); - } - - /** - * Test assign permissions to role - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::create - * - * @return array - */ - public function testCreate() - { - $arrayRecord = array(); - - //Permission - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "AVAILABLE-PERMISSIONS", array("filter" => "V")); - - $this->assertNotEmpty($arrayPermission); - - //Role and Permission - Create - foreach ($arrayPermission as $value) { - $perUid = $value["PER_UID"]; - - $arrayRolePermission = self::$rolePermission->create(self::$roleUid, array("PER_UID" => $perUid)); - - $this->assertTrue(is_array($arrayRolePermission)); - $this->assertNotEmpty($arrayRolePermission); - - $this->assertTrue(isset($arrayRolePermission["ROL_UID"])); - - $arrayRecord[] = $arrayRolePermission; - } - - //Return - return $arrayRecord; - } - - /** - * Test get assigned permissions to role - * Test get available permissions to assign to role - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::getPermissions - * - * @depends testCreate - * @param array $arrayRecord Data of the role-permission - */ - public function testGetPermissions(array $arrayRecord) - { - //PERMISSIONS - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "PERMISSIONS"); - - $this->assertNotEmpty($arrayPermission); - - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "PERMISSIONS", null, null, null, 0, 0); - - $this->assertEmpty($arrayPermission); - - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "PERMISSIONS", array("filter" => "V")); - - $this->assertTrue(is_array($arrayPermission)); - $this->assertNotEmpty($arrayPermission); - - $this->assertEquals($arrayPermission[0]["PER_UID"], $arrayRecord[0]["PER_UID"]); - - //AVAILABLE-PERMISSIONS - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "AVAILABLE-PERMISSIONS", null, null, null, 0, 0); - - $this->assertEmpty($arrayPermission); - - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "AVAILABLE-PERMISSIONS", array("filter" => "V")); - - $this->assertEmpty($arrayPermission); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testCreateExceptionEmptyData() - { - $arrayData = array(); - - $arrayRolePermission = self::$rolePermission->create(self::$roleUid, $arrayData); - } - - /** - * Test exception for invalid role UID - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::create - * - * @expectedException Exception - * @expectedExceptionMessage The role with ROL_UID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist. - */ - public function testCreateExceptionInvalidRolUid() - { - $arrayData = array( - "USR_UID" => "", - ); - - $arrayRolePermission = self::$rolePermission->create("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $arrayData); - } - - /** - * Test exception for invalid data (PER_UID) - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "PER_UID", it can not be empty. - */ - public function testCreateExceptionInvalidDataPerUid() - { - $arrayData = array( - "PER_UID" => "", - ); - - $arrayRolePermission = self::$rolePermission->create(self::$roleUid, $arrayData); - } - - /** - * Test unassign permissions of the role - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::delete - * - * @depends testCreate - * @param array $arrayRecord Data of the role-permission - */ - public function testDelete(array $arrayRecord) - { - foreach ($arrayRecord as $value) { - $perUid = $value["PER_UID"]; - - self::$rolePermission->delete(self::$roleUid, $perUid); - } - - $arrayPermission = self::$rolePermission->getPermissions(self::$roleUid, "PERMISSIONS", array("filter" => "V")); - - $this->assertTrue(is_array($arrayPermission)); - $this->assertEmpty($arrayPermission); - } - - /** - * Test exception for invalid permission UID - * - * @covers \ProcessMaker\BusinessModel\Role\Permission::delete - * - * @expectedException Exception - * @expectedExceptionMessage The permission with PER_UID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist. - */ - public function testDeleteExceptionInvalidPerUid() - { - self::$rolePermission->delete(self::$roleUid, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/Role/UserTest.php b/workflow/engine/src/Tests/BusinessModel/Role/UserTest.php deleted file mode 100644 index e77244401..000000000 --- a/workflow/engine/src/Tests/BusinessModel/Role/UserTest.php +++ /dev/null @@ -1,225 +0,0 @@ -delete($usrUid); - } - } - - /** - * Test assign users to role - * - * @covers \ProcessMaker\BusinessModel\Role\User::create - * - * @return array - */ - public function testCreate() - { - $arrayRecord = array(); - - //User - $arrayAux = explode("-", date("Y-m-d")); - $dueDate = date("Y-m-d", mktime(0, 0, 0, $arrayAux[1], $arrayAux[2] + 5, $arrayAux[0])); - - for ($i = 0; $i <= self::$numUser - 1; $i++) { - $arrayData = array( - "USR_USERNAME" => "userphpunit" . $i, - "USR_FIRSTNAME" => "userphpunit" . $i, - "USR_LASTNAME" => "userphpunit" . $i, - "USR_EMAIL" => "userphpunit@email.com" . $i, - "USR_COUNTRY" => "", - "USR_ADDRESS" => "", - "USR_PHONE" => "", - "USR_ZIP_CODE" => "", - "USR_POSITION" => "", - "USR_REPLACED_BY" => "", - "USR_DUE_DATE" => $dueDate, - "USR_ROLE" => "PROCESSMAKER_OPERATOR", - "USR_STATUS" => "ACTIVE", - "USR_NEW_PASS" => "userphpunit" . $i, - "USR_CNF_PASS" => "userphpunit" . $i - ); - - $arrayUser = array_change_key_case(self::$user->create($arrayData), CASE_UPPER); - - self::$arrayUsrUid[] = $arrayUser["USR_UID"]; - $arrayRecord[] = $arrayUser; - } - - //Role and User - Create - foreach ($arrayRecord as $value) { - $usrUid = $value["USR_UID"]; - - $arrayRoleUser = self::$roleUser->create(self::$roleUid, array("USR_UID" => $usrUid)); - - $this->assertTrue(is_array($arrayRoleUser)); - $this->assertNotEmpty($arrayRoleUser); - - $this->assertTrue(isset($arrayRoleUser["ROL_UID"])); - } - - //Return - return $arrayRecord; - } - - /** - * Test get assigned users to role - * Test get available users to assign to role - * - * @covers \ProcessMaker\BusinessModel\Role\User::getUsers - * - * @depends testCreate - * @param array $arrayRecord Data of the users - */ - public function testGetUsers(array $arrayRecord) - { - //USERS - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "USERS"); - - $this->assertNotEmpty($arrayUser); - - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "USERS", null, null, null, 0, 0); - - $this->assertEmpty($arrayUser); - - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "USERS", array("filter" => "userphpunit")); - - $this->assertTrue(is_array($arrayUser)); - $this->assertNotEmpty($arrayUser); - - $this->assertEquals($arrayUser[0]["USR_UID"], $arrayRecord[0]["USR_UID"]); - $this->assertEquals($arrayUser[0]["USR_USERNAME"], $arrayRecord[0]["USR_USERNAME"]); - - //AVAILABLE-USERS - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "AVAILABLE-USERS", null, null, null, 0, 0); - - $this->assertEmpty($arrayUser); - - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "AVAILABLE-USERS", array("filter" => "userphpunit")); - - $this->assertEmpty($arrayUser); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Role\User::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testCreateExceptionEmptyData() - { - $arrayData = array(); - - $arrayRoleUser = self::$roleUser->create(self::$roleUid, $arrayData); - } - - /** - * Test exception for invalid role UID - * - * @covers \ProcessMaker\BusinessModel\Role\User::create - * - * @expectedException Exception - * @expectedExceptionMessage The role with ROL_UID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist. - */ - public function testCreateExceptionInvalidRolUid() - { - $arrayData = array( - "USR_UID" => "", - ); - - $arrayRoleUser = self::$roleUser->create("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $arrayData); - } - - /** - * Test exception for invalid data (USR_UID) - * - * @covers \ProcessMaker\BusinessModel\Role\User::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "USR_UID", it can not be empty. - */ - public function testCreateExceptionInvalidDataUsrUid() - { - $arrayData = array( - "USR_UID" => "", - ); - - $arrayRoleUser = self::$roleUser->create(self::$roleUid, $arrayData); - } - - /** - * Test unassign users of the role - * - * @covers \ProcessMaker\BusinessModel\Role\User::delete - * - * @depends testCreate - * @param array $arrayRecord Data of the users - */ - public function testDelete(array $arrayRecord) - { - foreach ($arrayRecord as $value) { - $usrUid = $value["USR_UID"]; - - self::$roleUser->delete(self::$roleUid, $usrUid); - } - - $arrayUser = self::$roleUser->getUsers(self::$roleUid, "USERS", array("filter" => "userphpunit")); - - $this->assertTrue(is_array($arrayUser)); - $this->assertEmpty($arrayUser); - } - - /** - * Test exception for administrator's role can't be changed - * - * @covers \ProcessMaker\BusinessModel\Role\User::delete - * - * @expectedException Exception - * @expectedExceptionMessage The administrator's role can't be changed! - */ - public function testDeleteExceptionAdminRoleCantChanged() - { - self::$roleUser->delete(self::$roleUid, "00000000000000000000000000000001"); - } -} - diff --git a/workflow/engine/src/Tests/BusinessModel/RoleTest.php b/workflow/engine/src/Tests/BusinessModel/RoleTest.php deleted file mode 100644 index db05690c9..000000000 --- a/workflow/engine/src/Tests/BusinessModel/RoleTest.php +++ /dev/null @@ -1,330 +0,0 @@ - "PHPUNIT_MY_ROLE_" . $i, - "ROL_NAME" => "PHPUnit My Role " . $i - ); - - $arrayRole = self::$role->create($arrayData); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertTrue(isset($arrayRole["ROL_UID"])); - - $arrayRecord[] = $arrayRole; - } - - //Create - Japanese characters - $arrayData = array( - "ROL_CODE" => "PHPUNIT_MY_ROLE_" . self::$numRole, - "ROL_NAME" => "テスト(PHPUnitã®ï¼‰", - ); - - $arrayRole = self::$role->create($arrayData); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertTrue(isset($arrayRole["ROL_UID"])); - - $arrayRecord[] = $arrayRole; - - //Return - return $arrayRecord; - } - - /** - * Test update roles - * - * @covers \ProcessMaker\BusinessModel\Role::update - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - */ - public function testUpdate(array $arrayRecord) - { - $arrayData = array("ROL_NAME" => "PHPUnit My Role ..."); - - $arrayRole = self::$role->update($arrayRecord[1]["ROL_UID"], $arrayData); - - $arrayRole = self::$role->getRole($arrayRecord[1]["ROL_UID"]); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertEquals($arrayRole["ROL_NAME"], $arrayData["ROL_NAME"]); - } - - /** - * Test get roles - * - * @covers \ProcessMaker\BusinessModel\Role::getRoles - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - */ - public function testGetRoles(array $arrayRecord) - { - $arrayRole = self::$role->getRoles(); - - $this->assertNotEmpty($arrayRole); - - $arrayRole = self::$role->getRoles(null, null, null, 0, 0); - - $this->assertEmpty($arrayRole); - - $arrayRole = self::$role->getRoles(array("filter" => "PHPUNIT")); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertEquals($arrayRole[0]["ROL_UID"], $arrayRecord[0]["ROL_UID"]); - $this->assertEquals($arrayRole[0]["ROL_CODE"], $arrayRecord[0]["ROL_CODE"]); - $this->assertEquals($arrayRole[0]["ROL_NAME"], $arrayRecord[0]["ROL_NAME"]); - } - - /** - * Test get role - * - * @covers \ProcessMaker\BusinessModel\Role::getRole - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - */ - public function testGetRole(array $arrayRecord) - { - //Get - $arrayRole = self::$role->getRole($arrayRecord[0]["ROL_UID"]); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertEquals($arrayRole["ROL_UID"], $arrayRecord[0]["ROL_UID"]); - $this->assertEquals($arrayRole["ROL_CODE"], $arrayRecord[0]["ROL_CODE"]); - $this->assertEquals($arrayRole["ROL_NAME"], $arrayRecord[0]["ROL_NAME"]); - - //Get - Japanese characters - $arrayRole = self::$role->getRole($arrayRecord[self::$numRole]["ROL_UID"]); - - $this->assertTrue(is_array($arrayRole)); - $this->assertNotEmpty($arrayRole); - - $this->assertEquals($arrayRole["ROL_UID"], $arrayRecord[self::$numRole]["ROL_UID"]); - $this->assertEquals($arrayRole["ROL_CODE"], "PHPUNIT_MY_ROLE_" . self::$numRole); - $this->assertEquals($arrayRole["ROL_NAME"], "テスト(PHPUnitã®ï¼‰"); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Role::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testCreateExceptionEmptyData() - { - $arrayData = array(); - - $arrayRole = self::$role->create($arrayData); - } - - /** - * Test exception for required data (ROL_CODE) - * - * @covers \ProcessMaker\BusinessModel\Role::create - * - * @expectedException Exception - * @expectedExceptionMessage Undefined value for "ROL_CODE", it is required. - */ - public function testCreateExceptionRequiredDataRolCode() - { - $arrayData = array( - //"ROL_CODE" => "PHPUNIT_MY_ROLE_N", - "ROL_NAME" => "PHPUnit My Role N" - ); - - $arrayRole = self::$role->create($arrayData); - } - - /** - * Test exception for invalid data (ROL_CODE) - * - * @covers \ProcessMaker\BusinessModel\Role::create - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "ROL_CODE", it can not be empty. - */ - public function testCreateExceptionInvalidDataRolCode() - { - $arrayData = array( - "ROL_CODE" => "", - "ROL_NAME" => "PHPUnit My Role N" - ); - - $arrayRole = self::$role->create($arrayData); - } - - /** - * Test exception for role code existing - * - * @covers \ProcessMaker\BusinessModel\Role::create - * - * @expectedException Exception - * @expectedExceptionMessage The role code with ROL_CODE: "PHPUNIT_MY_ROLE_0" already exists. - */ - public function testCreateExceptionExistsRolCode() - { - $arrayData = array( - "ROL_CODE" => "PHPUNIT_MY_ROLE_0", - "ROL_NAME" => "PHPUnit My Role 0" - ); - - $arrayRole = self::$role->create($arrayData); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\BusinessModel\Role::update - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testUpdateExceptionEmptyData() - { - $arrayData = array(); - - $arrayRole = self::$role->update("", $arrayData); - } - - /** - * Test exception for invalid role UID - * - * @covers \ProcessMaker\BusinessModel\Role::update - * - * @expectedException Exception - * @expectedExceptionMessage The role with ROL_UID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx does not exist. - */ - public function testUpdateExceptionInvalidRolUid() - { - $arrayData = array( - "ROL_CODE" => "PHPUNIT_MY_ROLE_N", - "ROL_NAME" => "PHPUnit My Role N" - ); - - $arrayRole = self::$role->update("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $arrayData); - } - - /** - * Test exception for invalid data (ROL_CODE) - * - * @covers \ProcessMaker\BusinessModel\Role::update - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "ROL_CODE", it can not be empty. - */ - public function testUpdateExceptionInvalidDataRolCode(array $arrayRecord) - { - $arrayData = array( - "ROL_CODE" => "", - "ROL_NAME" => "PHPUnit My Role 0" - ); - - $arrayRole = self::$role->update($arrayRecord[0]["ROL_UID"], $arrayData); - } - - /** - * Test exception for role code existing - * - * @covers \ProcessMaker\BusinessModel\Role::update - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - * - * @expectedException Exception - * @expectedExceptionMessage The role code with ROL_CODE: "PHPUNIT_MY_ROLE_1" already exists. - */ - public function testUpdateExceptionExistsRolCode(array $arrayRecord) - { - $arrayData = $arrayRecord[1]; - - $arrayRole = self::$role->update($arrayRecord[0]["ROL_UID"], $arrayData); - } - - /** - * Test delete roles - * - * @covers \ProcessMaker\BusinessModel\Role::delete - * - * @depends testCreate - * @param array $arrayRecord Data of the roles - */ - public function testDelete(array $arrayRecord) - { - foreach ($arrayRecord as $value) { - self::$role->delete($value["ROL_UID"]); - } - - $arrayRole = self::$role->getRoles(array("filter" => "PHPUNIT")); - - $this->assertTrue(is_array($arrayRole)); - $this->assertEmpty($arrayRole); - } - - /** - * Test exception for role UID that cannot be deleted - * - * @covers \ProcessMaker\BusinessModel\Role::delete - * - * @expectedException Exception - * @expectedExceptionMessage This role cannot be deleted while it still has some assigned users. - */ - public function testDeleteExceptionCannotDeleted() - { - self::$role->delete("00000000000000000000000000000002"); - } -} - diff --git a/workflow/engine/src/Tests/Model/BpmnActivityTest.php b/workflow/engine/src/Tests/Model/BpmnActivityTest.php deleted file mode 100644 index 220fbc1ca..000000000 --- a/workflow/engine/src/Tests/Model/BpmnActivityTest.php +++ /dev/null @@ -1,315 +0,0 @@ - - */ -class BpmnActivityTest extends PHPUnit_Framework_TestCase -{ - protected static $prjUid = "00000000000000000000000000000001"; - protected static $diaUid = "18171550f1198ddc8642045664020352"; - protected static $proUid = "155064020352f1198ddc864204561817"; - - protected static $data1; - protected static $data2; - - public static function setUpBeforeClass() - { - $project = new \BpmnProject(); - $project->setPrjUid(self::$prjUid); - $project->setPrjName("Dummy Project"); - $project->save(); - - $process = new \BpmnDiagram(); - $process->setDiaUid(self::$diaUid); - $process->setPrjUid(self::$prjUid); - $process->save(); - - $process = new \BpmnProcess(); - $process->setProUid(self::$proUid); - $process->setPrjUid(self::$prjUid); - $process->setDiaUid(self::$diaUid); - $process->save(); - - self::$data1 = array( - "ACT_UID" => "864215906402045618170352f1198ddc", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "ACT_NAME" => "Activity #1", - "BOU_X" => "51", - "BOU_Y" => "52" - ); - - self::$data2 = array( - "ACT_UID" => "70352f1198ddc8642159064020456181", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "ACT_NAME" => "Activity #2", - "BOU_X" => "53", - "BOU_Y" => "54" - ); - } - - public static function tearDownAfterClass() - { - $activities = BpmnActivity::findAllBy(BpmnActivityPeer::PRJ_UID, self::$prjUid); - foreach ($activities as $activity) { - $activity->delete(); - } - - $bounds = BpmnBound::findAllBy(BpmnBoundPeer::PRJ_UID, self::$prjUid); - foreach ($bounds as $bound) { - $bound->delete(); - } - - $process = BpmnProcessPeer::retrieveByPK(self::$proUid); - $process->delete(); - - $diagram = BpmnDiagramPeer::retrieveByPK(self::$diaUid); - $diagram->delete(); - - $project = BpmnProjectPeer::retrieveByPK(self::$prjUid); - $project->delete(); - } - - public function testNew() - { - $activity = new BpmnActivity(); - $activity->setActUid(self::$data1["ACT_UID"]); - $activity->setPrjUid(self::$data1["PRJ_UID"]); - $activity->setProUid(self::$data1["PRO_UID"]); - $activity->setActName(self::$data1["ACT_NAME"]); - $activity->getBound()->setBouX(self::$data1["BOU_X"]); - $activity->getBound()->setBouY(self::$data1["BOU_Y"]); - $activity->save(); - - $activity2 = BpmnActivityPeer::retrieveByPK($activity->getActUid()); - - $this->assertNotNull($activity2); - - return $activity; - } - - public function testNewUsingFromArray() - { - $activity = new BpmnActivity(); - $activity->fromArray(self::$data2); - - $activity->save(); - - $activity2 = BpmnActivityPeer::retrieveByPK($activity->getActUid()); - - $this->assertNotNull($activity2); - - return $activity; - } - - /** - * @depends testNew - * @param $activity \BpmnActivity - */ - public function testToArrayFromTestNew($activity) - { - $expected = array( - "ACT_UID" => self::$data1["ACT_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "ACT_NAME" => self::$data1["ACT_NAME"], - "ACT_TYPE" => "TASK", - "ACT_IS_FOR_COMPENSATION" => "0", - "ACT_START_QUANTITY" => "1", - "ACT_COMPLETION_QUANTITY" => "1", - "ACT_TASK_TYPE" => "EMPTY", - "ACT_IMPLEMENTATION" => "", - "ACT_INSTANTIATE" => "0", - "ACT_SCRIPT_TYPE" => "", - "ACT_SCRIPT" => "", - "ACT_LOOP_TYPE" => "NONE", - "ACT_TEST_BEFORE" => "0", - "ACT_LOOP_MAXIMUM" => "0", - "ACT_LOOP_CONDITION" => "", - "ACT_LOOP_CARDINALITY" => "0", - "ACT_LOOP_BEHAVIOR" => "NONE", - "ACT_IS_ADHOC" => "0", - "ACT_IS_COLLAPSED" => "1", - "ACT_COMPLETION_CONDITION" => "", - "ACT_ORDERING" => "PARALLEL", - "ACT_CANCEL_REMAINING_INSTANCES" => "1", - "ACT_PROTOCOL" => "", - "ACT_METHOD" => "", - "ACT_IS_GLOBAL" => "0", - "ACT_REFERER" => "", - "ACT_DEFAULT_FLOW" => "", - "ACT_MASTER_DIAGRAM" => "", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data1["ACT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnActivity", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => "0", - "BOU_HEIGHT" => "0", - "BOU_REL_POSITION" => "0", - "BOU_SIZE_IDENTICAL" => "0", - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $activity->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNewUsingFromArray - */ - public function testToArrayFromTestNewUsingFromArray($activity) - { - $expected = array( - "ACT_UID" => self::$data2["ACT_UID"], - "PRJ_UID" => self::$data2["PRJ_UID"], - "PRO_UID" => self::$data2["PRO_UID"], - "ACT_NAME" => self::$data2["ACT_NAME"], - "ACT_TYPE" => "TASK", - "ACT_IS_FOR_COMPENSATION" => "0", - "ACT_START_QUANTITY" => "1", - "ACT_COMPLETION_QUANTITY" => "1", - "ACT_TASK_TYPE" => "EMPTY", - "ACT_IMPLEMENTATION" => "", - "ACT_INSTANTIATE" => "0", - "ACT_SCRIPT_TYPE" => "", - "ACT_SCRIPT" => "", - "ACT_LOOP_TYPE" => "NONE", - "ACT_TEST_BEFORE" => "0", - "ACT_LOOP_MAXIMUM" => "0", - "ACT_LOOP_CONDITION" => "", - "ACT_LOOP_CARDINALITY" => "0", - "ACT_LOOP_BEHAVIOR" => "NONE", - "ACT_IS_ADHOC" => "0", - "ACT_IS_COLLAPSED" => "1", - "ACT_COMPLETION_CONDITION" => "", - "ACT_ORDERING" => "PARALLEL", - "ACT_CANCEL_REMAINING_INSTANCES" => "1", - "ACT_PROTOCOL" => "", - "ACT_METHOD" => "", - "ACT_IS_GLOBAL" => "0", - "ACT_REFERER" => "", - "ACT_DEFAULT_FLOW" => "", - "ACT_MASTER_DIAGRAM" => "", - "DIA_UID" => "18171550f1198ddc8642045664020352", - "ELEMENT_UID" => self::$data2["ACT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnActivity", - "BOU_X" => self::$data2["BOU_X"], - "BOU_Y" => self::$data2["BOU_Y"], - "BOU_WIDTH" => "0", - "BOU_HEIGHT" => "0", - "BOU_REL_POSITION" => "0", - "BOU_SIZE_IDENTICAL" => "0", - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $activity->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - public function testToArray() - { - $activity = BpmnActivityPeer::retrieveByPK(self::$data1["ACT_UID"]); - - $expected = array( - "ACT_UID" => self::$data1["ACT_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "ACT_NAME" => self::$data1["ACT_NAME"], - "ACT_TYPE" => "TASK", - "ACT_IS_FOR_COMPENSATION" => "0", - "ACT_START_QUANTITY" => "1", - "ACT_COMPLETION_QUANTITY" => "1", - "ACT_TASK_TYPE" => "EMPTY", - "ACT_IMPLEMENTATION" => "", - "ACT_INSTANTIATE" => "0", - "ACT_SCRIPT_TYPE" => "", - "ACT_SCRIPT" => "", - "ACT_LOOP_TYPE" => "NONE", - "ACT_TEST_BEFORE" => "0", - "ACT_LOOP_MAXIMUM" => "0", - "ACT_LOOP_CONDITION" => "", - "ACT_LOOP_CARDINALITY" => "0", - "ACT_LOOP_BEHAVIOR" => "NONE", - "ACT_IS_ADHOC" => "0", - "ACT_IS_COLLAPSED" => "1", - "ACT_COMPLETION_CONDITION" => "", - "ACT_ORDERING" => "PARALLEL", - "ACT_CANCEL_REMAINING_INSTANCES" => "1", - "ACT_PROTOCOL" => "", - "ACT_METHOD" => "", - "ACT_IS_GLOBAL" => "0", - "ACT_REFERER" => "", - "ACT_DEFAULT_FLOW" => "", - "ACT_MASTER_DIAGRAM" => "", - "DIA_UID" => "18171550f1198ddc8642045664020352", - "ELEMENT_UID" => self::$data1["ACT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnActivity", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => "0", - "BOU_HEIGHT" => "0", - "BOU_REL_POSITION" => "0", - "BOU_SIZE_IDENTICAL" => "0", - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $activity->toArray(); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNew - * @depends testNewUsingFromArray - * @param $activity1 \BpmnActivity - * @param $activity2 \BpmnActivity - */ - public function testDelete($activity1, $activity2) - { - $actUid = $activity1->getActUid(); - $activity = BpmnActivityPeer::retrieveByPK($actUid); - $activity->delete(); - - $this->assertNull(BpmnActivityPeer::retrieveByPK($actUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Activity", $actUid)); - - - $actUid = $activity2->getActUid(); - $activity = BpmnActivityPeer::retrieveByPK($actUid); - $activity->delete(); - - $this->assertNull(BpmnActivityPeer::retrieveByPK($actUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Activity", $actUid)); - } - -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/Model/BpmnEventTest.php b/workflow/engine/src/Tests/Model/BpmnEventTest.php deleted file mode 100644 index 8185aceaa..000000000 --- a/workflow/engine/src/Tests/Model/BpmnEventTest.php +++ /dev/null @@ -1,297 +0,0 @@ - - */ -class BpmnEventTest extends PHPUnit_Framework_TestCase -{ - protected static $prjUid = "00000000000000000000000000000001"; - protected static $diaUid = "18171550f1198ddc8642045664020352"; - protected static $proUid = "155064020352f1198ddc864204561817"; - - protected static $data1; - protected static $data2; - - public static function setUpBeforeClass() - { - $project = new \BpmnProject(); - $project->setPrjUid(self::$prjUid); - $project->setPrjName("Dummy Project"); - $project->save(); - - $process = new \BpmnDiagram(); - $process->setDiaUid(self::$diaUid); - $process->setPrjUid(self::$prjUid); - $process->save(); - - $process = new \BpmnProcess(); - $process->setProUid(self::$proUid); - $process->setPrjUid(self::$prjUid); - $process->setDiaUid(self::$diaUid); - $process->save(); - - self::$data1 = array( - "EVN_UID" => "864215906402045618170352f1198ddc", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "EVN_NAME" => "Event #1", - "EVN_TYPE" => "START", - "BOU_X" => 51, - "BOU_Y" => 52 - ); - - self::$data2 = array( - "EVN_UID" => "70352f1198ddc8642159064020456181", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "EVN_NAME" => "Event #2", - "EVN_TYPE" => "END", - "BOU_X" => 53, - "BOU_Y" => 54 - ); - } - - public static function tearDownAfterClass() - { - $events = BpmnEvent::findAllBy(BpmnEventPeer::PRJ_UID, self::$prjUid); - foreach ($events as $event) { - $event->delete(); - } - - $bounds = BpmnBound::findAllBy(BpmnBoundPeer::PRJ_UID, self::$prjUid); - foreach ($bounds as $bound) { - $bound->delete(); - } - - $process = BpmnProcessPeer::retrieveByPK(self::$proUid); - $process->delete(); - - $diagram = BpmnDiagramPeer::retrieveByPK(self::$diaUid); - $diagram->delete(); - - $project = BpmnProjectPeer::retrieveByPK(self::$prjUid); - $project->delete(); - } - - public function testNew() - { - $event = new BpmnEvent(); - $event->setEvnUid(self::$data1["EVN_UID"]); - $event->setPrjUid(self::$data1["PRJ_UID"]); - $event->setProUid(self::$data1["PRO_UID"]); - $event->setEvnName(self::$data1["EVN_NAME"]); - $event->setEvnType(self::$data1["EVN_TYPE"]); - $event->getBound()->setBouX(self::$data1["BOU_X"]); - $event->getBound()->setBouY(self::$data1["BOU_Y"]); - $event->save(); - - $event2 = BpmnEventPeer::retrieveByPK($event->getEvnUid()); - - $this->assertNotNull($event2); - - return $event; - } - - public function testNewUsingFromArray() - { - $event = new BpmnEvent(); - $event->fromArray(self::$data2); - $event->save(); - - $event2 = BpmnEventPeer::retrieveByPK($event->getEvnUid()); - - $this->assertNotNull($event2); - - return $event; - } - - /** - * @depends testNew - * @param $event \BpmnEvent - */ - public function testToArrayFromTestNew($event) - { - $expected = array( - "EVN_UID" => self::$data1["EVN_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "EVN_NAME" => self::$data1["EVN_NAME"], - "EVN_TYPE" => self::$data1["EVN_TYPE"], - "EVN_MARKER" => "EMPTY", - "EVN_IS_INTERRUPTING" => 1, - "EVN_ATTACHED_TO" => "", - "EVN_CANCEL_ACTIVITY" => 0, - "EVN_ACTIVITY_REF" => "", - "EVN_WAIT_FOR_COMPLETION" => 1, - "EVN_ERROR_NAME" => null, - "EVN_ERROR_CODE" => null, - "EVN_ESCALATION_NAME" => null, - "EVN_ESCALATION_CODE" => null, - "EVN_CONDITION" => null, - "EVN_MESSAGE" => null, - "EVN_OPERATION_NAME" => null, - "EVN_OPERATION_IMPLEMENTATION_REF" => null, - "EVN_TIME_DATE" => null, - "EVN_TIME_CYCLE" => null, - "EVN_TIME_DURATION" => null, - "EVN_BEHAVIOR" => "CATCH", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data1["EVN_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnEvent", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $event->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNewUsingFromArray - * @param $event \BpmnEvent - */ - public function testToArrayFromTestNewUsingFromArray($event) - { - $expected = array( - "EVN_UID" => self::$data2["EVN_UID"], - "PRJ_UID" => self::$data2["PRJ_UID"], - "PRO_UID" => self::$data2["PRO_UID"], - "EVN_NAME" => self::$data2["EVN_NAME"], - "EVN_TYPE" => self::$data2["EVN_TYPE"], - "EVN_MARKER" => "EMPTY", - "EVN_IS_INTERRUPTING" => 1, - "EVN_ATTACHED_TO" => "", - "EVN_CANCEL_ACTIVITY" => 0, - "EVN_ACTIVITY_REF" => "", - "EVN_WAIT_FOR_COMPLETION" => 1, - "EVN_ERROR_NAME" => null, - "EVN_ERROR_CODE" => null, - "EVN_ESCALATION_NAME" => null, - "EVN_ESCALATION_CODE" => null, - "EVN_CONDITION" => null, - "EVN_MESSAGE" => null, - "EVN_OPERATION_NAME" => null, - "EVN_OPERATION_IMPLEMENTATION_REF" => null, - "EVN_TIME_DATE" => null, - "EVN_TIME_CYCLE" => null, - "EVN_TIME_DURATION" => null, - "EVN_BEHAVIOR" => "CATCH", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data2["EVN_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnEvent", - "BOU_X" => self::$data2["BOU_X"], - "BOU_Y" => self::$data2["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $event->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - public function testToArray() - { - $event = BpmnEventPeer::retrieveByPK(self::$data1["EVN_UID"]); - - $expected = array( - "EVN_UID" => self::$data1["EVN_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "EVN_NAME" => self::$data1["EVN_NAME"], - "EVN_TYPE" => self::$data1["EVN_TYPE"], - "EVN_MARKER" => "EMPTY", - "EVN_IS_INTERRUPTING" => 1, - "EVN_ATTACHED_TO" => "", - "EVN_CANCEL_ACTIVITY" => 0, - "EVN_ACTIVITY_REF" => "", - "EVN_WAIT_FOR_COMPLETION" => 1, - "EVN_ERROR_NAME" => null, - "EVN_ERROR_CODE" => null, - "EVN_ESCALATION_NAME" => null, - "EVN_ESCALATION_CODE" => null, - "EVN_CONDITION" => null, - "EVN_MESSAGE" => null, - "EVN_OPERATION_NAME" => null, - "EVN_OPERATION_IMPLEMENTATION_REF" => null, - "EVN_TIME_DATE" => null, - "EVN_TIME_CYCLE" => null, - "EVN_TIME_DURATION" => null, - "EVN_BEHAVIOR" => "CATCH", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data1["EVN_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnEvent", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $event->toArray(); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNew - * @depends testNewUsingFromArray - * @param $event1 \BpmnEvent - * @param $event2 \BpmnEvent - */ - public function testDelete($event1, $event2) - { - $gatUid = $event1->getEvnUid(); - $event = BpmnEventPeer::retrieveByPK($gatUid); - $event->delete(); - - $this->assertNull(BpmnEventPeer::retrieveByPK($gatUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Event", $gatUid)); - - - $gatUid = $event2->getEvnUid(); - $event = BpmnEventPeer::retrieveByPK($gatUid); - $event->delete(); - - $this->assertNull(BpmnEventPeer::retrieveByPK($gatUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Event", $gatUid)); - } - -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/Model/BpmnGatewayTest.php b/workflow/engine/src/Tests/Model/BpmnGatewayTest.php deleted file mode 100644 index c3e0bb20a..000000000 --- a/workflow/engine/src/Tests/Model/BpmnGatewayTest.php +++ /dev/null @@ -1,262 +0,0 @@ - - */ -class BpmnGatewayTest extends PHPUnit_Framework_TestCase -{ - protected static $prjUid = "00000000000000000000000000000001"; - protected static $diaUid = "18171550f1198ddc8642045664020352"; - protected static $proUid = "155064020352f1198ddc864204561817"; - - protected static $data1; - protected static $data2; - - public static function setUpBeforeClass() - { - $project = new \BpmnProject(); - $project->setPrjUid(self::$prjUid); - $project->setPrjName("Dummy Project"); - $project->save(); - - $process = new \BpmnDiagram(); - $process->setDiaUid(self::$diaUid); - $process->setPrjUid(self::$prjUid); - $process->save(); - - $process = new \BpmnProcess(); - $process->setProUid(self::$proUid); - $process->setPrjUid(self::$prjUid); - $process->setDiaUid(self::$diaUid); - $process->save(); - - self::$data1 = array( - "GAT_UID" => "864215906402045618170352f1198ddc", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "GAT_NAME" => "Gateway #1", - "GAT_TYPE" => "SELECTION", - "BOU_X" => 51, - "BOU_Y" => 52 - ); - - self::$data2 = array( - "GAT_UID" => "70352f1198ddc8642159064020456181", - "PRJ_UID" => self::$prjUid, - "PRO_UID" => self::$proUid, - "GAT_NAME" => "Gateway #2", - "GAT_TYPE" => "EVALUATION", - "BOU_X" => 53, - "BOU_Y" => 54 - ); - } - - public static function tearDownAfterClass() - { - $gateways = BpmnGateway::findAllBy(BpmnGatewayPeer::PRJ_UID, self::$prjUid); - foreach ($gateways as $gateway) { - $gateway->delete(); - } - - $bounds = BpmnBound::findAllBy(BpmnBoundPeer::PRJ_UID, self::$prjUid); - foreach ($bounds as $bound) { - $bound->delete(); - } - - $process = BpmnProcessPeer::retrieveByPK(self::$proUid); - $process->delete(); - - $diagram = BpmnDiagramPeer::retrieveByPK(self::$diaUid); - $diagram->delete(); - - $project = BpmnProjectPeer::retrieveByPK(self::$prjUid); - $project->delete(); - } - - public function testNew() - { - $gateway = new BpmnGateway(); - $gateway->setGatUid(self::$data1["GAT_UID"]); - $gateway->setPrjUid(self::$data1["PRJ_UID"]); - $gateway->setProUid(self::$data1["PRO_UID"]); - $gateway->setGatName(self::$data1["GAT_NAME"]); - $gateway->setGatType(self::$data1["GAT_TYPE"]); - $gateway->getBound()->setBouX(self::$data1["BOU_X"]); - $gateway->getBound()->setBouY(self::$data1["BOU_Y"]); - $gateway->save(); - - $gateway2 = BpmnGatewayPeer::retrieveByPK($gateway->getGatUid()); - - $this->assertNotNull($gateway2); - - return $gateway; - } - - public function testNewUsingFromArray() - { - $gateway = new BpmnGateway(); - $gateway->fromArray(self::$data2); - $gateway->save(); - - $gateway2 = BpmnGatewayPeer::retrieveByPK($gateway->getGatUid()); - - $this->assertNotNull($gateway2); - - return $gateway; - } - - /** - * @depends testNew - * @param $gateway \BpmnGateway - */ - public function testToArrayFromTestNew($gateway) - { - $expected = array( - "GAT_UID" => self::$data1["GAT_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "GAT_NAME" => self::$data1["GAT_NAME"], - "GAT_TYPE" => self::$data1["GAT_TYPE"], - "GAT_DIRECTION" => "UNSPECIFIED", - "GAT_INSTANTIATE" => 0, - "GAT_EVENT_GATEWAY_TYPE" => 'NONE', - "GAT_ACTIVATION_COUNT" => 0, - "GAT_WAITING_FOR_START" => 1, - "GAT_DEFAULT_FLOW" => "", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data1["GAT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnGateway", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $gateway->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNewUsingFromArray - * @param $gateway \BpmnGateway - */ - public function testToArrayFromTestNewUsingFromArray($gateway) - { - $expected = array( - "GAT_UID" => self::$data2["GAT_UID"], - "PRJ_UID" => self::$data2["PRJ_UID"], - "PRO_UID" => self::$data2["PRO_UID"], - "GAT_NAME" => self::$data2["GAT_NAME"], - "GAT_TYPE" => self::$data2["GAT_TYPE"], - "GAT_DIRECTION" => "UNSPECIFIED", - "GAT_INSTANTIATE" => 0, - "GAT_EVENT_GATEWAY_TYPE" => 'NONE', - "GAT_ACTIVATION_COUNT" => 0, - "GAT_WAITING_FOR_START" => 1, - "GAT_DEFAULT_FLOW" => "", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data2["GAT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnGateway", - "BOU_X" => self::$data2["BOU_X"], - "BOU_Y" => self::$data2["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $gateway->toArray(); - $bouUid = $result["BOU_UID"]; - - $this->assertNotEmpty($bouUid); - $this->assertEquals(32, strlen($bouUid)); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - public function testToArray() - { - $gateway = BpmnGatewayPeer::retrieveByPK(self::$data1["GAT_UID"]); - - $expected = array( - "GAT_UID" => self::$data1["GAT_UID"], - "PRJ_UID" => self::$data1["PRJ_UID"], - "PRO_UID" => self::$data1["PRO_UID"], - "GAT_NAME" => self::$data1["GAT_NAME"], - "GAT_TYPE" => self::$data1["GAT_TYPE"], - "GAT_DIRECTION" => "UNSPECIFIED", - "GAT_INSTANTIATE" => 0, - "GAT_EVENT_GATEWAY_TYPE" => 'NONE', - "GAT_ACTIVATION_COUNT" => 0, - "GAT_WAITING_FOR_START" => 1, - "GAT_DEFAULT_FLOW" => "", - "DIA_UID" => self::$diaUid, - "ELEMENT_UID" => self::$data1["GAT_UID"], - "BOU_ELEMENT" => "pm_canvas", - "BOU_ELEMENT_TYPE" => "bpmnGateway", - "BOU_X" => self::$data1["BOU_X"], - "BOU_Y" => self::$data1["BOU_Y"], - "BOU_WIDTH" => 0, - "BOU_HEIGHT" => 0, - "BOU_REL_POSITION" => 0, - "BOU_SIZE_IDENTICAL" => 0, - "BOU_CONTAINER" => "bpmnDiagram" - ); - - $result = $gateway->toArray(); - - unset($result["BOU_UID"]); - - $this->assertEquals($expected, $result); - } - - /** - * @depends testNew - * @depends testNewUsingFromArray - * @param $gateway1 \BpmnGateway - * @param $gateway2 \BpmnGateway - */ - public function testDelete($gateway1, $gateway2) - { - $gatUid = $gateway1->getGatUid(); - $gateway = BpmnGatewayPeer::retrieveByPK($gatUid); - $gateway->delete(); - - $this->assertNull(BpmnGatewayPeer::retrieveByPK($gatUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Gateway", $gatUid)); - - - $gatUid = $gateway2->getGatUid(); - $gateway = BpmnGatewayPeer::retrieveByPK($gatUid); - $gateway->delete(); - - $this->assertNull(BpmnGatewayPeer::retrieveByPK($gatUid)); - // the previous call must delete the bound object related to activity too. - $this->assertNull(BpmnBound::findByElement("Gateway", $gatUid)); - } - -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/ProcessMaker/Exporter/XmlExporterTest.php b/workflow/engine/src/Tests/ProcessMaker/Exporter/XmlExporterTest.php deleted file mode 100644 index 0f05168de..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Exporter/XmlExporterTest.php +++ /dev/null @@ -1,166 +0,0 @@ - - */ -class XmlExporterTest extends \PHPUnit_Framework_TestCase -{ - protected static $exporter; - protected static $projectUid = ""; - protected static $filePmx = ""; - - /** - * Set class for test - * - * @coversNothing - */ - public static function setUpBeforeClass() - { - $json = " - { - \"prj_name\": \"" . \ProcessMaker\Util\Common::generateUID() . "\", - \"prj_author\": \"00000000000000000000000000000001\", - \"diagrams\": [ - { - \"dia_uid\": \"\", - \"activities\": [], - \"events\": [], - \"gateways\": [], - \"flows\": [], - \"artifacts\": [], - \"laneset\": [], - \"lanes\": [] - } - ] - } - "; - - $arrayResult = \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct(json_decode($json, true)); - - self::$projectUid = $arrayResult[0]["new_uid"]; - self::$filePmx = PATH_DOCUMENT . "output" . PATH_SEP . self::$projectUid . ".pmx"; - - self::$exporter = new \ProcessMaker\Exporter\XmlExporter(self::$projectUid); - } - - /** - * Delete project - * - * @coversNothing - */ - public static function tearDownAfterClass() - { - $bpmnWf = \ProcessMaker\Project\Adapter\BpmnWorkflow::load(self::$projectUid); - $bpmnWf->remove(); - - unlink(self::$filePmx); - } - - /** - * Test export - * - * @covers \ProcessMaker\Exporter\XmlExporter::export - * - * @return string - */ - public function testExport() - { - $strXml = self::$exporter->export(); - - $this->assertTrue(is_string($strXml)); - $this->assertNotEmpty($strXml); - - return $strXml; - } - - /** - * Test build - * - * @covers \ProcessMaker\Exporter\XmlExporter::build - * - * @depends testExport - * @param string $strXml Data xml - */ - public function testBuild($strXml) - { - //DOMDocument - $doc = new \DOMDocument(); - $doc->loadXML($strXml); - - $nodeRoot = $doc->getElementsByTagName("ProcessMaker-Project")->item(0); - $uid = ""; - - //Node meta - $nodeMeta = $nodeRoot->getElementsByTagName("metadata")->item(0)->getElementsByTagName("meta"); - - $this->assertNotEmpty($nodeMeta); - - foreach ($nodeMeta as $value) { - $node = $value; - - if ($node->hasAttribute("key") && $node->getAttribute("key") == "uid") { - $uid = $node->nodeValue; - break; - } - } - - $this->assertEquals(self::$projectUid, $uid); - - //Node definition - $nodeDefinition = $nodeRoot->getElementsByTagName("definition"); - - $this->assertNotEmpty($nodeDefinition); - - foreach ($nodeDefinition as $value) { - $node = $value; - - if ($node->hasAttribute("class")) { - $this->assertContains($node->getAttribute("class"), array("BPMN", "workflow")); - } - } - } - - /** - * Test saveExport - * - * @covers \ProcessMaker\Exporter\XmlExporter::saveExport - */ - public function testSaveExport() - { - self::$exporter->saveExport(self::$filePmx); - - $this->assertTrue(file_exists(self::$filePmx)); - } - - /** - * Test getTextNode - * - * @covers \ProcessMaker\Exporter\XmlExporter::getTextNode - */ - public function testGetTextNode() - { - //Is not implemented. Method getTextNode() is private - } - - /** - * Test exception for invalid project uid - * - * @covers \ProcessMaker\Exporter\XmlExporter::__construct - * - * @expectedException Exception - * @expectedExceptionMessage Project "ProcessMaker\Project\Bpmn" with UID: 0, does not exist. - */ - public function test__constructExceptionInvalidProjectUid() - { - $exporter = new \ProcessMaker\Exporter\XmlExporter("0"); - } -} - diff --git a/workflow/engine/src/Tests/ProcessMaker/Importer/XmlImporterTest.php b/workflow/engine/src/Tests/ProcessMaker/Importer/XmlImporterTest.php deleted file mode 100644 index 9b54a5a10..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Importer/XmlImporterTest.php +++ /dev/null @@ -1,216 +0,0 @@ -saveExport(self::$filePmx); - - $bpmnWf = \ProcessMaker\Project\Adapter\BpmnWorkflow::load(self::$projectUid); - $bpmnWf->remove(); - - self::$importer = new \ProcessMaker\Importer\XmlImporter(); - self::$importer->setSourceFile(self::$filePmx); - } - - /** - * Delete projects - * - * @coversNothing - */ - public static function tearDownAfterClass() - { - foreach (self::$arrayPrjUid as $value) { - $prjUid = $value; - - $bpmnWf = \ProcessMaker\Project\Adapter\BpmnWorkflow::load($prjUid); - $bpmnWf->remove(); - } - - unlink(self::$filePmx); - } - - /** - * Test load - * - * @covers \ProcessMaker\Importer\XmlImporter::load - */ - public function testLoad() - { - $arrayData = self::$importer->load(); - - $this->assertTrue(is_array($arrayData)); - $this->assertNotEmpty($arrayData); - - $this->assertArrayHasKey("tables", $arrayData); - $this->assertArrayHasKey("files", $arrayData); - - $this->assertEquals($arrayData["tables"]["bpmn"]["project"][0]["prj_uid"], self::$projectUid); - $this->assertEquals($arrayData["tables"]["workflow"]["process"][0]["PRO_UID"], self::$projectUid); - } - - /** - * Test getTextNode - * - * @covers \ProcessMaker\Importer\XmlImporter::getTextNode - */ - public function testGetTextNode() - { - //Is not implemented. Method getTextNode() is private - } - - /** - * Test import - * - * @covers \ProcessMaker\Importer\XmlImporter::import - */ - public function testImport() - { - $prjUid = self::$importer->import(); - self::$arrayPrjUid[] = $prjUid; - - $this->assertNotNull(\BpmnProjectPeer::retrieveByPK($prjUid)); - } - - /** - * Test importPostFile - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - */ - public function testImportPostFile() - { - self::$importer->setSaveDir(PATH_DOCUMENT . "input"); - - $arrayData = self::$importer->importPostFile(array("PROJECT_FILE" => self::$projectUid . ".pmx"), "KEEP"); - self::$arrayPrjUid[] = $arrayData["PRJ_UID"]; - - $this->assertNotNull(\BpmnProjectPeer::retrieveByPK($arrayData["PRJ_UID"])); - } - - /** - * Test exception when the project exists - * - * @covers \ProcessMaker\Importer\XmlImporter::import - * - * @expectedException Exception - * @expectedExceptionMessage Project already exists, you need set an action to continue. Available actions: [project.import.create_new|project.import.override|project.import.disable_and_create_new|project.import.keep_without_changing_and_create_new]. - */ - public function testImportExceptionProjectExists() - { - $prjUid = self::$importer->import(); - } - - /** - * Test exception for empty data - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "$arrayData", it can not be empty. - */ - public function testImportPostFileExceptionEmptyData() - { - $arrayData = self::$importer->importPostFile(array()); - } - - /** - * Test exception for invalid extension - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - * - * @expectedException Exception - * @expectedExceptionMessage The file extension not is "pmx" - */ - public function testImportPostFileExceptionInvalidExtension() - { - $arrayData = self::$importer->importPostFile(array("PROJECT_FILE" => "file.pm")); - } - - /** - * Test exception for file does not exist - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - * - * @expectedException Exception - * @expectedExceptionMessage The file with PROJECT_FILE: "file.pmx" does not exist. - */ - public function testImportPostFileExceptionFileNotExists() - { - $arrayData = self::$importer->importPostFile(array("PROJECT_FILE" => "file.pmx")); - } - - /** - * Test exception for invalid option - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - * - * @expectedException Exception - * @expectedExceptionMessage Invalid value for "OPTION", it only accepts values: "CREATE|OVERWRITE|DISABLE|KEEP". - */ - public function testImportPostFileExceptionInvalidOption() - { - $arrayData = self::$importer->importPostFile(array("PROJECT_FILE" => "file.pmx"), "CREATED"); - } - - /** - * Test exception when the project exists - * - * @covers \ProcessMaker\Importer\XmlImporter::importPostFile - * - * @expectedException Exception - * @expectedExceptionMessage Project already exists, you need set an action to continue. Available actions: [CREATE|OVERWRITE|DISABLE|KEEP]. - */ - public function testImportPostFileExceptionProjectExists() - { - self::$importer->setSaveDir(PATH_DOCUMENT . "input"); - - $arrayData = self::$importer->importPostFile(array("PROJECT_FILE" => self::$projectUid . ".pmx")); - } -} - diff --git a/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php b/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php deleted file mode 100644 index 96c763f21..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/BpmnWorkflowTest.php +++ /dev/null @@ -1,713 +0,0 @@ - - */ -class BpmnWorkflowTest extends \PHPUnit_Framework_TestCase -{ - protected static $uids = array(); - - public static function tearDownAfterClass() - { - //return false; - //cleaning DB - foreach (self::$uids as $prjUid) { - $bwap = Project\Adapter\BpmnWorkflow::load($prjUid); - $bwap->remove(); - } - } - - function testNew() - { - $data = array( - "PRJ_NAME" => "Test Bpmn/Workflow Project #1.". rand(1, 100), - "PRJ_DESCRIPTION" => "Description for - Test BPMN Project #1." . rand(1, 100), - "PRJ_AUTHOR" => "00000000000000000000000000000001" - ); - - $bwap = new Project\Adapter\BpmnWorkflow($data); - - try { - $bp = Project\Bpmn::load($bwap->getUid()); - } catch (\Exception $e){ - $bp = null; - } - - try { - $wp = Project\Workflow::load($bwap->getUid()); - } catch (\Exception $e){ - $wp = null; - } - - self::$uids[] = $bwap->getUid(); - - $this->assertNotNull($bp); - $this->assertNotNull($wp); - $this->assertEquals($bp->getUid(), $wp->getUid()); - - $project = $bp->getProject(); - $process = $wp->getProcess(); - - $this->assertEquals($project["PRJ_NAME"], $process["PRO_TITLE"]); - $this->assertEquals($project["PRJ_DESCRIPTION"], $process["PRO_DESCRIPTION"]); - $this->assertEquals($project["PRJ_AUTHOR"], $process["PRO_CREATE_USER"]); - - return $bwap; - } - - function testCreate() - { - $data = array( - "PRJ_NAME" => "Test Bpmn/Workflow Project #2", - "PRJ_DESCRIPTION" => "Description for - Test BPMN Project #2", - "PRJ_AUTHOR" => "00000000000000000000000000000001" - ); - - $bwap = new Project\Adapter\BpmnWorkflow(); - $bwap->create($data); - - try { - $bp = Project\Bpmn::load($bwap->getUid()); - } catch (\Exception $e){ - $bp = null; - } - - try { - $wp = Project\Workflow::load($bwap->getUid()); - } catch (\Exception $e){ - $wp = null; - } - - $this->assertNotEmpty($bp); - $this->assertNotEmpty($wp); - $this->assertEquals($bp->getUid(), $wp->getUid()); - - $project = $bp->getProject(); - $process = $wp->getProcess(); - - $this->assertEquals($project["PRJ_NAME"], $process["PRO_TITLE"]); - $this->assertEquals($project["PRJ_DESCRIPTION"], $process["PRO_DESCRIPTION"]); - $this->assertEquals($project["PRJ_AUTHOR"], $process["PRO_CREATE_USER"]); - - return $bwap; - } - - /** - * @depends testCreate - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - */ - function testRemove(Project\Adapter\BpmnWorkflow $bwap) - { - $prjUid = $bwap->getUid(); - $bwap->remove(); - $bp = $wp = null; - - try { - $bp = Project\Bpmn::load($prjUid); - } catch (Exception\ProjectNotFound $e) {} - - try { - $wp = Project\Workflow::load($prjUid); - } catch (Exception\ProjectNotFound $e) {} - - $this->assertNull($bp); - $this->assertNull($wp); - } - - /* - * Testing Project's Activity - */ - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @return string - */ - function testAddActivity($bwap) - { - // before add activity, we need to add a diagram and process to the project - $bwap->addDiagram(); - $bwap->addProcess(); - - // add the new activity - $actUid = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => "50", - "BOU_Y" => "50" - )); - - $wp = Project\Workflow::load($bwap->getUid()); - - $activity = $bwap->getActivity($actUid); - $task = $wp->getTask($actUid); - - $this->assertEquals($activity["ACT_NAME"], $task["TAS_TITLE"]); - $this->assertEquals($activity["BOU_X"], $task["TAS_POSX"]); - $this->assertEquals($activity["BOU_Y"], $task["TAS_POSY"]); - - return $actUid; - } - - /** - * @depends testNew - * @depends testAddActivity - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param string $actUid - */ - function testUpdateActivity($bwap, $actUid) - { - $updatedData = array( - "ACT_NAME" => "Activity #1 - (Modified)", - "BOU_X" => 122, - "BOU_Y" => 250 - ); - - $bwap->updateActivity($actUid, $updatedData); - $activity = $bwap->getActivity($actUid); - $wp = Project\Workflow::load($bwap->getUid()); - $task = $wp->getTask($actUid); - - $this->assertEquals($activity["ACT_NAME"], $task["TAS_TITLE"]); - $this->assertEquals($activity["BOU_X"], $task["TAS_POSX"]); - $this->assertEquals($activity["BOU_Y"], $task["TAS_POSY"]); - } - - /** - * @depends testNew - * @depends testAddActivity - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param string $actUid - */ - function testRemoveActivity($bwap, $actUid) - { - $bwap->removeActivity($actUid); - $activity = $bwap->getActivity($actUid); - - $this->assertNull($activity); - } - - /* - * Testing Project's Flows - */ - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @return string - */ - function testAddActivityToActivityFlow($bwap) - { - $actUid1 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => 122, - "BOU_Y" => 222 - )); - $actUid2 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #2", - "BOU_X" => 322, - "BOU_Y" => 422 - )); - - $flowData = array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $actUid1, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $actUid2, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 326, - 'FLO_Y1' => 146, - 'FLO_X2' => 461, - 'FLO_Y2' => 146, - ); - - $flowUid = $bwap->addFlow($flowData); - $bwap->mapBpmnFlowsToWorkflowRoutes(); - - $route = \Route::findOneBy(array( - \RoutePeer::TAS_UID => $actUid1, - \RoutePeer::ROU_NEXT_TASK => $actUid2 - )); - - $this->assertNotNull($route); - $this->assertTrue(is_string($flowUid)); - $this->assertEquals(32, strlen($flowUid)); - $this->assertEquals($route->getRouNextTask(), $actUid2); - $this->assertEquals($route->getRouType(), "SEQUENTIAL"); - - return array("flow_uid" => $flowUid, "activitiesUid" => array($actUid1, $actUid2)); - } - - - /** - * @depends testNew - * @depends testAddActivityToActivityFlow - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param array $input - */ - function testRemoveActivityToActivityFlow($bwap, $input) - { - $bwap->removeFlow($input["flow_uid"]); - $this->assertNull($bwap->getFlow($input["flow_uid"])); - - $route = \Route::findOneBy(array( - \RoutePeer::TAS_UID => $input["activitiesUid"][0], - \RoutePeer::ROU_NEXT_TASK => $input["activitiesUid"][1] - )); - - $this->assertNull($route); - - // cleaning - $bwap->removeActivity($input["activitiesUid"][0]); - $bwap->removeActivity($input["activitiesUid"][1]); - - $this->assertCount(0, $bwap->getActivities()); - } - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - */ - function testActivityToInclusiveGatewayToActivityFlowsSingle($bwap) - { - $actUid1 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => 198, - "BOU_Y" => 56 - )); - $actUid2 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #2", - "BOU_X" => 198, - "BOU_Y" => 250 - )); - $gatUid = $bwap->addGateway(array( - "GAT_NAME" => "Gateway #1", - "GAT_TYPE" => "INCLUSIVE", - "GAT_DIRECTION" => "DIVERGING", - "BOU_X" => 256, - "BOU_Y" => 163 - )); - - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $actUid1, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $gatUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnGateway', - 'FLO_X1' => 273, - 'FLO_Y1' => 273, - 'FLO_X2' => 163, - 'FLO_Y2' => 163, - )); - - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $gatUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnGateway', - 'FLO_ELEMENT_DEST' => $actUid2, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 273, - 'FLO_Y1' => 273, - 'FLO_X2' => 249, - 'FLO_Y2' => 249, - )); - - $bwap->mapBpmnFlowsToWorkflowRoutes(); - - $this->assertCount(2, $bwap->getActivities()); - $this->assertCount(1, $bwap->getGateways()); - $this->assertCount(2, $bwap->getFlows()); - - $flows1 = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid); - $flows2 = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid); - - $this->assertCount(1, $flows1); - $this->assertCount(1, $flows2); - $this->assertEquals($flows1[0]->getFloElementOrigin(), $actUid1); - $this->assertEquals($flows2[0]->getFloElementDest(), $actUid2); - - // cleaning - $this->resetProject($bwap); - } - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - */ - function testActivityToInclusiveGatewayToActivityFlowsMultiple($bwap) - { - $actUid1 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => 311, - "BOU_Y" => 26 - )); - $actUid2 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #2", - "BOU_X" => 99, - "BOU_Y" => 200 - )); - $actUid3 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #3", - "BOU_X" => 310, - "BOU_Y" => 200 - )); - $actUid4 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #4", - "BOU_X" => 542, - "BOU_Y" => 200 - )); - $gatUid = $bwap->addGateway(array( - "GAT_NAME" => "Gateway #1", - "GAT_TYPE" => "INCLUSIVE", - "GAT_DIRECTION" => "DIVERGING", - "BOU_X" => 369, - "BOU_Y" => 123 - )); - - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $actUid1, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $gatUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnGateway', - 'FLO_X1' => 386, - 'FLO_Y1' => 174, - 'FLO_X2' => 206, - 'FLO_Y2' => 206, - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $gatUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnGateway', - 'FLO_ELEMENT_DEST' => $actUid2, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 273, - 'FLO_Y1' => 273, - 'FLO_X2' => 249, - 'FLO_Y2' => 249, - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $gatUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnGateway', - 'FLO_ELEMENT_DEST' => $actUid3, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 386, - 'FLO_Y1' => 174, - 'FLO_X2' => 206, - 'FLO_Y2' => 206, - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $gatUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnGateway', - 'FLO_ELEMENT_DEST' => $actUid4, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 386, - 'FLO_Y1' => 617, - 'FLO_X2' => 207, - 'FLO_Y2' => 207, - )); - - $bwap->mapBpmnFlowsToWorkflowRoutes(); - - $this->assertCount(4, $bwap->getActivities()); - $this->assertCount(1, $bwap->getGateways()); - $this->assertCount(4, $bwap->getFlows()); - $this->assertCount(1, \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid)); - $this->assertCount(3, \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid)); - - $wp = Project\Workflow::load($bwap->getUid()); - - $this->assertCount(4, $wp->getTasks()); - $this->assertCount(3, $wp->getRoutes()); - $this->assertCount(3, \Route::findAllBy(\RoutePeer::TAS_UID, $actUid1)); - $this->assertCount(1, \Route::findAllBy(\RoutePeer::ROU_NEXT_TASK, $actUid2)); - $this->assertCount(1, \Route::findAllBy(\RoutePeer::ROU_NEXT_TASK, $actUid3)); - $this->assertCount(1, \Route::findAllBy(\RoutePeer::ROU_NEXT_TASK, $actUid4)); - - return array($actUid2, $actUid3, $actUid4); - } - - /** - * @depends testNew - * @depends testActivityToInclusiveGatewayToActivityFlowsMultiple - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param array $activitiesUid - */ - function testActivityToInclusiveGatewayToActivityFlowsMultipleJoin($bwap, $activitiesUid) - { - $gatUid = $bwap->addGateway(array( - "GAT_NAME" => "Gateway #2", - "GAT_TYPE" => "INCLUSIVE", - "GAT_DIRECTION" => "CONVERGING", - "BOU_X" => 369, - "BOU_Y" => 338 - )); - $actUid5 = $bwap->addActivity(array( - "ACT_NAME" => "Activity #5", - "BOU_X" => 312, - "BOU_Y" => 464 - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $activitiesUid[0], - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $gatUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnGateway', - 'FLO_X1' => 174, - 'FLO_Y1' => 365, - 'FLO_X2' => 355, - 'FLO_Y2' => 355, - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $activitiesUid[1], - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $gatUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnGateway', - 'FLO_X1' => 385, - 'FLO_Y1' => 382, - 'FLO_X2' => 338, - 'FLO_Y2' => 338, - )); - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $activitiesUid[2], - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $gatUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnGateway', - 'FLO_X1' => 617, - 'FLO_Y1' => 398, - 'FLO_X2' => 355, - 'FLO_Y2' => 355, - )); - - $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $gatUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnGateway', - 'FLO_ELEMENT_DEST' => $actUid5, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 382, - 'FLO_Y1' => 387, - 'FLO_X2' => 463, - 'FLO_Y2' => 463, - )); - - $bwap->mapBpmnFlowsToWorkflowRoutes(); - - $this->assertCount(8, $bwap->getFlows()); - $this->assertCount(5, $bwap->getActivities()); - $this->assertCount(2, $bwap->getGateways()); - $this->assertCount(3, \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid)); - $this->assertCount(1, \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid)); - - $wp = Project\Workflow::load($bwap->getUid()); - - $this->assertCount(5, $wp->getTasks()); - $this->assertCount(6, $wp->getRoutes()); - - $this->assertCount(1, \Route::findAllBy(\RoutePeer::TAS_UID, $activitiesUid[0])); - $this->assertCount(1, \Route::findAllBy(\RoutePeer::TAS_UID, $activitiesUid[1])); - $this->assertCount(1, \Route::findAllBy(\RoutePeer::TAS_UID, $activitiesUid[2])); - $this->assertCount(3, \Route::findAllBy(\RoutePeer::ROU_NEXT_TASK, $actUid5)); - - // cleaning - $this->resetProject($bwap); - } - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @return string - */ - function testSetStartEvent($bwap) - { - $actUid = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => 312, - "BOU_Y" => 464 - )); - $evnUid = $bwap->addEvent(array( - "EVN_NAME" => "Event #1", - "EVN_TYPE" => "START", - "BOU_X" => 369, - "BOU_Y" => 338, - "EVN_MARKER" => "MESSAGE", - "EVN_MESSAGE" => "LEAD" - )); - $floUid = $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $evnUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnEvent', - 'FLO_ELEMENT_DEST' => $actUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnActivity', - 'FLO_X1' => 174, - 'FLO_Y1' => 365, - 'FLO_X2' => 355, - 'FLO_Y2' => 355, - )); - - $this->assertCount(1, $bwap->getActivities()); - $this->assertCount(1, $bwap->getEvents()); - $this->assertCount(1, $bwap->getFlows()); - - $wp = Project\Workflow::load($bwap->getUid()); - $task = $wp->getTask($actUid); - - $this->assertCount(1, $wp->getTasks()); - $this->assertCount(0, $wp->getRoutes()); - $this->assertNotNull($task); - - $this->assertEquals($task["TAS_START"], "TRUE"); - - return $floUid; - } - - /** - * @depends testNew - * @depends testSetStartEvent - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param string $floUid - */ - function testUnsetStartEvent($bwap, $floUid) - { - $bwap->removeFlow($floUid); - - $this->assertCount(1, $bwap->getActivities()); - $this->assertCount(1, $bwap->getEvents()); - $this->assertCount(0, $bwap->getFlows()); - - $wp = Project\Workflow::load($bwap->getUid()); - - $tasks = $wp->getTasks(); - $this->assertCount(1, $tasks); - $this->assertCount(0, $wp->getRoutes()); - $this->assertEquals($tasks[0]["TAS_START"], "FALSE"); - - // cleaning - $this->resetProject($bwap); - } - - /** - * @depends testNew - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - */ - function testSetEndEvent($bwap) - { - $actUid = $bwap->addActivity(array( - "ACT_NAME" => "Activity #1", - "BOU_X" => 312, - "BOU_Y" => 464 - )); - $evnUid = $bwap->addEvent(array( - "EVN_NAME" => "Event #1", - "EVN_TYPE" => "END", - "BOU_X" => 369, - "BOU_Y" => 338, - "EVN_MARKER" => "MESSAGE", - "EVN_MESSAGE" => "LEAD" - )); - $floUid = $bwap->addFlow(array( - 'FLO_TYPE' => 'SEQUENCE', - 'FLO_ELEMENT_ORIGIN' => $actUid, - 'FLO_ELEMENT_ORIGIN_TYPE' => 'bpmnActivity', - 'FLO_ELEMENT_DEST' => $evnUid, - 'FLO_ELEMENT_DEST_TYPE' => 'bpmnEvent', - 'FLO_X1' => 174, - 'FLO_Y1' => 365, - 'FLO_X2' => 355, - 'FLO_Y2' => 355, - )); - - $this->assertCount(1, $bwap->getActivities()); - $this->assertCount(1, $bwap->getEvents()); - $this->assertCount(1, $bwap->getFlows()); - - $wp = Project\Workflow::load($bwap->getUid()); - $task = $wp->getTask($actUid); - - $this->assertCount(1, $wp->getTasks()); - $this->assertCount(1, $wp->getRoutes()); - $this->assertNotNull($task); - - $routes = \Route::findAllBy(\RoutePeer::TAS_UID, $task["TAS_UID"]); - - $this->assertCount(1, $routes); - $this->assertEquals($routes[0]->getRouNextTask(), "-1"); - - return $floUid; - } - - /** - * @depends testNew - * @depends testSetEndEvent - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - * @param $floUid - */ - function testUnsetEndEvent($bwap, $floUid) - { - $bwap->removeFlow($floUid); - - $this->assertCount(1, $bwap->getActivities()); - $this->assertCount(1, $bwap->getEvents()); - $this->assertCount(0, $bwap->getFlows()); - - $wp = Project\Workflow::load($bwap->getUid()); - - $this->assertCount(1, $wp->getTasks()); - $this->assertCount(0, $wp->getRoutes()); - - // cleaning - $this->resetProject($bwap); - } - - /** - * @param \ProcessMaker\Project\Adapter\BpmnWorkflow $bwap - */ - protected function resetProject(\ProcessMaker\Project\Adapter\BpmnWorkflow $bwap) - { - // cleaning - $activities = $bwap->getActivities(); - foreach ($activities as $activity) { - $bwap->removeActivity($activity["ACT_UID"]); - } - $events = $bwap->getEvents(); - foreach ($events as $event) { - $bwap->removeEvent($event["EVN_UID"]); - } - $gateways = $bwap->getGateways(); - foreach ($gateways as $gateway) { - $bwap->removeGateway($gateway["GAT_UID"]); - } - $flows = $bwap->getFlows(); - foreach ($flows as $flow) { - $bwap->removeFlow($flow["FLO_UID"]); - } - - // verifying that project is cleaned - $this->assertCount(0, $bwap->getActivities()); - $this->assertCount(0, $bwap->getEvents()); - $this->assertCount(0, $bwap->getGateways()); - $this->assertCount(0, $bwap->getFlows()); - - $wp = Project\Workflow::load($bwap->getUid()); - - $this->assertCount(0, $wp->getTasks()); - $this->assertCount(0, $wp->getRoutes()); - } -} - - diff --git a/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/WorkflowBpmnTest.php b/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/WorkflowBpmnTest.php deleted file mode 100644 index 5af5a80db..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Project/Adapter/WorkflowBpmnTest.php +++ /dev/null @@ -1,92 +0,0 @@ - - */ -class WorkflowBpmnTest extends \PHPUnit_Framework_TestCase -{ - protected static $uids = array(); - - public static function tearDownAfterClass() - { - //cleaning DB - foreach (self::$uids as $prjUid) { - $wbpa = Project\Adapter\WorkflowBpmn::load($prjUid); - $wbpa->remove(); - } - } - - function testNew() - { - $data = array( - "PRO_TITLE" => "Test Workflow/Bpmn Project #1", - "PRO_DESCRIPTION" => "Description for - Test Project #1", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - ); - - $wbap = new Project\Adapter\WorkflowBpmn($data); - - try { - $bp = Project\Bpmn::load($wbap->getUid()); - } catch (\Exception $e){die($e->getMessage());} - - try { - $wp = Project\Workflow::load($wbap->getUid()); - } catch (\Exception $e){} - - self::$uids[] = $wbap->getUid(); - - $this->assertNotNull($bp); - $this->assertNotNull($wp); - $this->assertEquals($bp->getUid(), $wp->getUid()); - - $project = $bp->getProject(); - $process = $wp->getProcess(); - - $this->assertEquals($project["PRJ_NAME"], $process["PRO_TITLE"]); - $this->assertEquals($project["PRJ_DESCRIPTION"], $process["PRO_DESCRIPTION"]); - $this->assertEquals($project["PRJ_AUTHOR"], $process["PRO_CREATE_USER"]); - } - - function testCreate() - { - $data = array( - "PRO_TITLE" => "Test Workflow/Bpmn Project #2", - "PRO_DESCRIPTION" => "Description for - Test Project #2", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - ); - $wbap = new Project\Adapter\WorkflowBpmn(); - $wbap->create($data); - - try { - $bp = Project\Bpmn::load($wbap->getUid()); - } catch (\Exception $e){} - - try { - $wp = Project\Workflow::load($wbap->getUid()); - } catch (\Exception $e){} - - self::$uids[] = $wbap->getUid(); - - $this->assertNotEmpty($bp); - $this->assertNotEmpty($wp); - $this->assertEquals($bp->getUid(), $wp->getUid()); - - $project = $bp->getProject(); - $process = $wp->getProcess(); - - $this->assertEquals($project["PRJ_NAME"], $process["PRO_TITLE"]); - $this->assertEquals($project["PRJ_DESCRIPTION"], $process["PRO_DESCRIPTION"]); - $this->assertEquals($project["PRJ_AUTHOR"], $process["PRO_CREATE_USER"]); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/ProcessMaker/Project/BpmnTest.php b/workflow/engine/src/Tests/ProcessMaker/Project/BpmnTest.php deleted file mode 100644 index bc48b6e24..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Project/BpmnTest.php +++ /dev/null @@ -1,278 +0,0 @@ - - */ -class BpmnTest extends \PHPUnit_Framework_TestCase -{ - protected static $prjUids = array(); - - public static function tearDownAfterClass() - { - //return; - - //cleaning DB - foreach (self::$prjUids as $prjUid) { - $bp = Project\Bpmn::load($prjUid); - $bp->remove(); - } - - } - - public function testCreate() - { - $data = array( - "PRJ_NAME" => "Test BPMN Project #1", - "PRJ_DESCRIPTION" => "Description for - Test BPMN Project #1", - "PRJ_AUTHOR" => "00000000000000000000000000000001" - ); - - // Create a new Project\Bpmn and save to DB - $bp = new Project\Bpmn($data); - $projectData = $bp->getProject(); - self::$prjUids[] = $bp->getUid(); - - foreach ($data as $key => $value) { - $this->assertEquals($value, $projectData[$key]); - } - - return $bp; - } - - /** - * @depends testCreate - * @var $bp \ProcessMaker\Project\Bpmn - */ - public function testAddDiagram($bp) - { - $data = array( - "DIA_NAME" => "Sample Diagram #1" - ); - - // Save to DB - $bp->addDiagram($data); - - // Load from DB - $diagramData = $bp->getDiagram(); - - $this->assertEquals($data["DIA_NAME"], $diagramData["DIA_NAME"]); - $this->assertEquals($bp->getUid(), $diagramData["PRJ_UID"]); - } - - /** - * @depends testCreate - * @var $bp \ProcessMaker\Project\Bpmn - */ - public function testAddProcess($bp) - { - $data = array( - "PRO_NAME" => "Sample Process #1" - ); - - $diagramData = $bp->getDiagram(); - - // Save to DB - $bp->addProcess($data); - - // Load from DB - $processData = $bp->getProcess(); - - $this->assertEquals($data["PRO_NAME"], $processData["PRO_NAME"]); - $this->assertEquals($bp->getUid(), $processData["PRJ_UID"]); - $this->assertEquals($diagramData['DIA_UID'], $processData["DIA_UID"]); - } - - /** - * @depends testCreate - * @var $bp \ProcessMaker\Project\Bpmn - */ - public function testAddActivity($bp) - { - $data = array( - "ACT_NAME" => "Activity #1", - "BOU_X" => "50", - "BOU_Y" => "50" - ); - - // Save to DB - $bp->addActivity($data); - - // Load from DB - $activities = $bp->getActivities(); - - $this->assertCount(1, $activities); - - $activityData = $activities[0]; - - foreach ($data as $key => $value) { - $this->assertEquals($value, $activityData[$key]); - } - } - - /** - * @depends testCreate - * @param $bp \ProcessMaker\Project\Bpmn - * @return array - */ - public function testAddActivityWithUid($bp) - { - $actUid = "f1198ddc864204561817155064020352"; - - $data = array( - "ACT_UID" => $actUid, - "ACT_NAME" => "Activity #X", - "BOU_X" => "50", - "BOU_Y" => "50" - ); - - // Save to DB - $bp->addActivity($data); - - // Load from DB - $activities = $bp->getActivities(); - - $uids = array(); - - foreach ($activities as $activity) { - array_push($uids, $activity["ACT_UID"]); - } - - $this->assertTrue(in_array($actUid, $uids)); - - return $data; - } - - /** - * @depends testCreate - * @depends testAddActivityWithUid - * @param $bp \ProcessMaker\Project\Bpmn - * @param $data - */ - public function testGetActivity($bp, $data) - { - // Load from DB - $activityData = $bp->getActivity($data["ACT_UID"]); - - // in data is set a determined UID for activity created in previous step - foreach ($data as $key => $value) { - $this->assertEquals($value, $activityData[$key]); - } - - // Testing with an invalid uid - $this->assertNull($bp->getActivity("INVALID-UID")); - } - - /** - * @depends testCreate - * @depends testAddActivityWithUid - * @param $bp \ProcessMaker\Project\Bpmn - * @param $data - */ - public function testUpdateActivity($bp, $data) - { - $updateData = array( - "ACT_NAME" => "Activity #X (Updated)", - "BOU_X" => "251", - "BOU_Y" => "252" - ); - - // Save to DB - $bp->updateActivity($data["ACT_UID"], $updateData); - - // Load from DB - $activityData = $bp->getActivity($data["ACT_UID"]); - - foreach ($updateData as $key => $value) { - $this->assertEquals($value, $activityData[$key]); - } - } - - /** - * @depends testCreate - * @depends testAddActivityWithUid - * @param $bp \ProcessMaker\Project\Bpmn - * @param $data - */ - public function testRemoveActivity($bp, $data) - { - $this->assertCount(2, $bp->getActivities()); - - $bp->removeActivity($data["ACT_UID"]); - - $this->assertCount(1, $bp->getActivities()); - } - - public function testGetActivities() - { - // Create a new Project\Bpmn and save to DB - $bp = new Project\Bpmn(array( - "PRJ_NAME" => "Test BPMN Project #2", - "PRJ_DESCRIPTION" => "Description for - Test BPMN Project #1", - "PRJ_AUTHOR" => "00000000000000000000000000000001" - )); - $bp->addDiagram(); - $bp->addProcess(); - - $this->assertCount(0, $bp->getActivities()); - - // Save to DB - $bp->addActivity(array( - "ACT_NAME" => "Activity #2", - "BOU_X" => "50", - "BOU_Y" => "50" - )); - - $bp->addActivity(array( - "ACT_NAME" => "Activity #3", - "BOU_X" => "50", - "BOU_Y" => "50" - )); - - $this->assertCount(2, $bp->getActivities()); - - return $bp; - } - - /** - * @depends testGetActivities - * @param $bp \ProcessMaker\Project\Bpmn - * @return null|\ProcessMaker\Project\Bpmn - */ - public function testLoad($bp) - { - $prjUid = $bp->getUid(); - $bp2 = Project\Bpmn::load($prjUid); - - $this->assertNotNull($bp2); - $this->assertEquals($bp->getActivities(), $bp2->getActivities()); - $this->assertEquals($bp->getDiagram(), $bp2->getDiagram()); - $this->assertEquals($bp->getProcess(), $bp2->getProcess()); - - return $bp2; - } - - /** - * @depends testLoad - * @param $bp \ProcessMaker\Project\Bpmn - * @expectedException \ProcessMaker\Exception\ProjectNotFound - * @expectedExceptionCode 20 - */ - public function testRemove($bp) - { - $prjUid = $bp->getUid(); - $bp->remove(); - - Project\Bpmn::load($prjUid); - } -} - diff --git a/workflow/engine/src/Tests/ProcessMaker/Project/WorkflowTest.php b/workflow/engine/src/Tests/ProcessMaker/Project/WorkflowTest.php deleted file mode 100644 index 5bf805949..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Project/WorkflowTest.php +++ /dev/null @@ -1,287 +0,0 @@ - - */ -class WorkflowTest extends \PHPUnit_Framework_TestCase -{ - protected static $proUids = array(); - - public static function tearDownAfterClass() - { - //cleaning DB - foreach (self::$proUids as $proUid) { - $wp = Project\Workflow::load($proUid); - $wp->remove(); - } - } - - public function testCreate() - { - $data = array( - "PRO_TITLE" => "Test Project #1", - "PRO_DESCRIPTION" => "Description for - Test Project #1", - "PRO_CATEGORY" => "", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - ); - - $wp = new Project\Workflow($data); - self::$proUids[] = $wp->getUid(); - - $processData = $wp->getProcess(); - - foreach ($data as $key => $value) { - $this->assertEquals($data[$key], $processData[$key]); - } - - return $wp; - } - - /** - * @depends testCreate - */ - public function testAddTask($wp) - { - $data = array( - "TAS_TITLE" => "task #1", - "TAS_DESCRIPTION" => "Description for task #1", - "TAS_POSX" => "50", - "TAS_POSY" => "50", - "TAS_WIDTH" => "100", - "TAS_HEIGHT" => "25" - ); - - $tasUid = $wp->addTask($data); - - $taskData = $wp->getTask($tasUid); - - foreach ($data as $key => $value) { - $this->assertEquals($data[$key], $taskData[$key]); - } - } - - /** - * @depends testCreate - */ - public function testUpdateTask($wp) - { - $data = array( - "TAS_TITLE" => "task #1 (updated)", - "TAS_POSX" => "150", - "TAS_POSY" => "250" - ); - - // at this time, there is only one task - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(1, $tasks); - - $wp->updateTask($tasks[0]['TAS_UID'], $data); - $taskData = $wp->getTask($tasks[0]['TAS_UID']); - - foreach ($data as $key => $value) { - $this->assertEquals($data[$key], $taskData[$key]); - } - } - - /** - * @depends testCreate - */ - public function testRemoveTask($wp) - { - $tasUid = $wp->addTask(array( - "TAS_TITLE" => "task #2", - "TAS_POSX" => "150", - "TAS_POSY" => "250" - )); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(2, $tasks); - - $wp->removeTask($tasUid); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(1, $tasks); - } - - /** - * @depends testCreate - */ - public function testGetTasks($wp) - { - $tasUid1 = $wp->addTask(array( - "TAS_TITLE" => "task #2", - "TAS_POSX" => "250", - "TAS_POSY" => "250" - )); - $tasUid2 = $wp->addTask(array( - "TAS_TITLE" => "task #3", - "TAS_POSX" => "350", - "TAS_POSY" => "350" - )); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(3, $tasks); - - $wp->removeTask($tasUid1); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(2, $tasks); - - $wp->removeTask($tasUid2); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(1, $tasks); - - $wp->removeTask($tasks[0]['TAS_UID']); - - $tasks = $wp->getTasks(); - $this->assertInternalType('array', $tasks); - $this->assertCount(0, $tasks); - } - - /** - * - */ - public function testAddRoute() - { - $wp = new Project\Workflow(array( - "PRO_TITLE" => "Test Project #2 (Sequential)", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - )); - - self::$proUids[] = $wp->getUid(); - - $tasUid1 = $wp->addTask(array( - "TAS_TITLE" => "task #1", - "TAS_POSX" => "410", - "TAS_POSY" => "61" - )); - $tasUid2 = $wp->addTask(array( - "TAS_TITLE" => "task #2", - "TAS_POSX" => "159", - "TAS_POSY" => "370" - )); - - $rouUid = $wp->addRoute($tasUid1, $tasUid2, "SEQUENTIAL"); - - $routeSaved = $wp->getRoute($rouUid); - - $this->assertEquals($tasUid1, $routeSaved['TAS_UID']); - $this->assertEquals($tasUid2, $routeSaved['ROU_NEXT_TASK']); - $this->assertEquals("SEQUENTIAL", $routeSaved['ROU_TYPE']); - } - - public function testAddSelectRoute() - { - $wp = new Project\Workflow(array( - "PRO_TITLE" => "Test Project #3 (Select)", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - )); - self::$proUids[] = $wp->getUid(); - - $tasUid1 = $wp->addTask(array( - "TAS_TITLE" => "task #1", - "TAS_POSX" => "410", - "TAS_POSY" => "61" - )); - $tasUid2 = $wp->addTask(array( - "TAS_TITLE" => "task #2", - "TAS_POSX" => "159", - "TAS_POSY" => "370" - )); - $tasUid3 = $wp->addTask(array( - "TAS_TITLE" => "task #3", - "TAS_POSX" => "670", - "TAS_POSY" => "372" - )); - - $wp->addSelectRoute($tasUid1, array($tasUid2, $tasUid3)); - } - - public function testCompleteWorkflowProject() - { - $wp = new Project\Workflow(array( - "PRO_TITLE" => "Test Complete Project #4", - "PRO_CREATE_USER" => "00000000000000000000000000000001" - )); - - $tasUid1 = $wp->addTask(array( - "TAS_TITLE" => "task #1", - "TAS_POSX" => "406", - "TAS_POSY" => "71" - )); - $tasUid2 = $wp->addTask(array( - "TAS_TITLE" => "task #2", - "TAS_POSX" => "188", - "TAS_POSY" => "240" - )); - $tasUid3 = $wp->addTask(array( - "TAS_TITLE" => "task #3", - "TAS_POSX" => "406", - "TAS_POSY" => "239" - )); - $tasUid4 = $wp->addTask(array( - "TAS_TITLE" => "task #4", - "TAS_POSX" => "294", - "TAS_POSY" => "366" - )); - $tasUid5 = $wp->addTask(array( - "TAS_TITLE" => "task #5", - "TAS_POSX" => "640", - "TAS_POSY" => "240" - )); - $tasUid6 = $wp->addTask(array( - "TAS_TITLE" => "task #6", - "TAS_POSX" => "640", - "TAS_POSY" => "359" - )); - - - $wp->addRoute($tasUid1, $tasUid2, "PARALLEL"); - $wp->addRoute($tasUid1, $tasUid3, "PARALLEL"); - $wp->addRoute($tasUid1, $tasUid5, "PARALLEL"); - - $wp->addRoute($tasUid2, $tasUid4, "SEC-JOIN"); - $wp->addRoute($tasUid3, $tasUid4, "SEC-JOIN"); - - $wp->addRoute($tasUid5, $tasUid6, "EVALUATE"); - $wp->addRoute($tasUid5, "-1", "EVALUATE"); - - $wp->setStartTask($tasUid1); - - $wp->setEndTask($tasUid4); - $wp->setEndTask($tasUid6); - - return $wp; - } - - /** - * @depends testCompleteWorkflowProject - * @param $wp \ProcessMaker\Project\Workflow - * @expectedException \ProcessMaker\Exception\ProjectNotFound - * @expectedExceptionCode 20 - */ - public function testRemove($wp) - { - $proUid = $wp->getUid(); - $wp->remove(); - - Project\Workflow::load($proUid); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/ProcessMaker/Util/CommonTest.php b/workflow/engine/src/Tests/ProcessMaker/Util/CommonTest.php deleted file mode 100644 index 237cbc4c9..000000000 --- a/workflow/engine/src/Tests/ProcessMaker/Util/CommonTest.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class XmlExporterTest extends \PHPUnit_Framework_TestCase -{ - function testGetLastVersion() - { - $lastVer = Util\Common::getLastVersion(__DIR__."/../../fixtures/files_struct/first/sample-*.txt"); - $this->assertEquals(3, $lastVer); - } - - function testGetLastVersionSec() - { - $lastVer = Util\Common::getLastVersion(__DIR__."/../../fixtures/files_struct/second/sample-*.txt"); - - $this->assertEquals(5, $lastVer); - } - - function testGetLastVersionThr() - { - $lastVer = Util\Common::getLastVersion(__DIR__."/../../fixtures/files_struct/third/sample-*.txt"); - - $this->assertEquals("3.1.9", $lastVer); - } - - /** - * Negative test, no matched files found - */ - function testGetLastVersionOther() - { - $lastVer = Util\Common::getLastVersion(sys_get_temp_dir()."/sample-*.txt"); - - $this->assertEquals(0, $lastVer); - } -} \ No newline at end of file diff --git a/workflow/engine/src/Tests/bootstrap.php b/workflow/engine/src/Tests/bootstrap.php deleted file mode 100644 index 6efd7294b..000000000 --- a/workflow/engine/src/Tests/bootstrap.php +++ /dev/null @@ -1,5 +0,0 @@ - - */ - -$config = parse_ini_file(__DIR__ . DIRECTORY_SEPARATOR . "config.ini"); - -$workspace = $config['workspace']; -$lang = $config['lang']; -$processMakerHome = $config['pm_home_dir']; -$rootDir = realpath($processMakerHome) . DIRECTORY_SEPARATOR; - -require $rootDir . "framework/src/Maveriks/Util/ClassLoader.php"; - -$loader = Maveriks\Util\ClassLoader::getInstance(); -$loader->add($rootDir . 'framework/src/', "Maveriks"); -$loader->add($rootDir . 'workflow/engine/src/', "ProcessMaker"); -$loader->add($rootDir . 'workflow/engine/src/'); - -// add vendors to autoloader -$loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2"); -$loader->addClass("Bootstrap", $rootDir . 'gulliver/system/class.bootstrap.php'); - -$loader->addModelClassPath($rootDir . "workflow/engine/classes/model/"); - -$app = new Maveriks\WebApplication(); -$app->setRootDir($rootDir); -$app->loadEnvironment($workspace); diff --git a/workflow/engine/test/bootstrap/functional.php b/workflow/engine/test/bootstrap/functional.php deleted file mode 100644 index 1a0472416..000000000 --- a/workflow/engine/test/bootstrap/functional.php +++ /dev/null @@ -1,52 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - -/* - * This file is part of the symfony package. - * (c) 2004-2006 Fabien Potencier - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// guess current application -if (!isset($app)) -{ - $traces = debug_backtrace(); - $caller = $traces[0]; - $app = array_pop(explode(DIRECTORY_SEPARATOR, dirname($caller['file']))); -} - -// define symfony constant -define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/../..')); -define('SF_APP', $app); -define('SF_ENVIRONMENT', 'test'); -define('SF_DEBUG', true); - -// initialize symfony -require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); - -// remove all cache -sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir')); diff --git a/workflow/engine/test/bootstrap/gulliverConstants.php b/workflow/engine/test/bootstrap/gulliverConstants.php deleted file mode 100644 index 2acea2faa..000000000 --- a/workflow/engine/test/bootstrap/gulliverConstants.php +++ /dev/null @@ -1,103 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - -//***************** URL KEY ********************************************* - define("URL_KEY", 'c0l0s40pt1mu59r1m3' ); - -//***************** System Directories & Paths ************************** - define('PATH_SEP', '/'); - - define( 'PATH_HOME', '/opt/processmaker/trunk/workflow/' ); - define( 'PATH_GULLIVER_HOME', '/opt/processmaker/trunk/gulliver' . PATH_SEP ); - //define( 'PATH_GULLIVER_HOME', $pathTrunk . 'gulliver' . PATH_SEP ); - define( 'PATH_RBAC_HOME', $pathTrunk . 'rbac' . PATH_SEP ); - define( 'PATH_DATA', '/shared/workflow_data/'); - -// the other directories - define( 'PATH_GULLIVER', PATH_GULLIVER_HOME . 'system' . PATH_SEP ); //gulliver system classes - define( 'PATH_TEMPLATE', PATH_GULLIVER_HOME . 'templates' . PATH_SEP ); - define( 'PATH_THIRDPARTY', PATH_GULLIVER_HOME . 'thirdparty' . PATH_SEP ); - define( 'PATH_RBAC', PATH_RBAC_HOME . 'engine/classes' . PATH_SEP ); //to enable rbac version 2 - define( 'PATH_HTML', PATH_HOME . 'public_html' . PATH_SEP ); - - // Application's General Directories - define( 'PATH_CORE', PATH_HOME . 'engine' . PATH_SEP ); - define( 'PATH_SKINS', PATH_CORE . 'skins' . PATH_SEP ); - define( 'PATH_METHODS', PATH_CORE . 'methods' . PATH_SEP ); - define( 'PATH_XMLFORM', PATH_CORE . 'xmlform' . PATH_SEP ); - -//************ include Gulliver Class ************** - require_once( PATH_GULLIVER . PATH_SEP . 'class.g.php'); - -// the Compiled Directories - define( 'PATH_C', $pathOutTrunk . 'compiled/'); - -// the Smarty Directories - if ( strstr ( getenv ( 'OS' ), 'Windows' ) ) { - define( 'PATH_SMARTY_C', 'c:/tmp/smarty/c' ); - define( 'PATH_SMARTY_CACHE', 'c:/tmp/smarty/cache' ); - } - else { - define( 'PATH_SMARTY_C', PATH_C . 'smarty/c' ); - define( 'PATH_SMARTY_CACHE', PATH_C . 'smarty/cache' ); - } - - if (!is_dir(PATH_SMARTY_C)) G::mk_dir(PATH_SMARTY_C); - if (!is_dir(PATH_SMARTY_CACHE)) G::mk_dir(PATH_SMARTY_CACHE); - - - // Other Paths - //define( 'PATH_DB' , PATH_HOME . 'engine' . PATH_SEP . 'db' . PATH_SEP); - define( 'PATH_DB' , PATH_DATA . 'sites' . PATH_SEP ); - define( 'PATH_RTFDOCS' , PATH_CORE . 'rtf_templates' . PATH_SEP ); - define( 'PATH_HTMLMAIL', PATH_CORE . 'html_templates' . PATH_SEP ); - define( 'PATH_TPL' , PATH_CORE . 'templates' . PATH_SEP ); - define( 'PATH_DYNACONT', PATH_CORE . 'content' . PATH_SEP . 'dynaform' . PATH_SEP ); - define( 'PATH_LANGUAGECONT', PATH_CORE . 'content' . PATH_SEP . 'languages' . PATH_SEP ); - define( 'SYS_UPLOAD_PATH', PATH_HOME . "public_html/files/" ); - define( 'PATH_UPLOAD', PATH_HTML . 'files/'); - - -define ('DB_HOST', '192.168.0.10' ); -define ('DB_NAME', 'wf_opensource' ); -define ('DB_USER', 'fluid' ); -define ('DB_PASS', 'fluid2000' ); -define ('DB_RBAC_NAME', 'rbac_os' ); -define ('DB_RBAC_USER', 'rbac_os' ); -define ('DB_RBAC_PASS', '873821w3n2u719tx' ); -define ('DB_WIZARD_REPORT_SYS', 'report_os' ); -define ('DB_WIZARD_REPORT_USER', 'rep_os' ); -define ('DB_WIZARD_REPORT_PASS', '3r357ichy6b95s88' ); - -define ( 'SF_ROOT_DIR', PATH_CORE ); -define ( 'SF_APP', 'app' ); -define ( 'SF_ENVIRONMENT', 'env' ); - - set_include_path( - PATH_THIRDPARTY . PATH_SEPARATOR . - PATH_THIRDPARTY . 'pear' . PATH_SEPARATOR . - get_include_path() - ); - diff --git a/workflow/engine/test/bootstrap/unit.php b/workflow/engine/test/bootstrap/unit.php deleted file mode 100644 index b671355be..000000000 --- a/workflow/engine/test/bootstrap/unit.php +++ /dev/null @@ -1,107 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - ini_set('short_open_tag', 'on'); - ini_set('asp_tags', 'on'); - ini_set('memory_limit', '80M'); - - if ( PHP_OS == 'WINNT' ) - define('PATH_SEP', '\\'); - else - define('PATH_SEP', '/'); - - - //***************** Defining the Home Directory ********************************* - $docuroot = explode ( PATH_SEP , $_SERVER['PWD'] ); - array_pop($docuroot); - $pathhome = implode( PATH_SEP, $docuroot ); - define('PATH_HOME', $pathhome . PATH_SEP ); - $gulliverConfig = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php'; - $definesConfig = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'defines.php'; - - //try to find automatically the trunk directory where are placed the RBAC and Gulliver directories - //in a normal installation you don't need to change it. - array_pop($docuroot); - $pathTrunk = implode( PATH_SEP, $docuroot ) . PATH_SEP ; - array_pop($docuroot); - $pathOutTrunk = implode( PATH_SEP, $docuroot ) . PATH_SEP ; - // to do: check previous algorith for Windows $pathTrunk = "c:/home/"; - - define('PATH_TRUNK', $pathTrunk ); - define('PATH_OUTTRUNK', $pathOutTrunk ); - - if (file_exists( $gulliverConfig )) { - include ( $gulliverConfig ); - } - - if (file_exists( $definesConfig )) { - include ( $definesConfig ); - } - - //$_test_dir = realpath(dirname(__FILE__).'/..'); - //require_once( 'lime/lime.php'); - if(file_exists(PATH_GULLIVER . "class.bootstrap.php")) { - require_once (PATH_GULLIVER . "class.bootstrap.php"); - } - spl_autoload_register(array('Bootstrap', 'autoloadClass')); - Bootstrap::registerClass('G', PATH_GULLIVER . "class.g.php"); - Bootstrap::registerClass('System', PATH_HOME . "engine/classes/class.system.php"); -// Call more Classes - Bootstrap::registerClass('headPublisher', PATH_GULLIVER . "class.headPublisher.php"); - Bootstrap::registerClass('publisher', PATH_GULLIVER . "class.publisher.php"); - Bootstrap::registerClass('xmlform', PATH_GULLIVER . "class.xmlform.php"); - Bootstrap::registerClass('XmlForm_Field', PATH_GULLIVER . "class.xmlform.php"); - Bootstrap::registerClass('xmlformExtension', PATH_GULLIVER . "class.xmlformExtension.php"); - Bootstrap::registerClass('form', PATH_GULLIVER . "class.form.php"); - Bootstrap::registerClass('menu', PATH_GULLIVER . "class.menu.php"); - Bootstrap::registerClass('Xml_Document', PATH_GULLIVER . "class.xmlDocument.php"); - Bootstrap::registerClass('DBSession', PATH_GULLIVER . "class.dbsession.php"); - Bootstrap::registerClass('DBConnection', PATH_GULLIVER . "class.dbconnection.php"); - Bootstrap::registerClass('DBRecordset', PATH_GULLIVER . "class.dbrecordset.php"); - Bootstrap::registerClass('DBTable', PATH_GULLIVER . "class.dbtable.php"); - Bootstrap::registerClass('xmlMenu', PATH_GULLIVER . "class.xmlMenu.php"); - Bootstrap::registerClass('XmlForm_Field_FastSearch', PATH_GULLIVER . "class.xmlformExtension.php"); - Bootstrap::registerClass('XmlForm_Field_XmlMenu', PATH_GULLIVER . "class.xmlMenu.php"); - Bootstrap::registerClass('XmlForm_Field_WYSIWYG_EDITOR', PATH_GULLIVER . "class.wysiwygEditor.php"); - Bootstrap::registerClass('Controller', PATH_GULLIVER . "class.controller.php"); - Bootstrap::registerClass('HttpProxyController', PATH_GULLIVER . "class.httpProxyController.php"); - Bootstrap::registerClass('templatePower', PATH_GULLIVER . "class.templatePower.php"); - Bootstrap::registerClass('XmlForm_Field_SimpleText', PATH_GULLIVER . "class.xmlformExtension.php"); - Bootstrap::registerClass('Propel', PATH_THIRDPARTY . "propel/Propel.php"); - Bootstrap::registerClass('Creole', PATH_THIRDPARTY . "creole/Creole.php"); - Bootstrap::registerClass('Criteria', PATH_THIRDPARTY . "propel/util/Criteria.php"); - Bootstrap::registerClass('Groups', PATH_HOME . "engine/classes/class.groups.php"); - Bootstrap::registerClass('Tasks', PATH_HOME . "engine/classes/class.tasks.php"); - Bootstrap::registerClass('Calendar', PATH_HOME . "engine/classes/class.calendar.php"); - Bootstrap::registerClass('processMap', PATH_HOME . "engine/classes/class.processMap.php"); - - Bootstrap::registerSystemClasses(); - - require_once( PATH_THIRDPARTY . 'pake' . PATH_SEP . 'pakeFunction.php'); - require_once( PATH_THIRDPARTY . 'pake' . PATH_SEP . 'pakeGetopt.class.php'); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - if ( !defined ( 'G_ENVIRONMENT') ) - define ( 'G_ENVIRONMENT', G_TEST_ENV ); - diff --git a/workflow/engine/test/fixtures/appDelegation.yml b/workflow/engine/test/fixtures/appDelegation.yml deleted file mode 100644 index 4635150f9..000000000 --- a/workflow/engine/test/fixtures/appDelegation.yml +++ /dev/null @@ -1,40 +0,0 @@ -CreateAppDelegations: - - - Title: "Create AppDelegation with Empty $Fields" - Function: "CreateEmptyAppDelegation" - Input: - Output: - Type: "G_Error" - - - Title: "Create Duplicated AppDelegation" - Function: "CreateDuplicated" - Input: - APP_UID: "1DUPLICATED1" - DEL_INDEX: 2 - PRO_UID[]: "guid.pm" - TAS_UID[]: "guid.pm" - Output: - Type: "G_Error" - - - TODO: "Review: Error catch in CreateAppDelegation capture Propel Errors but return the same G_Error information." - - - Title: "Create random new AppDelegation" - Function: "CreateNewAppDelegation" - Input: - APP_UID[]: "guid.pm" - DEL_INDEX[]: "rand.number" - PRO_UID[]: "guid.pm" - TAS_UID[]: "guid.pm" - DEL_TYPE[]: "*.DEL_TYPE.pm" - DEL_THREAD_STATUS[]: "*.DEL_THREAD_STATUS.pm" - Output: - Type: "string" - - - TODO: "Review: There isn't a 'function delete'. Is it required?" -DeleteCretedAppDelegations: - - - Title: "Deleting created AppDelegations" - Input: - Fields[]:"*.createdAppDel" - Output: - Value: "true" diff --git a/workflow/engine/test/fixtures/appDocument.yml b/workflow/engine/test/fixtures/appDocument.yml deleted file mode 100644 index 22ec3d154..000000000 --- a/workflow/engine/test/fixtures/appDocument.yml +++ /dev/null @@ -1,100 +0,0 @@ -load1: - - - Title: "Obtain the application document data" - Function: "loadTest" - Input: - APP_DOC_UID: "1" - Output: - Type: "array" -load2: - - - Title: "Obtain the application document data (not existent)" - Function: "loadTest" - Input: - APP_DOC_UID: "111111111111" - Output: - Type: "Exception" -create1: - - - Title: "Create the application document data" - Function: "createTest" - Input: - APP_DOC_UID: "2" - APP_UID: "2" - DEL_INDEX: "2" - DOC_UID: "2" - USR_UID: "2" - APP_DOC_TYPE: "INPUT" - APP_DOC_CREATE_DATE: "2007-12-31 23:59:59" - APP_DOC_TITLE: "APP_DOC_TITLE" - APP_DOC_COMMENT: "APP_DOC_COMMENT" - APP_DOC_FILENAME: "APP_DOC_FILENAME" - Output: - Type: "integer" -create2: - - - Title: "Create the application document data (whit incomplete data)" - Function: "createTest" - Input: - APP_DOC_UID: "" - APP_UID: "2" - DEL_INDEX: "2" - DOC_UID: "2" - USR_UID: "2" - APP_DOC_TYPE: "INPUT" - APP_DOC_CREATE_DATE: "2007-12-31 23:59:59" - APP_DOC_TITLE: "APP_DOC_TITLE" - APP_DOC_COMMENT: "APP_DOC_COMMENT" - APP_DOC_FILENAME: "APP_DOC_FILENAME" - Output: - Type: "Exception" -update1: - - - Title: "Update the application document data" - Function: "updateTest" - Input: - APP_DOC_UID: "1" - APP_UID: "2" - DEL_INDEX: "2" - DOC_UID: "2" - USR_UID: "2" - APP_DOC_TYPE: "OUTPUT" - APP_DOC_CREATE_DATE: "2008-01-01 00:00:00" - APP_DOC_TITLE: "APP_DOC_TITLE1" - APP_DOC_COMMENT: "APP_DOC_COMMENT1" - APP_DOC_FILENAME: "APP_DOC_FILENAME1" - Output: - Type: "integer" -update2: - - - Title: "Update the application document data (not existent)" - Function: "updateTest" - Input: - APP_DOC_UID: "111111111111" - APP_UID: "2" - DEL_INDEX: "2" - DOC_UID: "2" - USR_UID: "2" - APP_DOC_TYPE: "OUTPUT" - APP_DOC_CREATE_DATE: "2008-01-01 00:00:00" - APP_DOC_TITLE: "APP_DOC_TITLE1" - APP_DOC_COMMENT: "APP_DOC_COMMENT1" - APP_DOC_FILENAME: "APP_DOC_FILENAME1" - Output: - Type: "Exception" -remove1: - - - Title: "Remove the application document data" - Function: "removeTest" - Input: - APP_DOC_UID: "2" - Output: - Type: "NULL" -remove2: - - - Title: "Remove the application document data (not existent)" - Function: "removeTest" - Input: - APP_DOC_UID: "111111111111" - Output: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/application.yml b/workflow/engine/test/fixtures/application.yml deleted file mode 100644 index 8e37444ac..000000000 --- a/workflow/engine/test/fixtures/application.yml +++ /dev/null @@ -1,10 +0,0 @@ -fields: - PRO_UID: '346FAE3953CC69' - APP_PARENT: '' - APP_STATUS: 'DRAFT' - APP_PROC_STATUS: 'STATUS' - APP_PROC_CODE: '12345678' - APP_PARALLEL: 'N' - APP_INIT_USER: 'ABC123' - APP_CUR_USER: 'ABC123' - \ No newline at end of file diff --git a/workflow/engine/test/fixtures/applicationInput.yml b/workflow/engine/test/fixtures/applicationInput.yml deleted file mode 100644 index 2412268a8..000000000 --- a/workflow/engine/test/fixtures/applicationInput.yml +++ /dev/null @@ -1,75 +0,0 @@ -FirstStepTestCases: - - - Title: "@#Function(): Create some non Parallel Cases" - Class: "applicationTest" - Instance: $obj - Function: "SaveTest" - Input: - PRO_UID: "8475E6C841051A" - APP_PARALLEL: "N" - APP_INIT_USER: "@G::generateUniqueID()" - APP_CUR_USER: "@G::generateUniqueID()" - APP_CREATE_DATE: "@date(Y-m-d)" - APP_INIT_DATE: "0000-00-00" - APP_FINISH_DATE: "0000-00-00" - APP_UPDATE_DATE: "@date(Y-m-d)" - APP_STATUS[]:"*.nonParallelStatus.applicationInput" - APP_PARENT: "0" - APP_PROC_STATUS: "" - APP_PROC_CODE: "" - Output: - Type: "string" - - - Title: "@#Function(): Create one parallel Case (Force to be parallel)" - Class: "applicationTest" - Instance: $obj - Function: "SaveTest" - Input: - PRO_UID: "8475E6C841051A" - APP_PARALLEL: "Y" - APP_STATUS: "PARALLEL" - APP_PARENT: "0" - APP_PROC_STATUS: "" - APP_PROC_CODE: "" - APP_INIT_USER: "@G::generateUniqueID()" - APP_CUR_USER: "@G::generateUniqueID()" - APP_CREATE_DATE: "@date(Y-m-d)" - APP_INIT_DATE: "0000-00-00" - APP_FINISH_DATE: "0000-00-00" - Output: - Type: "string" -SecondStepTestCases: - - - Title: "@#Function(): Update one of LastCreatedCases with all diferent types of status" - Class: "applicationTest" - Instance: $obj - Function: "UpdateTest" - Input: - PRO_UID: "8475E6C841051A" - APP_UID[]: "LAST_CREATED_CASE" - APP_STATUS[]: "*.APP_STATUS.pm" - Output: - Type: "string" - - - Title: "@#Function(): Loads all LastCreatedCases" - Class: "applicationTest" - Instance: $obj - Function: "LoadTest" - Input: - PRO_UID: "8475E6C841051A" - APP_UID[]: "*.LAST_CREATED_CASE" - Output: - Type: "NULL" - - - Title: "@#Function(): Delete all LastCreatedCases" - Class: "applicationTest" - Instance: $obj - Function: "DeleteTest" - Input: - PRO_UID: "8475E6C841051A" - APP_UID[]: "*.LAST_CREATED_CASE" - Output: - Type: "NULL" -nonParallelStatus: - - "DRAFT" - - "CANCEL" \ No newline at end of file diff --git a/workflow/engine/test/fixtures/configuration.yml b/workflow/engine/test/fixtures/configuration.yml deleted file mode 100644 index d06de134f..000000000 --- a/workflow/engine/test/fixtures/configuration.yml +++ /dev/null @@ -1,47 +0,0 @@ -CreateTestConfigurations: - - - Title:"Creating new Configurations" - Function:"CreateConfiguration" - Input: - CFG_UID[]:"guid.pm" - OBJ_UID[]:"guid.pm" - PRO_UID[]:"guid.pm" - USR_UID[]:"guid.pm" - APP_UID:"" - Output: - Value: 1 -ConfigurationUnitTest: - - - Title:"Updating Configurations" - Function:"UpdateConfiguration" - Input: - CFG_UID[]:"CREATED_UID" - OBJ_UID[]:"CREATED_OBJ" - PRO_UID[]:"CREATED_PRO" - USR_UID[]:"CREATED_USR" - APP_UID:"" - CFG_VALUE[]:"*.text.es" - Output: - Value: 1 - - - Title:"Loading Configurations" - Function:"LoadConfiguration" - Input: - CFG_UID[]:"CREATED_UID" - OBJ_UID[]:"CREATED_OBJ" - PRO_UID[]:"CREATED_PRO" - USR_UID[]:"CREATED_USR" - APP_UID:"" - Output: - Type: "array" - - - Title:"Removing Configurations" - Function:"RemoveConfiguration" - Input: - CFG_UID[]:"CREATED_UID" - OBJ_UID[]:"CREATED_OBJ" - PRO_UID[]:"CREATED_PRO" - USR_UID[]:"CREATED_USR" - APP_UID:"" - Output: - Type: "NULL" diff --git a/workflow/engine/test/fixtures/content.yml b/workflow/engine/test/fixtures/content.yml deleted file mode 100644 index bc2b82b83..000000000 --- a/workflow/engine/test/fixtures/content.yml +++ /dev/null @@ -1,71 +0,0 @@ -loadContent: - - - Title: "LoadContent method" - Function: "loadContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '6475576C725EA4' - CON_LANG: 'it' - CON_VALUE: 'Content Example' - Output: - Type: "string" -deleteContent: - - - Title: "delete a row " - Function: "deleteContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '6475576C725EA4' - CON_LANG: 'it' - Output: - Type: "NULL" - - - Title: "delete a row " - Function: "deleteContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '9876543210' - CON_LANG: 'it' - Output: - Type: "NULL" -addContent1: - - - Title: "addContent method, calling the first time" - Function: "addContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '9876543210' - CON_LANG: 'it' - CON_VALUE: 'addContent method, calling the first time' - Output: - Type: integer -addContentTwice: - - - Title: "validate duplicate row, with the addContent method" - Function: "addContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '9876543210' - CON_LANG: 'it' - CON_VALUE: 'validate duplicate row, now update the row' - Output: - Type: "integer" -addContentAcentos: - - - Title: "add content with acentos" - Function: "addContent" - Input: - CON_CATEGORY: 'ABC_CATEGORY' - CON_PARENT: '1234567890' - CON_ID: '6475576C725EA4' - CON_LANG: 'it' - CON_VALUE: 'áéíóúñÑ' - Output: - Type: "integer" - - \ No newline at end of file diff --git a/workflow/engine/test/fixtures/departments.txt b/workflow/engine/test/fixtures/departments.txt deleted file mode 100644 index e1ba14ee0..000000000 --- a/workflow/engine/test/fixtures/departments.txt +++ /dev/null @@ -1,34 +0,0 @@ -ExecutivePresident| -Marketing|ExecutivePresident -SalesDivision|ExecutivePresident -RiskManager|Sales -NationalSales|Sales -InternationalSales|Sales -EuropeSales|InternationalSales -USASales|InternationalSales -JapanSales|InternationalSales -InternetSales|Sales -AdministrativeDivision|ExecutivePresident -Accounting|AdministrativeDivision -HumanResources|AdministrativeDivision -InfraestructureManagement|AdministrativeDivision -Facilities|InfraestructureManagement -VehicleMaintenance|InfraestructureManagement -InvestigativeDivision|ExecutivePresident -Legal|InvestigativeDivision -DetectiveSection|InvestigativeDivision -Records|InvestigativeDivision -EuropeRegional| -SupportServiceDivision|ExecutivePresident -InformationDesk|SupportServiceDivision -TechnologicalResearch|SupportServiceDivision -Landlinetelephony|SupportServiceDivision -MobileServices|SupportServiceDivision -FinanceDivision|ExecutivePresident -PlanningandResearch|FinanceDivision -DeputyDirector|FinanceDivision -OperacionDivision|ExecutivePresident -SystemAdministration|OperacionDivision -SecurityOfficer|OperacionDivision -OperationandBusiness|OperacionDivision -SpecialOperations|OperationandBusiness \ No newline at end of file diff --git a/workflow/engine/test/fixtures/derivation.yml b/workflow/engine/test/fixtures/derivation.yml deleted file mode 100644 index e42e2fdd7..000000000 --- a/workflow/engine/test/fixtures/derivation.yml +++ /dev/null @@ -1,28 +0,0 @@ -StartCase1: - - - Title: "Start a new application @#Function()" - Function: "StartCaseTest" - Input: - TAS_UID: "4475E6C8E10346" - USR_UID: "4475E6E07C261E" - firstname[]: "@@SYS_LANG" - lastname[]: "last.name.es" - Output: - Type: "array" -StartCase2: - - - Title: "Start a new application (pseudo derivate)" - Function: "StartCaseTest" - Input: - TAS_UID: "4475E6C8E10346" - USR_UID: "4475E6E07C261E" - Output: - Type: "array" -DeleteCreatedApplications: - - - Title: "Delete created applications" - Function: "DeleteCase" - Input: - APP_UID[]: "*.CREATED_APPLICATIONS" - Output: - Type: "array" diff --git a/workflow/engine/test/fixtures/domain.yml b/workflow/engine/test/fixtures/domain.yml deleted file mode 100644 index d76cccb7a..000000000 --- a/workflow/engine/test/fixtures/domain.yml +++ /dev/null @@ -1,34 +0,0 @@ -pm: - APP_STATUS: - - "DRAFT" - - "CANCEL" - - "PARALLEL" - DEL_TYPE: - - "NORMAL" - DEL_THREAD_STATUS: - - "OPEN" - - "CLOSED" - yesno: - - "Y" - - "N" - guid: - - "@G::generateUniqueID()" - stepUidObj: - - "DYNAFORM" - - "INPUT_DOCUMENT" - - "MESSAGE" - - "OUTPUT_DOCUMENT" -date: - today: - - "@date(Y-m-d)" -time: - today: - - "@date(H:i:s)" -datetime: - today: - - "@date(Y-m-d H:i:s)" -number: - percentage: - - "@eval(return rand(0,100\))" - rand: - -"@rand()" diff --git a/workflow/engine/test/fixtures/es.yml b/workflow/engine/test/fixtures/es.yml deleted file mode 100644 index bc74ef1e1..000000000 --- a/workflow/engine/test/fixtures/es.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: - first: - - David - - Julio - - Mauricio - - Wilmer - - Fernando - - Hugo - - Ramiro - last: - - Callizaya - - Avendaño - - Veliz - - Maborak - - Ontiveros - - Loza - - Cuentas - group: - - Administración - - Consultores - - Desarrollo - - Gerencia - - Ventas - - Business Development - - Redes y Servidores - - Soporte y Entrenamiento - - Otros -text: - - ¿Por qué la ciencia se empeña en comprender el universo si todavia no comprende al ser humano? - - Tengo una demostración maravillosa... - - La ciencia es la verdadera sabiduría. - - El verdadero amante de la vida es el cientifico, pues es el único que se ocupa de descubrir sus misterios. - - El conocimiento es patrimonio de la humanidad, no es solo tuyo, trasmítelo para beneficio de toda la humanidad. - - La ciencia es la necesidad de demostrar lo que nos acontece. - - Cada uno de nosotros es un modelo totalmente nuevo, parecido a otros modelos pero totalmente diferente. - - ¿Por qué las moras negras están rojas cuando están verdes? - - La ciencia es la manera estadísticamente correcta de contar novelas. - - La ciencia de vivir es el arte de amar. - - La ciencia es la explicación de lo inexplicable. - - Un ser humano es algo más que la suma de sus genes. - - La ciencia es el idioma del hombre. - - La ciencia me dió lo que soy, un buen hombre. La ciencia me ayudará a ayudar a las personas. - - Para ser científico debo afirmar lo que veo y negar lo que creo. - - La ciencia es el arte de bosquejar para los demás los fenómenos de la naturaleza... - - La ciencia es el instrumento más poderoso de la humanidad. -html: - - "

 Hola Mundo!!

" - - "

 áéíóú

" - - "

'hola Mundo!!'

" -email: - - "davidsantos@colosa.com" - - "juliocesar@colosa.com" - - "mauricio@colosa.com" - - "wilmer@colosa.com" -address: - - "Dom - 2453416 Dom. Padres" -zip: - - "00000" - - "52412" diff --git a/workflow/engine/test/fixtures/firstname.txt b/workflow/engine/test/fixtures/firstname.txt deleted file mode 100644 index af7a40551..000000000 --- a/workflow/engine/test/fixtures/firstname.txt +++ /dev/null @@ -1,501 +0,0 @@ - -Amy -Sidney -Matt -Robert -Michael -Josh -Lori -Dorothy -Tavon -Corey -Clarissa -Tony -Terry -Arlene -Alex -Jim -mike -max -Jacob -Armand -Joshua -Ava -Olivia -Sophia -William -Christopher -Matthew -Samantha -Andrew -Joseph -David -Alexis -Alyssa -James -Ryan -Ella -Sarah -Taylor -Lily -Benjamin -Nathan -Ulices -Grace -Brianna -Gavin -Dylan -Brandon -Caleb -Mason -Angel -Isaac -Evan -Jack -Kevin -Jose -Isaiah -Luke -Landon -Justin -Lucas -Zachary -Jordan -Arthur -Aaron -Brayden -Thomas -Cameron -Hunter -Austin -Adrian -Connor -Owen -Aidan -Jason -Julian -Wyatt -Charles -Carter -Juan -Chase -Diego -Jeremiah -Brody -Xavier -Adam -Sebastian -Haydens -Nathaniel -Jesus -Ian -Tristan -Bryan -Sean -Cole -Jennifer -Melanie -Gianna -Charlotte -Paige -Isabel -Gracie -Haley -Mya -Michelle -Molly -Stephanie -Nicole -Jenna -Natalia -Sadie -Jada -Ruby -Jayla -Lydia -Bella -Haydden -Miley -Laila -Reagan -Collin -Gage -Emmanuel -Kendall -Liliana -Jacqueline -Reese -Marissa -Juliana -Tanner -Malachi -Fernando -Cesar -Javier -Miles -Jaiden -Edwin -Travis -Bryson -Jace -Kaiden -Wesley -Jeffrey -Roman -Brendan -Maddox -Donovan -Rylan -Dalton -Harrison -Andre -Keegan -Sawyer -Clayton -Zane -Gregory -Rafael -Ezekiel -Griffin -ny -Mateo -Braylon -Cash -Maximus -Simon -Corbin -Brennan -Skylers -Xander -Jaxson -Kameron -Kyler -Elias -Harper -Ivy -Camille -Savanna -Emely -Kiley -Kailey -Miriam -Rihanna -Georgia -Harmony -Kiera -Monica -Bethany -Kaylie -Camron -Alice -Maddison -Ximena -April -Marely -Julie -Danica -Presley -Brielle -Julissa -Angie -Hazel -Rose -Malia -Shayla -Fiona -Phoebe -Nayeli -Jaya -Ruth -Janiya -Denise -Holly -Hanna -Tatum -Marlee -Nataly -Lizbeth -Serena -Anya -Jaslene -Kaylin -Greyson -Jameson -Everett -Jayce -Darren -Elliott -Uriel -Hugo -Marshall -Nickolas -Bryant -Maurice -Russell -Leland -Davis -Reed -Kade -Reece -Morgan -Ramon -Rocco -Orlando -Ryker -Brodie -Paxton -Jacoby -Macie -Lyric -Logan -Lana -Kaned -Alvin -Shaun -Eddie -Kane -Davion -Zachariah -Dorian -Kellen -Micaela -Isiah -Javon -Nasir -Milo -Anahi -Alissa -Anaya -Ainsley -Noelle -Meredith -Kailyn -Johanna -Evangeline -Kathleen -Juliet -Meghan -Paisley -Athena -Hailee -Emilee -Sage -Alanna -Elaina -Nia -Kasey -Paris -Casey -Dana -Aubrie -Kaitlin -Norah -Lauryn -Perla -Amiyah -Lillie -Danika -Heather -Kassidy -Taryn -Tori -Francesca -Kristen -Amya -Elle -Craig -Ibrahim -Osvaldo -Wade -Harley -Steve -Davin -Deshawn -Kason -Damion -Jaylon -Jefferson -Aron -Brooks -Darian -Gerald -Rolando -Terrence -Enzo -Kian -Ryland -Barrett -Jaeden -Ben -Bradyn -Giovani -Blaine -Madden -Jerome -Muhamma -Ronnie -Layne -Kolby -Leonard -Vicente -Cale -Alessandro -Zachery -Gavyn -Aydin -Xzavier -Malakai -Raphael -Cannon -Rudy -Asa -Darrell -Giancarlo -Elisha -Junior -Zackery -Alvaro -Lewis -Valentin -Deacon -Jase -Harry -Rashad -Finnegan -Mohammed -Ramiro -Cedric -Brennen -Santino -Stanley -Tyrone -Chace -Francis -athon -Teagan -Zechariah -Alonso -Kaeden -Kamden -Gilberto -Ray -Karter -Luciano -Nico -Kole -Aryan -Draven -Jamie -Misael -Lee -Alexzanders -Camren -Giovanny -Amare -Rhett -Rhys -Rodolfo -Nash -Markus -Deven -Mohammad -Moshe -Quintin -Dwayne -Memphis -Atticus -Davian -Eugene -Jax -Antoine -Wayne -Randall -Semaj -Uriah -Clark -Aidyn -Jorden -Maxim -Aditya -Lawson -Messiah -Korbin -Sullivan -Freddy -Demarcus -Neil -Brice -King -Davon -Elvis -Ace -Dexter -Heath -Duncan -Jamar -Sincere -Irvin -Remingtons -Kadin -Soren -Tyree -Damarion -Talan -Adrien -Gilbert -Keenan -Darnell -Adolfo -Tristian -Derick -Isai -Rylee -Gauge -Harold -Kareem -Deangelo -Agustin -Coleman -Zavier -Lamar -Emery -Jaydin -Devan -Jordyn -Mathias -Prince -Seamus -Jasiah -Efrain -Darryl -Arjun -Miguel -Roland -Conrad -Kamron -Hamza -Santos -Frankie -Dominique -Marley -Vance -Dax -Jamir -Kylan -Todd -Maximo -Jabari -Matthias -Haiden -Luka -Marcelo -Keon -Layton -Tyrell -Kash -Laney -Isis -Marcela -Dave -Amos -Grover \ No newline at end of file diff --git a/workflow/engine/test/fixtures/fixtures.yml b/workflow/engine/test/fixtures/fixtures.yml deleted file mode 100644 index 532b28453..000000000 --- a/workflow/engine/test/fixtures/fixtures.yml +++ /dev/null @@ -1,29 +0,0 @@ -- - input: '/test' - output: true - comment: isPathAbsolute() returns true if path is absolute -- - input: '\\test' - output: true - comment: isPathAbsolute() returns true if path is absolute -- - input: 'C:\\test' - output: true - comment: isPathAbsolute() returns true if path is absolute -- - input: 'd:/test' - output: true - comment: isPathAbsolute() returns true if path is absolute -- - input: 'test' - output: false - comment: isPathAbsolute() returns false if path is relative -- - input: '../test' - output: false - comment: isPathAbsolute() returns false if path is relative -- - input: '..\\test' - output: false - comment: isPathAbsolute() returns false if path is relative - \ No newline at end of file diff --git a/workflow/engine/test/fixtures/groupUser.yml b/workflow/engine/test/fixtures/groupUser.yml deleted file mode 100644 index 96cee81d8..000000000 --- a/workflow/engine/test/fixtures/groupUser.yml +++ /dev/null @@ -1,36 +0,0 @@ -create1: - - - Title: "Create the group user row" - Function: "createTest" - Input: - GRP_UID: "2" - USR_UID: "2" - input: - Type: "integer" -create2: - - - Title: "Create the group user row (whit incomplete data)" - Function: "createTest" - Input: - GRP_UID: "" - USR_UID: "2" - input: - Type: "Exception" -remove1: - - - Title: "Remove the group user row" - Function: "removeTest" - Input: - GRP_UID: "2" - USR_UID: "2" - input: - Type: "NULL" -remove2: - - - Title: "Remove the group user row (not existent)" - Function: "removeTest" - Input: - GRP_UID: "111111111111" - USR_UID: "222222222222" - input: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/groups.txt b/workflow/engine/test/fixtures/groups.txt deleted file mode 100644 index d590c6548..000000000 --- a/workflow/engine/test/fixtures/groups.txt +++ /dev/null @@ -1,32 +0,0 @@ -Marketing Users -Operators -Accounters -Lawyers -Operators -Salespersons -Team A -Team B -Team C -Team D -Team E -Team F -Team G -Team H -Team I -Team J -Team K -Team L -Team M -Team N -Team O -Team P -Team Q -Team R -Team S -Team T -Team U -Team V -Team W -Team X -Team Y -Team Z diff --git a/workflow/engine/test/fixtures/inputDocument.yml b/workflow/engine/test/fixtures/inputDocument.yml deleted file mode 100644 index 37ed10add..000000000 --- a/workflow/engine/test/fixtures/inputDocument.yml +++ /dev/null @@ -1,88 +0,0 @@ -load1: - - - Title: "Obtain the input document data" - Function: "loadTest" - Input: - INP_DOC_UID: "1" - input: - Type: "array" -load2: - - - Title: "Obtain the input document data (not existent)" - Function: "loadTest" - Input: - INP_DOC_UID: "111111111111" - input: - Type: "Exception" -create1: - - - Title: "Create the input document data" - Function: "createTest" - Input: - INP_DOC_UID: "2" - PRO_UID: "2" - INP_DOC_FORM_NEEDED: "VREAL" - INP_DOC_ORIGINAL: "ORIGINAL" - INP_DOC_PUBLISHED: "PUBLIC" - INP_DOC_TITLE: "INP_DOC_TITLE" - INP_DOC_DESCRIPTION: "INP_DOC_DESCRIPTION" - input: - Type: "integer" -create2: - - - Title: "Create the input document data (whit incomplete data)" - Function: "createTest" - Input: - INP_DOC_UID: "" - PRO_UID: "2" - INP_DOC_FORM_NEEDED: "VREAL" - INP_DOC_ORIGINAL: "ORIGINAL" - INP_DOC_PUBLISHED: "PUBLIC" - INP_DOC_TITLE: "INP_DOC_TITLE" - INP_DOC_DESCRIPTION: "INP_DOC_DESCRIPTION" - input: - Type: "Exception" -update1: - - - Title: "Update the input document data" - Function: "updateTest" - Input: - INP_DOC_UID: "1" - PRO_UID: "2" - INP_DOC_FORM_NEEDED: "VREAL" - INP_DOC_ORIGINAL: "ORIGINAL" - INP_DOC_PUBLISHED: "PUBLIC" - INP_DOC_TITLE: "INP_DOC_TITLE1" - INP_DOC_DESCRIPTION: "INP_DOC_DESCRIPTION1" - input: - Type: "integer" -update2: - - - Title: "Update the input document data (not existent)" - Function: "updateTest" - Input: - INP_DOC_UID: "111111111111" - PRO_UID: "2" - INP_DOC_FORM_NEEDED: "VREAL" - INP_DOC_ORIGINAL: "ORIGINAL" - INP_DOC_PUBLISHED: "PUBLIC" - INP_DOC_TITLE: "INP_DOC_TITLE1" - INP_DOC_DESCRIPTION: "INP_DOC_DESCRIPTION1" - input: - Type: "Exception" -remove1: - - - Title: "Remove the input document data" - Function: "removeTest" - Input: - INP_DOC_UID: "2" - input: - Type: "NULL" -remove2: - - - Title: "Remove the input document data (not existent)" - Function: "removeTest" - Input: - INP_DOC_UID: "111111111111" - input: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/lastname.txt b/workflow/engine/test/fixtures/lastname.txt deleted file mode 100644 index 8aca0d14a..000000000 --- a/workflow/engine/test/fixtures/lastname.txt +++ /dev/null @@ -1,222 +0,0 @@ -Agnes -Ahearn -Amadon -Anderson -Arbouet -Arinello -Austin -Balisi -barkle -Barrett -Basili -Beam -Beccia -Bechtel -Bendis -Bittner -Bittner -Black -Blackshear -Boria -Bosworth -Bourgeous -Broderick -Brown -Brule -Burns -Cagley -Champagne -Charette -Ching -Ciarleglio -Cifrino -Cifuni -Cleveland -Cole -Connelly -Connolly -Corleone -Cook -Corey -Corey -Cowell -Creelman -Cremins -Crowley -Daley -Debrosse -Debrosse-Saint-Louis -Deleskey -Demers -Dempsey -Diehl -Dobbie -Dockstader -Doe -Downey -Dribin -Ducharme -Duphily -Eckstein -Ericson -Evans -Fabel -Farrell -Favreau -Favreau -Foley -Follett -Forrest -Gack -Galorath -Garmus -Gehly -Gendron -Gladney -Glanville -Goldsmith -Gottesdiener -Grealish -Haaigis -Hacker -Hacker-LeCount -Haddad -Haigis -Hamel -Harrington -Henderson -Hennessey -Herron -Hessmiller -Hill -Hillier -Hobbs -Hobbs -Hobbs -Ierardi -Isaacs -Jones -Kappelman -Karem -Karten -Keith -Kelly -Kenny -Killilea -Krasner -LaFrance -Lawhorn -Layman -LeBlanc -Legarz -Leo -Leonard -Lewis -Lokinger -Lovering -Lusk -MacDonald -Maciewicz -Maguire -Mahoney -Mariani -McCarthy -McCauley -McDonald -McGarry -McMahon -Menard -Minkiewicz -Moe -Morrison -Motyka -Murphy -Nemes -Newman -Newman -Nickels -Nye -Nyman -OConnor -Orr -Palmer-Erbs -Palmieri -Panagiotes -Parker -Parks -Parks -Pelletier -PelletierRutkowski -Penn -Peters -Pfannkoch -Pinchera -Planansky -Plasse -Poillucci -Pomerleau -Potter -Powers -Primas -Pritchard -Quenga -Rancourt -Rearick -Reifer -Rice -rogers -Rooney -Rosoff -Roy -Ruhe -Russac -Russell -Ryan -Sahely -Sak -Salvaggio -Santiano -Sassenburg -Scanlon -Schall -Scopetski -Searfos -Sergio -Sergio -Shapiro -Sharpe -Silck -Silveri -Simmons -Simons -Skirvin-Leclair -Smalarz -Smith -Smith-Burke -Sullivan -Swansburg -Sweeney -Talley -Taylor -Tebbetts -Thaxton -Tiberio -tillman -Tilton(Cuttino) -Toronto -Tull -Vernon -VonHalle -Walendziewicz -Walker -Walsh -Wei -Welsh -Wiegers -Wilkins -Williams -Wright -Wyron -Young -Yourdon -Zentis \ No newline at end of file diff --git a/workflow/engine/test/fixtures/outputDocument.yml b/workflow/engine/test/fixtures/outputDocument.yml deleted file mode 100644 index 8b124b8a7..000000000 --- a/workflow/engine/test/fixtures/outputDocument.yml +++ /dev/null @@ -1,84 +0,0 @@ -load1: - - - Title: "Obtain the output document data" - Function: "loadTest" - Input: - OUT_DOC_UID: "1" - Output: - Type: "array" -load2: - - - Title: "Obtain the output document data (not existent)" - Function: "loadTest" - Input: - OUT_DOC_UID: "111111111111" - Output: - Type: "Exception" -create1: - - - Title: "Create the output document data" - Function: "createTest" - Input: - OUT_DOC_UID: "2" - PRO_UID: "2" - OUT_DOC_TITLE: "OUT_DOC_TITLE" - OUT_DOC_DESCRIPTION: "OUT_DOC_DESCRIPTION" - OUT_DOC_FILENAME: "OUT_DOC_FILENAME" - OUT_DOC_TEMPLATE: "OUT_DOC_TEMPLATE" - Output: - Type: "integer" -create2: - - - Title: "Create the output document data (whit incomplete data)" - Function: "createTest" - Input: - OUT_DOC_UID: "" - PRO_UID: "2" - OUT_DOC_TITLE: "OUT_DOC_TITLE" - OUT_DOC_DESCRIPTION: "OUT_DOC_DESCRIPTION" - OUT_DOC_FILENAME: "OUT_DOC_FILENAME" - OUT_DOC_TEMPLATE: "OUT_DOC_TEMPLATE" - Output: - Type: "Exception" -update1: - - - Title: "Update the output document data" - Function: "updateTest" - Input: - OUT_DOC_UID: "1" - PRO_UID: "2" - OUT_DOC_TITLE: "OUT_DOC_TITLE1" - OUT_DOC_DESCRIPTION: "OUT_DOC_DESCRIPTION1" - OUT_DOC_FILENAME: "OUT_DOC_FILENAME1" - OUT_DOC_TEMPLATE: "OUT_DOC_TEMPLATE1" - Output: - Type: "integer" -update2: - - - Title: "Update the output document data (not existent)" - Function: "updateTest" - Input: - OUT_DOC_UID: "111111111111" - PRO_UID: "2" - OUT_DOC_TITLE: "OUT_DOC_TITLE1" - OUT_DOC_DESCRIPTION: "OUT_DOC_DESCRIPTION1" - OUT_DOC_FILENAME: "OUT_DOC_FILENAME1" - OUT_DOC_TEMPLATE: "OUT_DOC_TEMPLATE1" - Output: - Type: "Exception" -remove1: - - - Title: "Remove the output document data" - Function: "removeTest" - Input: - OUT_DOC_UID: "2" - Output: - Type: "NULL" -remove2: - - - Title: "Remove the output document data (not existent)" - Function: "removeTest" - Input: - OUT_DOC_UID: "111111111111" - Output: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/processMap.yml b/workflow/engine/test/fixtures/processMap.yml deleted file mode 100644 index ed03fa1a9..000000000 --- a/workflow/engine/test/fixtures/processMap.yml +++ /dev/null @@ -1,494 +0,0 @@ -load1: - - - Title: "Obtain the processmap data" - Function: "loadTest" - Input: - PRO_UID: "1" - Output: - Type: "string" -load2: - - - Title: "Obtain the processmap data (not existent)" - Function: "loadTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -createProcess1: - - - Title: "Create a process" - Function: "createProcessTest" - Input: - USR_UID: "1" - Output: - Type: "boolean" -updateProcess1: - - - Title: "Update a process" - Function: "updateProcessTest" - Input: - PRO_UID: "1" - PRO_TITLE_X: 100 - PRO_TITLE_Y: 100 - Output: - Type: "integer" -updateProcess2: - - - Title: "Update a process (not existent)" - Function: "updateProcessTest" - Input: - PRO_UID: "111111111111" - PRO_TITLE_X: 100 - PRO_TITLE_Y: 100 - Output: - Type: "Exception" -editProcess1: - - - Title: "Edit the process info" - Function: "editProcessTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -editProcess2: - - - Title: "Edit the process info (not existent)" - Function: "editProcessTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -saveTitlePosition1: - - - Title: "Save the title position" - Function: "saveTitlePositionTest" - Input: - PRO_UID: "1" - PRO_X: 100 - PRO_Y: 100 - Output: - Type: "boolean" -saveTitlePosition2: - - - Title: "Save the title position (not existent)" - Function: "saveTitlePositionTest" - Input: - PRO_UID: "111111111111" - PRO_X: 100 - PRO_Y: 100 - Output: - Type: "Exception" -steps1: - - - Title: "Show the task steps" - Function: "stepsTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - Output: - Type: "boolean" -steps2: - - - Title: "Show the task steps (not existent)" - Function: "stepsTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - Output: - Type: "Exception" -users1: - - - Title: "Show the task users" - Function: "usersTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - Output: - Type: "boolean" -users2: - - - Title: "Show the task users (not existent)" - Function: "usersTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - Output: - Type: "Exception" -stepsConditions1: - - - Title: "Show the step conditions of the task" - Function: "stepsConditionsTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - Output: - Type: "boolean" -stepsConditions2: - - - Title: "Show the step conditions of the task (not existent)" - Function: "stepsConditionsTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - Output: - Type: "Exception" -stepsTriggers1: - - - Title: "Show the step triggers of the task" - Function: "stepsTriggersTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - Output: - Type: "boolean" -stepsTriggers2: - - - Title: "Show the step triggers of the task (not existent)" - Function: "stepsTriggersTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - Output: - Type: "Exception" -addTask1: - - - Title: "Add a task to process" - Function: "addTaskTest" - Input: - PRO_UID: "1" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "boolean" -addTask2: - - - Title: "Add a task to process (not existent)" - Function: "addTaskTest" - Input: - PRO_UID: "111111111111" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "Exception" -editTaskProperties1: - - - Title: "Edit the task properties" - Function: "editTaskPropertiesTest" - Input: - TAS_UID: "1" - iForm: 1 - iIndex: 0 - Output: - Type: "boolean" -editTaskProperties2: - - - Title: "Edit the task properties (not existent)" - Function: "editTaskPropertiesTest" - Input: - TAS_UID: "111111111111" - iForm: 1 - iIndex: 0 - Output: - Type: "Exception" -saveTaskPosition1: - - - Title: "Save the task position" - Function: "saveTaskPositionTest" - Input: - TAS_UID: "1" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "integer" -saveTaskPosition2: - - - Title: "Save the task position (not existent)" - Function: "saveTaskPositionTest" - Input: - TAS_UID: "111111111111" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "Exception" -deleteTask1: - - - Title: "Delete a task" - Function: "deleteTaskTest" - Input: - TAS_UID: "1" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "boolean" -deleteTask2: - - - Title: "Delete a task (not existent)" - Function: "deleteTaskTest" - Input: - TAS_UID: "111111111111" - TAS_X: 100 - TAS_Y: 100 - Output: - Type: "Exception" -addGuide1: - - - Title: "Add a new guide" - Function: "addGuideTest" - Input: - PRO_UID: "1" - iPosition: 100 - sDirection: "vertical" - Output: - Type: "string" -addGuide2: - - - Title: "Add a new guide (not existent)" - Function: "addGuideTest" - Input: - PRO_UID: "111111111111" - iPosition: 100 - sDirection: "vertical" - Output: - Type: "Exception" -saveGuidePosition1: - - - Title: "Save de guide position" - Function: "saveGuidePositionTest" - Input: - SWI_UID: "1" - iPosition: 100 - sDirection: "vertical" - Output: - Type: "integer" -saveGuidePosition2: - - - Title: "Save de guide position (not existent)" - Function: "saveGuidePositionTest" - Input: - SWI_UID: "111111111111" - iPosition: 100 - sDirection: "vertical" - Output: - Type: "Exception" -deleteGuide1: - - - Title: "Delete a guide" - Function: "deleteGuideTest" - Input: - SWI_UID: "1" - Output: - Type: "boolean" -deleteGuide2: - - - Title: "Delete a guide (not existent)" - Function: "deleteGuideTest" - Input: - SWI_UID: "111111111111" - Output: - Type: "Exception" -deleteGuides1: - - - Title: "Delete all guides" - Function: "deleteGuidesTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -deleteGuides2: - - - Title: "Delete all guides (not existent)" - Function: "deleteGuidesTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -updateText1: - - - Title: "Update a text" - Function: "updateTextTest" - Input: - SWI_UID: "1" - SWI_TEXT: "text1" - Output: - Type: "integer" -updateText2: - - - Title: "Update a text (not existent)" - Function: "updateTextTest" - Input: - SWI_UID: "111111111111" - SWI_TEXT: "text1" - Output: - Type: "Exception" -saveTextPosition1: - - - Title: "Update a text position" - Function: "saveTextPositionTest" - Input: - SWI_UID: "1" - SWI_X: 100 - SWI_Y: 100 - Output: - Type: "integer" -saveTextPosition2: - - - Title: "Update a text position (not existent)" - Function: "saveTextPositionTest" - Input: - SWI_UID: "111111111111" - SWI_X: 100 - SWI_Y: 100 - Output: - Type: "Exception" -deleteText1: - - - Title: "Delete a text" - Function: "deleteTextTest" - Input: - SWI_UID: "2" - Output: - Type: "boolean" -deleteText2: - - - Title: "Delete a text (not existent)" - Function: "deleteTextTest" - Input: - SWI_UID: "111111111111" - Output: - Type: "Exception" -dynaformsList1: - - - Title: "Show the dynaforms list" - Function: "dynaformsListTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -dynaformsList2: - - - Title: "Show the dynaforms list (not existent)" - Function: "dynaformsListTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -outputdocsList1: - - - Title: "Show the output documents list" - Function: "outputdocsListTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -outputdocsList2: - - - Title: "Show the output documents list (not existent)" - Function: "outputdocsListTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -inputdocsList1: - - - Title: "Show the input documents list" - Function: "inputdocsListTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -inputdocsList2: - - - Title: "Show the input documents list (not existent)" - Function: "inputdocsListTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -triggersList1: - - - Title: "Show the triggers list" - Function: "triggersListTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -triggersList2: - - - Title: "Show the triggers list (not existent)" - Function: "triggersListTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -messagesList1: - - - Title: "Show the messages list" - Function: "messagesListTest" - Input: - PRO_UID: "1" - Output: - Type: "boolean" -messagesList2: - - - Title: "Show the messages list (not existent)" - Function: "messagesListTest" - Input: - PRO_UID: "111111111111" - Output: - Type: "Exception" -currentPattern1: - - - Title: "Show the current pattern" - Function: "currentPatternTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - Output: - Type: "boolean" -currentPattern2: - - - Title: "Show the current pattern (not existent)" - Function: "currentPatternTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - Output: - Type: "Exception" -newPattern1: - - - Title: "New pattern" - Function: "newPatternTest" - Input: - PRO_UID: "1" - TAS_UID: "1" - ROU_NEXT_TASK: "2" - ROU_TYPE: "SEQUENTIAL" - Output: - Type: "boolean" -newPattern2: - - - Title: "New pattern (not existent)" - Function: "newPatternTest" - Input: - PRO_UID: "111111111111" - TAS_UID: "1" - ROU_NEXT_TASK: "2" - ROU_TYPE: "SEQUENTIAL" - Output: - Type: "Exception" -deleteDerivation1: - - - Title: "Delete a derivation rule" - Function: "deleteDerivationTest" - Input: - TAS_UID: "1" - Output: - Type: "boolean" -deleteDerivation2: - - - Title: "Delete a derivation rule (not existent)" - Function: "deleteDerivationTest" - Input: - TAS_UID: "111111111111" - Output: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/route.yml b/workflow/engine/test/fixtures/route.yml deleted file mode 100644 index cf7d98305..000000000 --- a/workflow/engine/test/fixtures/route.yml +++ /dev/null @@ -1,112 +0,0 @@ -load1: - - - Title: "Obtain the route data" - Function: "loadTest" - Input: - ROU_UID: "1" - Output: - Type: "array" -load2: - - - Title: "Obtain the route data (not existent)" - Function: "loadTest" - Input: - ROU_UID: "111111111111" - Output: - Type: "Exception" -create1: - - - Title: "Create the route data" - Function: "createTest" - Input: - ROU_UID: "2" - ROU_PARENT: "" - PRO_UID: "2" - TAS_UID: "2" - ROU_NEXT_TAK: "2" - ROU_CASE: "0" - ROU_TYPE: "SEQUENTIAL" - ROU_CONDITION: "" - ROU_TO_LAST_USER: "FALSE" - ROU_OPTIONAL: "FALSE" - ROU_SEND_EMAIL: "TRUE" - ROU_SOURCEANCHOR: "1" - ROU_TARGETANCHOR: "0" - Output: - Type: "integer" -create2: - - - Title: "Create the route data (whit incomplete data)" - Function: "createTest" - Input: - ROU_UID: "" - ROU_PARENT: "" - PRO_UID: "2" - TAS_UID: "2" - ROU_NEXT_TAK: "2" - ROU_CASE: "0" - ROU_TYPE: "SEQUENTIAL" - ROU_CONDITION: "" - ROU_TO_LAST_USER: "FALSE" - ROU_OPTIONAL: "FALSE" - ROU_SEND_EMAIL: "TRUE" - ROU_SOURCEANCHOR: "1" - ROU_TARGETANCHOR: "0" - Output: - Type: "Exception" -update1: - - - Title: "Update the route data" - Function: "updateTest" - Input: - ROU_UID: "1" - ROU_PARENT: "" - PRO_UID: "2" - TAS_UID: "2" - ROU_NEXT_TAK: "2" - ROU_CASE: "0" - ROU_TYPE: "SEQUENTIAL" - ROU_CONDITION: "" - ROU_TO_LAST_USER: "FALSE" - ROU_OPTIONAL: "FALSE" - ROU_SEND_EMAIL: "TRUE" - ROU_SOURCEANCHOR: "1" - ROU_TARGETANCHOR: "0" - Output: - Type: "integer" -update2: - - - Title: "Update the route data (not existent)" - Function: "updateTest" - Input: - ROU_UID: "111111111111" - ROU_PARENT: "" - PRO_UID: "2" - TAS_UID: "2" - ROU_NEXT_TAK: "2" - ROU_CASE: "0" - ROU_TYPE: "SEQUENTIAL" - ROU_CONDITION: "" - ROU_TO_LAST_USER: "FALSE" - ROU_OPTIONAL: "FALSE" - ROU_SEND_EMAIL: "TRUE" - ROU_SOURCEANCHOR: "1" - ROU_TARGETANCHOR: "0" - Output: - Type: "Exception" -remove1: - - - Title: "Remove the route data" - Function: "removeTest" - Input: - ROU_UID: "2" - Output: - Type: "NULL" -remove2: - - - Title: "Remove the route data (not existent)" - Function: "removeTest" - Input: - ROU_UID: "111111111111" - Output: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/step.yml b/workflow/engine/test/fixtures/step.yml deleted file mode 100644 index 3a51086f2..000000000 --- a/workflow/engine/test/fixtures/step.yml +++ /dev/null @@ -1,35 +0,0 @@ -CreateTestSteps: - - - Title:"Creating new Steps" - Function:"CreateStep" - Input: - PRO_UID[]:"guid.pm" - TAS_UID[]:"guid.pm" - Output: - Value: 1 -StepUnitTest: - - - Title:"Updating Steps" - Function:"UpdateStep" - Input: - STEP_UID[]:"*.CREATED" - PRO_UID[]:"guid.pm" - TAS_UID[]:"guid.pm" - STEP_OBJ_UID[]:"stepUidObj.pm" - STEP_POSITION[]:"rand.number" - Output: - Value: 1 - - - Title:"Loading Steps" - Function:"LoadStep" - Input: - STEP_UID[]:"*.CREATED" - Output: - Type: "array" - - - Title:"Removing Steps" - Function:"RemoveStep" - Input: - STEP_UID[]:"*.CREATED" - Output: - Type: "NULL" diff --git a/workflow/engine/test/fixtures/stepTrigger.yml b/workflow/engine/test/fixtures/stepTrigger.yml deleted file mode 100644 index 69a6c71b0..000000000 --- a/workflow/engine/test/fixtures/stepTrigger.yml +++ /dev/null @@ -1,43 +0,0 @@ -CreateTestSteps: - - - Title:"Creating new Steps" - Function:"CreateStep" - Input: - STEP_UID[]:"guid.pm" - TAS_UID[]:"guid.pm" - TRI_UID[]:"guid.pm" - ST_TYPE:"Step Type" - Output: - Value: 1 -StepUnitTest: - - - Title:"Updating Steps" - Function:"UpdateStep" - Input: - STEP_UID[]:"CREATED" - TAS_UID[]:"CREATED_TAS" - TRI_UID[]:"CREATED_TRI" - ST_TYPE[]:"CREATED_TYPE" - ST_CONDITION[]:"*.text.es" - Output: - Value: 1 - - - Title:"Loading Steps" - Function:"LoadStep" - Input: - STEP_UID[]:"CREATED" - TAS_UID[]:"CREATED_TAS" - TRI_UID[]:"CREATED_TRI" - ST_TYPE[]:"CREATED_TYPE" - Output: - Type: "array" - - - Title:"Removing Steps" - Function:"RemoveStep" - Input: - STEP_UID[]:"CREATED" - TAS_UID[]:"CREATED_TAS" - TRI_UID[]:"CREATED_TRI" - ST_TYPE[]:"CREATED_TYPE" - Output: - Type: "NULL" diff --git a/workflow/engine/test/fixtures/swimlanesElements.yml b/workflow/engine/test/fixtures/swimlanesElements.yml deleted file mode 100644 index b55875dd1..000000000 --- a/workflow/engine/test/fixtures/swimlanesElements.yml +++ /dev/null @@ -1,84 +0,0 @@ -load1: - - - Title: "Obtain the swimlane element data" - Function: "loadTest" - Input: - SWI_UID: "1" - input: - Type: "array" -load2: - - - Title: "Obtain the swimlane element data (not existent)" - Function: "loadTest" - Input: - SWI_UID: "111111111111" - input: - Type: "Exception" -create1: - - - Title: "Create the swimlane element data" - Function: "createTest" - Input: - SWI_UID: "2" - PRO_UID: "2" - SWI_TYPE: "LINE" - SWI_X: "100" - SWI_Y: "0" - SWI_TEXT: "SWI_TEXT" - input: - Type: "integer" -create2: - - - Title: "Create the swimlane element data (whit incomplete data)" - Function: "createTest" - Input: - SWI_UID: "" - PRO_UID: "2" - SWI_TYPE: "LINE" - SWI_X: "100" - SWI_Y: "0" - SWI_TEXT: "SWI_TEXT" - input: - Type: "Exception" -update1: - - - Title: "Update the swimlane element data" - Function: "updateTest" - Input: - SWI_UID: "1" - PRO_UID: "2" - SWI_TYPE: "LINE" - SWI_X: "100" - SWI_Y: "0" - SWI_TEXT: "SWI_TEXT1" - input: - Type: "integer" -update2: - - - Title: "Update the swimlane element data (not existent)" - Function: "updateTest" - Input: - SWI_UID: "111111111111" - PRO_UID: "2" - SWI_TYPE: "LINE" - SWI_X: "100" - SWI_Y: "0" - SWI_TEXT: "SWI_TEXT1" - input: - Type: "Exception" -remove1: - - - Title: "Remove the swimlane element data" - Function: "removeTest" - Input: - SWI_UID: "2" - input: - Type: "NULL" -remove2: - - - Title: "Remove the swimlane element data (not existent)" - Function: "removeTest" - Input: - SWI_UID: "111111111111" - input: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/task.yml b/workflow/engine/test/fixtures/task.yml deleted file mode 100644 index 6bb277c6f..000000000 --- a/workflow/engine/test/fixtures/task.yml +++ /dev/null @@ -1,32 +0,0 @@ -CreateTestTasks: - - - Title:"Creating new tasks" - Function:"CreateTask" - Input: - PRO_UID[]:"guid.pm" - Output: - Value: 1 -TaskUnitTest: - - - Title:"Updating tasks" - Function:"UpdateTask" - Input: - TAS_UID[]: "*.CREATED" - TAS_DESCRIPTION[]: "text.es" - TAS_TITLE[]: "*.html.es" - Output: - Value: 1 - - - Title:"Loading tasks" - Function:"LoadTask" - Input: - TAS_UID[]: "*.CREATED" - Output: - Type: "array" - - - Title:"Removing tasks" - Function:"RemoveTask" - Input: - TAS_UID[]: "*.CREATED" - Output: - Type: "NULL" diff --git a/workflow/engine/test/fixtures/taskUser.yml b/workflow/engine/test/fixtures/taskUser.yml deleted file mode 100644 index 3e345b4aa..000000000 --- a/workflow/engine/test/fixtures/taskUser.yml +++ /dev/null @@ -1,44 +0,0 @@ -create1: - - - Title: "Create the group user row" - Function: "createTest" - Input: - TAS_UID: "2" - USR_UID: "2" - TU_TYPE: "2" - TU_RELATION: "2" - input: - Type: "integer" -create2: - - - Title: "Create the group user row (whit incomplete data)" - Function: "createTest" - Input: - TAS_UID: "" - USR_UID: "2" - TU_TYPE: "2" - TU_RELATION: "2" - input: - Type: "Exception" -remove1: - - - Title: "Remove the group user row" - Function: "removeTest" - Input: - TAS_UID: "2" - USR_UID: "2" - TU_TYPE: "2" - TU_RELATION: "2" - input: - Type: "NULL" -remove2: - - - Title: "Remove the group user row (not existent)" - Function: "removeTest" - Input: - TAS_UID: "111111111111" - USR_UID: "2" - TU_TYPE: "2" - TU_RELATION: "2" - input: - Type: "Exception" diff --git a/workflow/engine/test/fixtures/trigger.yml b/workflow/engine/test/fixtures/trigger.yml deleted file mode 100644 index 6c70f54b4..000000000 --- a/workflow/engine/test/fixtures/trigger.yml +++ /dev/null @@ -1,32 +0,0 @@ -CreateTestTriggers: - - - Title:"Creating new Triggers" - Function:"CreateTrigger" - Input: - PRO_UID[]:"guid.pm" - Output: - Value: 1 -TriggerUnitTest: - - - Title:"Updating Triggers" - Function:"UpdateTrigger" - Input: - TRI_UID[]:"*.CREATED" - TRI_TITLE[]:"first.name.es" - TRI_DESCRIPTION[]:"*.text.es" - Output: - Value: 1 - - - Title:"Loading Triggers" - Function:"LoadTrigger" - Input: - TRI_UID[]:"*.CREATED" - Output: - Type: "array" - - - Title:"Removing Triggers" - Function:"RemoveTrigger" - Input: - TRI_UID[]:"*.CREATED" - Output: - Type: "NULL" diff --git a/workflow/engine/test/fixtures/user.yml b/workflow/engine/test/fixtures/user.yml deleted file mode 100644 index 6ac454c5f..000000000 --- a/workflow/engine/test/fixtures/user.yml +++ /dev/null @@ -1,34 +0,0 @@ -CreateTestUsers: - - - Title:"Creating new Users" - Function:"CreateUser" - Input: - USR_UID[]:"guid.pm" - Output: - Value: 1 -UserUnitTest: - - - Title:"Updating Users" - Function:"UpdateUser" - Input: - USR_UID[]: "*.CREATED" - USR_EMAIL[]: "*.email.es" - USR_USRNAME[]: "first.name.es" - USR_FIRSTNAME[]: "first.name.es" - USR_LASTNAME[]: "last.name.es" - Output: - Value: 1 - - - Title:"Loading Users" - Function:"LoadUser" - Input: - USR_UID[]: "*.CREATED" - Output: - Type: "array" - - - Title:"Removing Users" - Function:"RemoveUser" - Input: - USR_UID[]: "*.CREATED" - Output: - Type: "NULL" diff --git a/workflow/engine/test/unit/gulliver/classDBConnectionTest.php b/workflow/engine/test/unit/gulliver/classDBConnectionTest.php deleted file mode 100644 index 76161f6d3..000000000 --- a/workflow/engine/test/unit/gulliver/classDBConnectionTest.php +++ /dev/null @@ -1,74 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - global $G_ENVIRONMENTS; - $counter =1; - $testItems = 0; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - }else - include ( $dbfile ); - }else - exit (201); - require_once( PATH_GULLIVER . 'class.dbconnection.php'); - $obj = new DBConnection(); - $method = array ( ); - $methods = get_class_methods('DBConnection'); - - $t = new lime_test( 20 , new lime_output_color()); - $t->diag('class DBConnection' ); - - /* Listing Method */ - $t->is( count( $methods ) , 8, "class DBConnection " . 8 . " methods." ); - $t->todo ( 'Listing Method' ); - $t->is( $methods[0] , 'DBConnection', $counter++.' DBConnection'); - $t->is( $methods[1] , 'Reset' , $counter++.' Reset'); - $t->is( $methods[2] , 'Free' , $counter++.' Free'); - $t->is( $methods[3] , 'Close' , $counter++.' Close'); - $t->is( $methods[4] , 'logError' , $counter++.' logError'); - $t->is( $methods[5] , 'traceError' , $counter++.' traceError'); - $t->is( $methods[6] , 'printArgs' , $counter++.' printArgs'); - $t->is( $methods[7] , 'GetLastID' , $counter++.' GetLastID'); - - /* checking methods */ - $t->todo( 'checking methods' ); - $t->can_ok( $obj, 'DBConnection', 'DBConnection()'); - $t->can_ok( $obj, 'Reset' , 'Reset()'); - $t->can_ok( $obj, 'Free' , 'Free()'); - $t->can_ok( $obj, 'Close' , 'Close()'); - $t->can_ok( $obj, 'logError' , 'logError()'); - $t->can_ok( $obj, 'traceError' , 'traceError()'); - $t->can_ok( $obj, 'printArgs' , 'printArgs()'); - $t->can_ok( $obj, 'GetLastID' , 'GetLastID()'); - $t->todo ( 'Review, specific examples.'); \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classDBRecordsetTest.php b/workflow/engine/test/unit/gulliver/classDBRecordsetTest.php deleted file mode 100644 index 25db3dfb8..000000000 --- a/workflow/engine/test/unit/gulliver/classDBRecordsetTest.php +++ /dev/null @@ -1,66 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - require_once( PATH_GULLIVER . 'class.dbconnection.php'); - require_once( PATH_GULLIVER . 'class.dbsession.php'); - require_once( PATH_GULLIVER . 'class.dbrecordset.php'); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - $dset = $ses->Execute ( "SELECT * from APPLICATION" ); - $method = array ( ); - $testItems = 0; - $methods = get_class_methods('DBRecordSet'); - $t = new lime_test( 8, new lime_output_color()); - - $t->diag('class DBRecordset' ); - $t->is( count($methods) , 6, "class G " . count($methods) . " methods." ); - $t->isa_ok( $dset , 'DBRecordSet' , 'class DBRecordset created'); - $t->can_ok( $dset , 'SetTo' , 'SetTo()' ); - $t->can_ok( $dset , 'Free' , 'Free()' ); - $t->can_ok( $dset , 'Count' , 'Count()' ); - $t->can_ok( $dset , 'Read' , 'Read()' ); - $t->can_ok( $dset , 'ReadAbsolute', 'ReadAbsolute()'); - $t->todo( 'review all pendings in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classDBSessionTest.php b/workflow/engine/test/unit/gulliver/classDBSessionTest.php deleted file mode 100644 index 56f747e45..000000000 --- a/workflow/engine/test/unit/gulliver/classDBSessionTest.php +++ /dev/null @@ -1,67 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - require_once( PATH_GULLIVER . 'class.dbconnection.php'); - require_once( PATH_GULLIVER . 'class.dbsession.php'); - require_once( PATH_GULLIVER . 'class.dbrecordset.php'); - $counter =1; - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - $dset = $ses->Execute ( "SELECT * from APPLICATION" ); - $method = array( ); - $testItems = 0; - $methods = get_class_methods('DBSession'); - $t = new lime_test(8, new lime_output_color()); - - $t->diag('class DBSession' ); - $t->is( count($methods) , 5, "class classDBSession " . 5 . " methods." ); - $t->isa_ok( $ses , 'DBSession', 'class DBSession created'); - - $t->can_ok( $ses, 'DBSession', $counter++.' DBSession()'); - $t->can_ok( $ses, 'setTo', $counter++.' Free()'); - $t->can_ok( $ses, 'UseDB', $counter++.' UseDB()'); - $t->can_ok( $ses, 'Execute', $counter++.' Execute()'); - $t->can_ok( $ses, 'Free', $counter++.' Free()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classDBTableTest.php b/workflow/engine/test/unit/gulliver/classDBTableTest.php deleted file mode 100644 index d10f4a822..000000000 --- a/workflow/engine/test/unit/gulliver/classDBTableTest.php +++ /dev/null @@ -1,71 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * -*/ - - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - }else - include ( $dbfile ); - }else - exit (201); - - require_once( PATH_GULLIVER . 'class.dbconnection.php'); - require_once( PATH_GULLIVER . 'class.dbsession.php'); - require_once( PATH_GULLIVER . 'class.dbtable.php'); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - $obj = new DBTable ( $dbc, "APPLICATION" , array ( 'APP_UID' ) ); - $method = array ( ); - $testItems = 0; - $methods = get_class_methods('DBTable'); - $t = new lime_test(13, new lime_output_color()); - - $t->diag('class DBTable' ); - $t->is( count($methods) , 11, "class DBTable " . 11 . " methods." ); - $t->isa_ok( $obj, 'DBTable' , 'class DBTable created'); - $t->can_ok( $obj, 'SetTo' , 'SetTo()'); - $t->can_ok( $obj, 'loadEmpty' , 'loadEmpty()'); - $t->can_ok( $obj, 'loadWhere' , 'loadWhere()'); - $t->can_ok( $obj, 'load' , 'load()'); - $t->can_ok( $obj, 'nextvalPGSql', 'nextvalPGSql()'); - $t->can_ok( $obj, 'insert' , 'insert()'); - $t->can_ok( $obj, 'update' , 'update()'); - $t->can_ok( $obj, 'save' , 'save()'); - $t->can_ok( $obj, 'delete' , 'delete()'); - $t->can_ok( $obj, 'next' , 'next()'); - - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classDatabase_baseTest.php b/workflow/engine/test/unit/gulliver/classDatabase_baseTest.php deleted file mode 100644 index 43c277cf2..000000000 --- a/workflow/engine/test/unit/gulliver/classDatabase_baseTest.php +++ /dev/null @@ -1,59 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * -*/ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'database_base'); - $counter=1; - $t = new lime_test( 12, new lime_output_color()); - $obj = new database_base(); - $methods = get_class_methods('database_base'); - - $t->diag('class database_base' ); - - /* Listing Method */ - - $t->isa_ok( $obj , 'database_base', 'class database_base created'); - $t->todo ( 'Listing Method' ); - $t->is( count ( $methods ) , 8, "class database_base " . count ( $methods ) . " methods." ); - /* checking methods */ - - $t->can_ok( $obj, '__construct' , $counter++.' __construct()'); - $t->can_ok( $obj, 'generateDropTableSQL' , $counter++.' generateDropTableSQL()'); - $t->can_ok( $obj, 'generateCreateTableSQL' , $counter++.' generateCreateTableSQL()'); - $t->can_ok( $obj, 'generateDropColumnSQL' , $counter++.' generateDropColumnSQL()'); - $t->can_ok( $obj, 'generateAddColumnSQL' , $counter++.' generateAddColumnSQL()'); - $t->can_ok( $obj, 'generateChangeColumnSQL', $counter++.' generateChangeColumnSQL()'); - $t->can_ok( $obj, 'executeQuery' , $counter++.' executeQuery()'); - $t->can_ok( $obj, 'close' , $counter++.' close()'); - - $t->todo ( 'Review, specific examples.'); \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classDatabase_mysqlTest.php b/workflow/engine/test/unit/gulliver/classDatabase_mysqlTest.php deleted file mode 100644 index 13ec91481..000000000 --- a/workflow/engine/test/unit/gulliver/classDatabase_mysqlTest.php +++ /dev/null @@ -1,65 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * -*/ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'database_mysql'); - $t = new lime_test( 24, new lime_output_color()); - $obj = new database_base(); - $method = array (); - $testItems = 0; - $methods = get_class_methods('database'); - $t->diag('class database' ); - $t->is( count($methods) , 21, "class database " . count($methods) . " methods." ); - $t->is( $methods[0] , '__construct', '__construct'); - $t->is( $methods[1] , 'generateCreateTableSQL' , 'generateCreateTableSQL'); - $t->is( $methods[2] , 'generateDropTableSQL' , 'generateDropTableSQL'); - $t->is( $methods[3] , 'generateDropColumnSQL' , 'generateDropColumnSQL'); - $t->is( $methods[4] , 'generateAddColumnSQL' , 'generateAddColumnSQL'); - $t->is( $methods[5] , 'generateChangeColumnSQL' , 'generateChangeColumnSQL'); - $t->is( $methods[6] , 'generateGetPrimaryKeysSQL' , 'generateGetPrimaryKeysSQL'); - $t->is( $methods[7] , 'generateDropPrimaryKeysSQL', 'generateDropPrimaryKeysSQL'); - $t->is( $methods[8] , 'generateAddPrimaryKeysSQL' , 'generateAddPrimaryKeysSQL'); - $t->is( $methods[9] , 'generateDropKeySQL' , 'generateDropKeySQL'); - $t->is( $methods[10] , 'generateAddKeysSQL' , 'generateAddKeysSQL'); - $t->is( $methods[11] , 'generateShowTablesSQL' , 'generateShowTablesSQL'); - $t->is( $methods[12] , 'generateShowTablesLikeSQL' , 'generateShowTablesLikeSQL'); - $t->is( $methods[13] , 'generateDescTableSQL' , 'generateDescTableSQL'); - $t->is( $methods[14] , 'generateTableIndexSQL' , 'generateTableIndexSQL'); - $t->is( $methods[15] , 'isConnected' , 'isConnected'); - $t->is( $methods[16] , 'logQuery' , 'logQuery'); - $t->is( $methods[17] , 'executeQuery' , 'executeQuery'); - $t->is( $methods[18] , 'countResults' , 'countResults'); - $t->is( $methods[19] , 'getRegistry' , 'getRegistry'); - $t->is( $methods[20] , 'close' , 'close'); - $t->isa_ok( $obj , 'database_base', 'class database_base created'); - $t->todo( 'Examples'); \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classDynaformhandlerTest.php b/workflow/engine/test/unit/gulliver/classDynaformhandlerTest.php deleted file mode 100644 index b7c626ddc..000000000 --- a/workflow/engine/test/unit/gulliver/classDynaformhandlerTest.php +++ /dev/null @@ -1,44 +0,0 @@ -diag('class dynaFormHandler' ); - $t->is( $testItems , 18, "class database " . $testItems . " methods." ); - $t->is( $methods[0] , '__construct' , '__construct'); - $t->is( $methods[1] , '__cloneEmpty' , '__cloneEmpty'); - $t->is( $methods[2] , 'toString' , 'toString'); - $t->is( $methods[3] , 'getNode' , 'getNode'); - $t->is( $methods[4] , 'setNode' , 'setNode'); - $t->is( $methods[5] , 'add' , 'add'); - $t->is( $methods[6] , 'replace' , 'replace'); - $t->is( $methods[7] , 'save' , 'save'); - $t->is( $methods[8] , 'fixXmlFile' , 'fixXmlFile'); - $t->is( $methods[9] , 'setHeaderAttribute' , 'setHeaderAttribute'); - $t->is( $methods[10] , 'modifyHeaderAttribute' , 'modifyHeaderAttribute'); - $t->is( $methods[11] , 'updateAttribute' , 'updateAttribute'); - $t->is( $methods[12] , 'remove' , 'remove'); - $t->is( $methods[13] , 'nodeExists' , 'nodeExists'); - $t->is( $methods[14] , 'moveUp' , 'moveUp'); - $t->is( $methods[15] , 'moveDown' , 'moveDown'); - $t->is( $methods[16] , 'getFields' , 'getFields'); - $t->is( $methods[17] , 'getFieldNames' , 'getFieldNames'); - $t->todo( 'review all pendings in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classErrorTest.php b/workflow/engine/test/unit/gulliver/classErrorTest.php deleted file mode 100644 index a3e4b80b0..000000000 --- a/workflow/engine/test/unit/gulliver/classErrorTest.php +++ /dev/null @@ -1,79 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - require_once( PATH_GULLIVER . 'class.dbconnection.php'); - require_once( PATH_GULLIVER . 'class.error.php'); - -$obj = new G_Error(); -$method = array ( ); -$testItems = 0; -$class_methods = get_class_methods('G_Error'); -foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; -} - -$t = new lime_test(11, new lime_output_color()); - -$t->diag('class error' ); - // - $t->is( $testItems , 13, "class G_Error " . 13 . " methods." ); -$t->isa_ok( $obj , 'G_Error', 'class G_Error created'); -$t->is( G_ERROR , -100, 'G_ERROR constant defined'); -$t->is( G_ERROR_ALREADY_ASSIGNED , -118, 'G_ERROR_ALREADY_ASSIGNED defined'); - -$obj = new G_Error( "string" ); -$t->is( $obj->code, -1, 'default code error'); -$t->is( $obj->message, "G Error: string", 'default message error'); -$t->is( $obj->level, E_USER_NOTICE, 'default level error'); - -$obj = new G_Error( G_ERROR_SYSTEM_UID ); -$t->is( $obj->code, -105, 'code error'); -$t->is( $obj->message, "G Error: ", 'message error'); - -$t->can_ok( $obj, "errorMessage", "exists method errorMessage"); -$msg = $obj->errorMessage ( G_ERROR ); -//$t->is( $msg->code, -100, 'fail in method errorMessage'); -$t->todo( 'fail in method errorMessage'); diff --git a/workflow/engine/test/unit/gulliver/classFilterFormTest.php b/workflow/engine/test/unit/gulliver/classFilterFormTest.php deleted file mode 100644 index fc292f813..000000000 --- a/workflow/engine/test/unit/gulliver/classFilterFormTest.php +++ /dev/null @@ -1,49 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'filterForm'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - $obj = new filterForm ( 'login/login'); - $method = array ( ); - $testItems = 0; - $methods = get_class_methods('filterForm'); - $t = new lime_test(4, new lime_output_color()); - $t->diag('class filterForm' ); - $t->is( count($methods) , 12, "class filterForm " . count($methods) . " methods." ); - $t->isa_ok( $obj , 'filterForm', 'class filterForm created'); - $t->can_ok( $obj, 'render', 'render()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classFormTest.php b/workflow/engine/test/unit/gulliver/classFormTest.php deleted file mode 100644 index a6c9a7a95..000000000 --- a/workflow/engine/test/unit/gulliver/classFormTest.php +++ /dev/null @@ -1,59 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - $counter=1; - $obj = new Form ( 'login/login'); - $method = array ( ); - $testItems = 0; - $methods = get_class_methods('Form'); - $t = new lime_test(15, new lime_output_color()); - $t->diag('class Form' ); - $t->is( count($methods) , 12, "class Form " . count($methods) . " methods." ); - $t->can_ok( $obj, 'Form',$counter++.' Form()'); - $t->can_ok( $obj, 'setDefaultValues',$counter++.' setDefaultValues()'); - $t->can_ok( $obj, 'printTemplate', $counter++.' printTemplate()'); - $t->can_ok( $obj, 'render', $counter++.' render()'); - $t->can_ok( $obj, 'setValues', $counter++.' setValues()'); - $t->can_ok( $obj, 'getFields', $counter++.' getFields()'); - $t->can_ok( $obj, 'validatePost', $counter++.' validatePost()'); - $t->can_ok( $obj, 'validateArray', $counter++.' validateArray()'); - $t->can_ok( $obj, 'getVars', $counter++.' getVars()'); - $t->can_ok( $obj, 'validateRequiredFields', $counter++.' validateRequiredFields()'); - $t->can_ok( $obj, 'parseFile', $counter++.' parseFile()'); - $t->can_ok( $obj, 'cloneObject', $counter++.' cloneObject()'); - $t->is( count($methods) , --$counter , "ok"); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classGTest.php b/workflow/engine/test/unit/gulliver/classGTest.php deleted file mode 100644 index af767b395..000000000 --- a/workflow/engine/test/unit/gulliver/classGTest.php +++ /dev/null @@ -1,276 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - require_once( PATH_GULLIVER .'class.g.php'); - $obj = new G(); - $methods = get_class_methods('G'); - $t = new lime_test( 223, new lime_output_color()); - $t->diag('class G' ); - $t->is( count($methods) , 95, "class G " . 95 . " methods." ); - $t->isa_ok( $obj , 'G', 'class G created'); - $t->todo( 'review which PHP version is the minimum for Gulliver'); - $t->is( G::getVersion() , '3.0-1', 'Gulliver version'); - $t->todo( 'store the version in a file'); - $t->is( $obj->getIpAddress() , false, 'getIpAddress()'); - $t->isnt( $obj->getMacAddress() , '', 'getMacAddress()'); - $t->can_ok( $obj, 'microtime_float', 'microtime_float()'); - $t->can_ok( $obj, 'setFatalErrorHandler' , 'setFatalErrorHandler()'); - $t->can_ok( $obj, 'setErrorHandler', 'setErrorHandler()'); - $t->is( $obj->fatalErrorHandler( 'Fatal error') , 'Fatal error', 'fatalErrorHandler()'); - $like = '
ERROR CAUGHT check log file
IP address:
'; - $t->is( $obj->fatalErrorHandler( 'error:abc
') , $like, 'fatalErrorHandler()'); - $t->can_ok( $obj, 'customErrorHandler', 'customErrorHandler()'); - - G::customErrorHandler ( G_DB_ERROR, "message error", "filename", 10, "context" ) ; - $t->can_ok( $obj, 'showErrorSource', 'showErrorSource()'); - $t->can_ok( $obj, 'customErrorLog', 'customErrorLog()'); - $t->can_ok( $obj, 'verboseError', 'verboseError()'); - $t->can_ok( $obj, 'encrypt', 'encrypt()'); - $k = URL_KEY; - $t->is( G::encrypt ("/sysOpenSource", $k), 'Ytap33°jmZ7D46bf2Jo', 'encrypt only workspace'); - $t->is( G::encrypt ("/sysOpenSource/", $k), 'Ytap33°jmZ7D46bf2Jpo', 'encrypt terminal slash'); - $t->is( G::encrypt ("/sysOpenSource/en", $k), 'Ytap33°jmZ7D46bf2Jpo158', 'encrypt two levels'); - $t->is( G::encrypt ("/sysOpenSource/en/test/login/login", $k), 'Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4A', 'encrypt normal page'); - $t->is( G::encrypt ("/sysOpenSource/en/test/login/login/demo", $k), 'Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4GDRmNCf', 'encrypt additional level'); - $t->is( G::encrypt ("/sysOpenSource/en/test/login/login?a=1&b=2", $k), 'Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4HDOcJRWzm2l', 'encrypt normal query string'); - $t->todo( 'encrypt query string plus pipe'); - $t->todo("encrypt query string plus pipe"); - $t->can_ok( $obj, 'decrypt', 'decrypt()'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jo', $k), "/sysOpenSource", 'decrypt only workspace'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jpo', $k), "/sysOpenSource/", 'decrypt terminal slash'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jpo158', $k), "/sysOpenSource/en", 'decrypt two levels'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4A', $k), "/sysOpenSource/en/test/login/login", 'decrypt normal page'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4GDRmNCf', $k), "/sysOpenSource/en/test/login/login/demo", 'decrypt additional level'); - $t->is( G::decrypt ('Ytap33°jmZ7D46bf2Jpo15+cp8ij4F°fo5fZ4mDZ5Jyi4HDOcJRWzm2l', $k) , "/sysOpenSource/en/test/login/login?a=1&b=2",'decrypt normal query string'); - $t->todo( 'decrypt query string plus pipe'); - $t->can_ok( $obj, 'lookup', 'lookup()'); - $t->is( G::lookup ('optimusprime.colosa.net'), "192.168.1.22", 'lookup any address'); - $t->can_ok( $obj, 'mk_dir', 'mk_dir()'); - $newDir = '/tmp/test/directory'; - $r = G::verifyPath ( $newDir ); - - if ( $r ) rmdir ( $newDir ); - $r = G::mk_dir ( $newDir ); - $r = G::verifyPath ( $newDir); - $t->is( $r, true, "mk_dir() $newDir"); - $t->can_ok( $obj, 'verifyPath', "verifyPath() $newDir"); - $t->isnt( PATH_CORE, 'PATH_CORE', 'Constant PATH_CORE'); - $t->isnt( PATH_GULLIVER, 'PATH_GULLIVER', 'Constant PATH_GULLIVER'); - $phatSitio = "/home/arturo/processmaker/trunk/workflow/engine/class.x.php/"; - $phatBuscar = "/processmaker/trunk/workflow/engine/class.x.php/"; - // The ereg function has been DEPRECATED as of PHP 5.3.0. - // $t->is(( ereg( $phatBuscar , $phatSitio ) ), 1 , 'expandPath()'); - $t->is(( preg_match( '/' . $phatBuscar . '/', $phatSitio ) ), 1 , 'expandPath()'); - $t->is( G::LoadSystem("error"), NULL, 'LoadSystem()'); - $t->can_ok( $obj, 'RenderPage', 'RenderPage()'); - $t->can_ok( $obj, 'LoadSkin', 'LoadSkin()'); - $t->can_ok( $obj, 'LoadInclude', 'LoadInclude()'); - $t->can_ok( $obj, 'LoadTemplate', 'LoadTemplate()'); - $t->can_ok( $obj, 'LoadClassRBAC', 'LoadClassRBAC()'); - $t->can_ok( $obj, 'LoadClass', 'LoadClass()'); - $t->can_ok( $obj, 'LoadThirdParty', 'LoadThirdParty()'); - $t->can_ok( $obj, 'encryptlink', 'encryptlink()'); - $t->is( G::encryptlink("normal url"), "normal url", 'encryptlink() normal url'); - $t->todo( 'more tests with encryplink and remove ENABLE_ENCRYPT dependency'); - $t->can_ok( $obj, 'parseURI', 'parseURI()'); - - G::parseURI("http:/192.168.0.9/sysos/en/wf5/login/login/abc?ab=123&bc=zy"); - $t->todo( 'more tests with parseURI'); - $t->can_ok( $obj, 'streamFile', 'streamFile()'); - $t->can_ok( $obj, 'sendHeaders', 'sendHeaders()'); - $t->todo( 'more tests with sendHeaders'); - $t->can_ok( $obj, 'virtualURI', 'virtualURI()'); - $t->can_ok( $obj, 'createUID', 'createUID()'); - $t->is( G::createUID('directory','filename'), 'bDh5aTBaUG5vNkxwMnByWjJxT2EzNVk___', 'createUID() normal'); - $t->can_ok( $obj, 'getUIDName', 'getUIDName()'); - $t->is( G::getUIDName('bDh5aTBaUG5vNkxwMnByWjJxT2EzNVk___','12345678901234567890'), false, 'getUIDName() normal?'); - $t->can_ok( $obj, 'formatNumber', 'formatNumber()'); - $t->is( G::formatNumber('100000'), '100000', 'formatNumber() normal'); - $t->todo( 'is useful the function formatNumber??'); - $t->can_ok( $obj, 'formatDate', 'formatDate()'); - $t->is( G::formatDate( '2001-02-29' ), '2001-02-29', 'formatDate() '); - $t->is( G::formatDate( '2001-02-29', 'F d, Y' ), 'Februar01 29, 2001', 'formatDate() '); //is not working - $t->is( G::formatDate( '2001-02-29', 'd.m.Y' ), '29.02.2001', 'formatDate() '); - $t->todo( " the month literal text is defined here!! "); - $t->todo( 'review all methods in class G'); - $i=1; - $t->diag('class G' ); - $t->is( count($methods) , 95, "class database " . count($methods) . " methods." ); - $t->is( $methods[0] , 'is_https' ,$i++.' is_https'); - $t->is( $methods[1] , 'array_fill_value' ,$i++.' array_fill_value'); - $t->is( $methods[2] , 'generate_password' ,$i++.' generate_password'); - $t->is( $methods[3] , 'array_concat' ,$i++.' array_concat'); - $t->is( $methods[4] , 'var_compare' ,$i++.' var_compare'); - $t->is( $methods[5] , 'var_probe' ,$i++.' var_probe'); - $t->is( $methods[6] , 'getVersion' ,$i++.' getVersion'); - $t->is( G::getVersion() , '3.0-1', 'Gulliver version 3.0-1'); - $t->is( $methods[7] , 'getIpAddress' ,$i++.' getIpAddress'); - $t->is( $obj->getIpAddress() , false, 'getIpAddress()'); - $t->is( $methods[8] , 'getMacAddress' ,$i++.' getMacAddress'); - $t->isnt( $obj->getMacAddress() , '', 'getMacAddress()'); - $t->is( $methods[9] , 'microtime_float' ,$i++.' microtime_float'); - $t->can_ok( $obj, 'microtime_float', 'microtime_float()'); - $t->is( $methods[10] , 'setFatalErrorHandler',$i++.' setFatalErrorHandler'); - $t->can_ok( $obj, 'setFatalErrorHandler' , 'setFatalErrorHandler()'); - $t->is( $methods[11] , 'setErrorHandler' ,$i++.' setErrorHandler'); - $t->can_ok( $obj, 'setErrorHandler', 'setErrorHandler()'); - $t->is( $methods[12] , 'fatalErrorHandler' ,$i++.' fatalErrorHandler'); - $t->is( $methods[13] , 'customErrorHandler' ,$i++.' customErrorHandler'); - $t->is( $methods[14] , 'showErrorSource' ,$i++.' showErrorSource'); - $t->is( $methods[15] , 'customErrorLog' ,$i++.' customErrorLog'); - $t->is( $methods[16] , 'verboseError' ,$i++.' verboseError'); - $t->is( $methods[17] , 'encrypt' ,$i++.' encrypt'); - $t->is( $methods[18] , 'decrypt' ,$i++.' decrypt'); - $t->is( $methods[19] , 'lookup' ,$i++.' lookup'); - $t->is( $methods[20] , 'mk_dir' ,$i++.' mk_dir'); - $t->is( $methods[21] , 'rm_dir' ,$i++.' rm_dir'); - $t->is( $methods[22] , 'verifyPath' ,$i++.' verifyPath'); - $t->is( $methods[23] , 'expandPath' ,$i++.' expandPath'); - $t->is( $methods[24] , 'LoadSystem' ,$i++.' LoadSystem'); - $t->is( $methods[25] , 'RenderPage' ,$i++.' RenderPage'); - $t->is( $methods[26] , 'LoadSkin' ,$i++.' LoadSkin'); - $t->is( $methods[27] , 'LoadInclude' ,$i++. ' LoadInclude'); - $t->is( $methods[28] , 'LoadAllModelClasses',$i++. ' LoadAllModelClasses'); - $t->is( $methods[29] , 'LoadAllPluginModelClasses',$i++. ' LoadAllPluginModelClasses'); - $t->is( $methods[30] , 'LoadTemplate' ,$i++. ' LoadTemplate'); - $t->is( $methods[31] , 'LoadClassRBAC' ,$i++. ' LoadClassRBAC'); - $t->is( $methods[32] , 'LoadClass' ,$i++. ' LoadClass'); - $t->is( $methods[33] , 'LoadThirdParty' ,$i++. ' LoadThirdParty'); - $t->is( $methods[34] , 'encryptlink' ,$i++. ' encryptlink'); - $t->is( $methods[35] , 'parseURI' ,$i++. ' parseURI'); - $t->is( $methods[36] , 'streamFile' ,$i++. ' streamFile'); - $t->is( $methods[37] , 'trimSourceCodeFile' ,$i++. ' trimSourceCodeFile'); - $t->is( $methods[38] , 'sendHeaders' ,$i++. ' sendHeaders'); - $t->is( $methods[39] , 'virtualURI' ,$i++. ' virtualURI'); - $t->is( $methods[40] , 'createUID' ,$i++. ' createUID'); - $t->is( $methods[41] , 'getUIDName' ,$i++. ' getUIDName'); - $t->is( $methods[42] , 'formatNumber' ,$i++. ' formatNumber'); - $t->is( $methods[43] , 'formatDate' ,$i++. ' formatDate'); - $t->is( $methods[44] , 'getformatedDate' ,$i++. ' getformatedDate'); - $t->is( $methods[45] , 'arrayDiff' ,$i++. ' arrayDiff'); - $t->is( $methods[46] , 'complete_field' ,$i++. ' complete_field'); - $t->is( $methods[47] , 'sqlEscape' ,$i++. ' sqlEscape'); - $t->is( $methods[48] , 'replaceDataField' ,$i++. ' replaceDataField'); - $t->can_ok( $obj, 'replaceDataField', 'replaceDataField()'); - $t->todo( 'improve the function replaceDataField !!'); - $t->is( $methods[49] , 'loadLanguageFile' ,$i++. ' loadLanguageFile'); - $t->can_ok( $obj, 'loadLanguageFile', 'loadLanguageFile()'); - $t->todo( 'more tests with the function loadLanguageFile !!'); - $t->is( $methods[50] , 'registerLabel' ,$i++. ' registerLabel'); - $t->can_ok( $obj, 'registerLabel', 'registerLabel()'); - $t->todo( 'more tests with the function registerLabel !!'); - $t->is( $methods[51] , 'LoadMenuXml' ,$i++. ' LoadMenuXml'); - $t->can_ok( $obj, 'LoadMenuXml', 'LoadMenuXml()'); - $t->todo( 'more tests with the function LoadMenuXml !!'); - $t->is( $methods[52] , 'SendMessageXml' ,$i++. ' SendMessageXml'); - $t->can_ok( $obj, 'SendMessageXml', 'SendMessageXml()'); - $t->todo( 'more tests with the function SendMessageXml !!'); - $t->is( $methods[53] , 'SendTemporalMessage',$i++. ' SendTemporalMessage'); - $t->is( $methods[54] , 'SendMessage' ,$i++. ' SendMessage'); - $t->can_ok( $obj, 'SendTemporalMessage', 'SendTemporalMessage()'); - $t->todo( 'more tests with the function SendTemporalMessage !!'); - $t->can_ok( $obj, 'SendMessage', 'SendMessage()'); - $t->todo( 'more tests with the function SendMessage !!'); - $t->is( $methods[55] , 'SendMessageText' ,$i++. ' SendMessageText'); - $t->is( $methods[56] , 'LoadMessage' ,$i++. ' LoadMessage'); - $t->can_ok( $obj, 'LoadMessage', 'LoadMessage()'); - $t->todo( 'more tests with the function LoadMessage !!'); - $t->is( $methods[57] , 'LoadXmlLabel' ,$i++. ' LoadXmlLabel'); - $t->can_ok( $obj, 'LoadXmlLabel', 'LoadXmlLabel()'); - $t->todo( 'is useful the function LoadXmlLabel ??? delete it!!'); - $t->is( $methods[58] , 'LoadMessageXml' ,$i++. ' LoadMessageXml'); - $t->can_ok( $obj, 'LoadMessageXml', 'LoadMessageXml()'); - $t->todo( 'more tests with the function LoadMessageXml !!'); - $t->is( $methods[59] , 'LoadTranslationObject',$i++. ' LoadTranslationObject'); - $t->can_ok( $obj, 'LoadTranslation', 'LoadTranslation()'); - $t->todo( 'more tests with the function LoadTranslation !!'); - $t->is( $methods[60] , 'LoadTranslation' ,$i++. ' LoadTranslation'); - $t->is( $methods[61] , 'LoadArrayFile' ,$i++. ' LoadArrayFile'); - $t->can_ok( $obj, 'LoadArrayFile', 'LoadArrayFile()'); - $t->todo( 'more tests with the function LoadArrayFile !!'); - $t->is( $methods[62] , 'expandUri' ,$i++. ' expandUri'); - $t->can_ok( $obj, 'expandUri', 'expandUri()'); - $t->todo( 'more tests with the function expandUri !!'); - $t->is( $methods[63] , 'genericForceLogin' ,$i++. ' genericForceLogin'); - $t->can_ok( $obj, 'genericForceLogin', 'genericForceLogin()'); - $t->todo( 'more tests with the function genericForceLogin !!'); - $t->is( $methods[64] , 'capitalize' ,$i++. ' capitalize'); - $t->is( $methods[65] , 'toUpper' ,$i++. ' toUpper'); - $t->is( $methods[66] , 'toLower' ,$i++. ' toLower'); - $t->is( $methods[67] , 'http_build_query' ,$i++. ' http_build_query'); - $t->is( $methods[68] , 'header' ,$i++. ' header'); - $t->can_ok( $obj, 'http_build_query', 'http_build_query()'); - $t->todo( 'more tests with the function http_build_query !!'); - $t->can_ok( $obj, 'header', 'header()'); - $t->todo( 'more tests with the function header !!'); - $t->is( $methods[69] , 'forceLogin' ,$i++. ' forceLogin'); - $t->can_ok( $obj, 'forceLogin', 'forceLogin()'); - $t->todo( 'more tests with the function forceLogin , DELETE IT!!'); - $t->is( $methods[70] , 'add_slashes' ,$i++. ' add_slashes'); - $t->can_ok( $obj, 'add_slashes', 'add_slashes()'); - $t->todo( 'more tests with the function add_slashes !!'); - $t->is( $methods[71] , 'uploadFile' ,$i++. ' uploadFile'); - $t->can_ok( $obj, 'uploadFile', 'uploadFile()'); - $t->todo( 'more tests with the function uploadFile !!'); - $t->is( $methods[72] , 'resizeImage' ,$i++. ' resizeImage'); - $t->is( $methods[73] , 'array_merges' ,$i++. ' array_merges'); - $t->can_ok( $obj, 'array_merges', 'array_merges()'); - $t->todo( 'more tests with the function array_merges !!'); - $t->is( $methods[74] , 'array_merge_2' ,$i++. ' array_merge_2'); - $t->can_ok( $obj, 'array_merge_2', 'array_merge_2()'); - $t->todo( 'more tests with the function array_merge_2 !!'); - $t->is( $methods[75] , 'generateUniqueID' ,$i++. ' generateUniqueID'); - $t->can_ok( $obj, 'generateUniqueID', 'generateUniqueID()'); - $t->todo( 'more tests with the function sqlEscape !! is useful? delete it !!'); - $t->can_ok( $obj, 'generateUniqueID', 'generateUniqueID()'); - $t->todo( 'more tests with the function sqlEscape !! is useful? delete it !!'); - $t->is( $methods[76] , 'generateCode' ,$i++. ' generateCode'); - $t->is( $methods[77] , 'verifyUniqueID' ,$i++. ' verifyUniqueID'); - $t->is( $methods[78] , 'is_utf8' ,$i++. ' is_utf8'); - $t->is( $methods[79] , 'CurDate' ,$i++. ' CurDate'); - $t->can_ok( $obj, 'CurDate', 'CurDate()'); - $t->todo( 'more tests with the function sqlEscape !!'); - $t->is( $methods[80] , 'getSystemConstants',$i++. ' getSystemConstants'); - $t->is( $methods[81] , 'capitalizeWords' ,$i++. ' capitalizeWords'); - $t->is( $methods[82] , 'unhtmlentities' ,$i++. ' unhtmlentities'); - $t->is( $methods[83] , 'xmlParser' ,$i++. ' xmlParser'); - $t->is( $methods[84] , '_del_p' ,$i++. ' _del_p'); - $t->is( $methods[85] , 'ary2xml' ,$i++. ' ary2xml'); - $t->is( $methods[86] , 'ins2ary' ,$i++. ' ins2ary'); - $t->is( $methods[87] , 'evalJScript' ,$i++. ' evalJScript'); - $t->is( $methods[88] , 'inflect' ,$i++. ' inflect'); - $t->is( $methods[89] , 'pr' ,$i++. ' pr'); - $t->is( $methods[90] , 'dump' ,$i++. ' dump'); - $t->is( $methods[91] , 'stripCDATA' ,$i++. ' stripCDATA'); - $t->is( $methods[92] , 'sys_get_temp_dir' ,$i++. ' sys_get_temp_dir'); - $t->is( $methods[93] , 'PMWSCompositeResponse' ,$i++. ' PMWSCompositeResponse'); - $t->is( $methods[94] , 'emailAddress' ,$i++. ' emailAddress'); - $t->is( count( $methods ) , --$i , count( $methods ).' = '.$i.' ok'); - $t->todo( 'review all pendings in this class'); - \ No newline at end of file diff --git a/workflow/engine/test/unit/gulliver/classHeadPublisherTest.php b/workflow/engine/test/unit/gulliver/classHeadPublisherTest.php deleted file mode 100644 index f4346391c..000000000 --- a/workflow/engine/test/unit/gulliver/classHeadPublisherTest.php +++ /dev/null @@ -1,73 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'headPublisher'); - $counter=1; - $t = new lime_test( 13 , new lime_output_color()); - - $obj =& headPublisher::getSingleton(); - - $method = array ( ); - $testItems = 0; - $methods = get_class_methods('headPublisher'); - - $t->diag('class headPublisher' ); - $t->is( 10 ,count($methods) , "class headPublisher " . count($methods) . " methods." ); - $t->isa_ok( $obj, 'headPublisher', $counter++.' class headPublisher created'); - $t->can_ok( $obj, 'getSingleton', $counter++.' getSingleton()'); - $t->can_ok( $obj, 'setTitle', $counter++.' setTitle()'); - $t->can_ok( $obj, 'addScriptFile', $counter++.' addScriptFile()'); - $t->can_ok( $obj, 'addInstanceModule',$counter++.' addInstanceModule()'); - $t->can_ok( $obj, 'addClassModule', $counter++.' addClassModule()'); - $t->can_ok( $obj, 'addScriptCode', $counter++.' addScriptCode()'); - $t->can_ok( $obj, 'printHeader', $counter++.' printHeader()'); - $t->can_ok( $obj, 'printRawHeader', $counter++.' printRawHeader()'); - $t->can_ok( $obj, 'clearScripts', $counter++.' clearScripts()'); - $t->is( count($methods) ,--$counter , " methods ". $counter." OK" ); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classMailerTest.php b/workflow/engine/test/unit/gulliver/classMailerTest.php deleted file mode 100644 index 4104735e8..000000000 --- a/workflow/engine/test/unit/gulliver/classMailerTest.php +++ /dev/null @@ -1,67 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'mailer'); - $obj = new mailer (); - $testItems = 0; - $method = get_class_methods('mailer'); - $t = new lime_test(11, new lime_output_color()); - $t->diag('class mailer' ); - $t->is( count($method) , 7, "class mailer " . count($method) . " methods." ); - $t->isa_ok( $obj , 'mailer', 'class mailer created'); - $t->can_ok( $obj, 'instanceMailer', 'instanceMailer()'); - $t->can_ok( $obj, 'arpaEMAIL', 'arpaEMAIL()'); - $t->can_ok( $obj, 'sendTemplate', 'sendTemplate()'); - $t->can_ok( $obj, 'sendHtml', 'sendHtml()'); - $t->can_ok( $obj, 'sendText', 'sendText()'); - $t->can_ok( $obj, 'replaceFields', 'replaceFields()'); - $t->can_ok( $obj, 'html2text', 'html2text()'); - $t->todo( 'delete function html2text !!!'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classMenuTest.php b/workflow/engine/test/unit/gulliver/classMenuTest.php deleted file mode 100644 index 6e5ff9d17..000000000 --- a/workflow/engine/test/unit/gulliver/classMenuTest.php +++ /dev/null @@ -1,72 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'menu'); - - $obj = new Menu (); - $counter=1; - $method = get_class_methods('Menu');print_r($class_methods); - $t = new lime_test(15, new lime_output_color()); - $t->diag('class Menu' ); - $t->is( count($method) , 11, "class Menu " . count($method) . " methods." ); - $t->isa_ok( $obj , 'Menu', 'class Menu created'); - $t->can_ok( $obj, 'SetClass' , $counter++.' SetClass()'); - $t->can_ok( $obj, 'Load' , $counter++.' Load()'); - $t->can_ok( $obj, 'OptionCount' , $counter++.' OptionCount()'); - $t->can_ok( $obj, 'AddOption' , $counter++.' AddOption()'); - $t->can_ok( $obj, 'AddIdOption' , $counter++.' AddIdOption()'); - $t->can_ok( $obj, 'AddRawOption' , $counter++.' AddRawOption()'); - $t->can_ok( $obj, 'AddIdRawOption' , $counter++.' AddIdRawOption()'); - $t->can_ok( $obj, 'DisableOptionPos', $counter++.' DisableOptionPos()'); - $t->can_ok( $obj, 'DisableOptionId' , $counter++.' DisableOptionId()'); - $t->can_ok( $obj, 'RenderOption' , $counter++.' RenderOption()'); - $t->can_ok( $obj, 'generateArrayForTemplate', $counter++.' generateArrayForTemplate()'); - $t->is( count($method) , --$counter , " methods " ); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classObjectTemplateTest.php b/workflow/engine/test/unit/gulliver/classObjectTemplateTest.php deleted file mode 100644 index 4469d19fe..000000000 --- a/workflow/engine/test/unit/gulliver/classObjectTemplateTest.php +++ /dev/null @@ -1,58 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'objectTemplate'); - - $obj = new objectTemplate ( ''); - $method = get_class_methods('objectTemplate'); - $t = new lime_test( 4, new lime_output_color()); - $t->diag('class objectTemplate' ); - $t->is( count($method ) , 60, "class objectTemplate " . count($method ) . " methods." ); - $t->isa_ok( $obj , 'objectTemplate', 'class objectTemplate created'); - $t->can_ok( $obj, 'printObject', 'printObject()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classPagedTableTest.php b/workflow/engine/test/unit/gulliver/classPagedTableTest.php deleted file mode 100644 index 690ae0030..000000000 --- a/workflow/engine/test/unit/gulliver/classPagedTableTest.php +++ /dev/null @@ -1,44 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'pagedTable'); - - $t = new lime_test( 2, new lime_output_color()); - $obj = "pagedTable"; - $method = array ( ); - $testItems = 0; - $method = get_class_methods('pagedTable'); - $t->diag('class pagedTable' ); - $t->is( count($method) , 10, "class pagedTable " . $testItems . " methods." ); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classPublisherTest.php b/workflow/engine/test/unit/gulliver/classPublisherTest.php deleted file mode 100644 index 4da9a5b41..000000000 --- a/workflow/engine/test/unit/gulliver/classPublisherTest.php +++ /dev/null @@ -1,63 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'publisher'); - $method = array ( ); - $testItems = 0; - $method = get_class_methods('publisher'); - $t = new lime_test( 6, new lime_output_color()); - $obj = new Publisher ( 'field' ); - $t->diag('class Publisher' ); - $t->is( count($method) , 3, "class publisher " . count($method) . " methods." ); - $t->isa_ok( $obj , 'Publisher' , 'class Publisher created'); - $t->can_ok( $obj , 'AddContent' , 'AddContent()'); - $t->can_ok( $obj , 'RenderContent' , 'RenderContent()'); - $t->can_ok( $obj , 'RenderContent0', 'RenderContent0()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classRbacTest.php b/workflow/engine/test/unit/gulliver/classRbacTest.php deleted file mode 100644 index 78893b422..000000000 --- a/workflow/engine/test/unit/gulliver/classRbacTest.php +++ /dev/null @@ -1,66 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'rbac'); - - $method = array ( ); - $method = get_class_methods('RBAC'); - $t = new lime_test( 8, new lime_output_color()); - $obj =& RBAC::getSingleton(); - $t->diag('class RBAC' ); - $t->is( count($method), 46, "class RBAC " . count($method) . " methods." ); - $t->isa_ok( $obj, 'RBAC', 'class RBAC created'); - $t->can_ok( $obj, 'VerifyLogin', 'VerifyLogin()'); - $t->can_ok( $obj, 'userCanAccess', 'userCanAccess()'); - $t->can_ok( $obj, 'load', 'load()'); - $t->can_ok( $obj, 'createUser', 'createUser()'); - $t->can_ok( $obj, 'listAllRoles', 'listAllRoles()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classTableTest.php b/workflow/engine/test/unit/gulliver/classTableTest.php deleted file mode 100644 index 6f93b8f5d..000000000 --- a/workflow/engine/test/unit/gulliver/classTableTest.php +++ /dev/null @@ -1,81 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - -G::LoadThirdParty('pear/json','class.json'); -G::LoadThirdParty('smarty/libs','Smarty.class'); -G::LoadSystem ( 'xmlform'); -G::LoadSystem ( 'xmlDocument'); -G::LoadSystem ( 'form'); -G::LoadSystem ( 'table'); - -$t = new lime_test(24, new lime_output_color()); -$obj = new Table(); -$method = get_class_methods('Table'); -$t->diag('class Table' ); -$t->is( count($method) , 23, "class Table " . count($method). " methods." ); -$t->isa_ok( $obj, 'Table', 'class Table created'); -$t->can_ok( $obj, 'SetTo', 'SetTo()'); -$t->can_ok( $obj, 'SetSource', 'SetSource()'); -$t->can_ok( $obj, 'GetSource', 'GetSource()'); -$t->can_ok( $obj, 'TotalCount', 'TotalCount()'); -$t->can_ok( $obj, 'Count', 'Count()'); -$t->can_ok( $obj, 'CurRow', 'CurRow()'); -$t->can_ok( $obj, 'ColumnCount', 'ColumnCount()'); -$t->can_ok( $obj, 'Read', 'Read()'); -$t->can_ok( $obj, 'Seek', 'Seek()'); -$t->can_ok( $obj, 'MoveFirst', 'MoveFirst()'); -$t->can_ok( $obj, 'EOF', 'EOF()'); -$t->can_ok( $obj, 'AddColumn', 'AddColumn()'); -$t->can_ok( $obj, 'AddRawColumn', 'AddRawColumn()'); -$t->can_ok( $obj, 'RenderTitle_ajax', 'RenderTitle_ajax()'); -$t->can_ok( $obj, 'RenderTitle2', 'RenderTitle2()'); -$t->can_ok( $obj, 'RenderColumn', 'RenderColumn()'); -$t->can_ok( $obj, 'SetAction', 'SetAction()'); -$t->can_ok( $obj, 'setTranslate', 'setTranslate()'); -$t->can_ok( $obj, 'translateValue', 'translateValue()'); -$t->can_ok( $obj, 'setContext', 'setContext()'); -$t->can_ok( $obj, 'ParsingFromHtml', 'ParsingFromHtml()'); - -$t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classTemplatePowerTest.php b/workflow/engine/test/unit/gulliver/classTemplatePowerTest.php deleted file mode 100644 index 30fb59c5e..000000000 --- a/workflow/engine/test/unit/gulliver/classTemplatePowerTest.php +++ /dev/null @@ -1,77 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'templatePower'); - $t = new lime_test(16, new lime_output_color()); - $obj = new TemplatePowerParser( 'a', 'b' ); - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('TemplatePowerParser'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class TemplatePowerParser' ); - $t->is( $testItems , 8, "class TemplatePowerParser " . $testItems . " methods." ); - $t->isa_ok( $obj , 'TemplatePowerParser', 'class TemplatePowerParser created'); - $t->can_ok( $obj, '__prepare', '__prepare()'); - $t->can_ok( $obj, '__prepareTemplate', '__prepareTemplate()'); - $t->can_ok( $obj, '__parseTemplate', '__parseTemplate()'); - $obj = new TemplatePower( ); - $t->can_ok( $obj, '__outputContent', '__outputContent()'); - $t->can_ok( $obj, '__printVars', '__printVars()'); - $t->can_ok( $obj, 'prepare', 'prepare()'); - $t->can_ok( $obj, 'newBlock', 'newBlock()'); - $t->can_ok( $obj, 'assignGlobal', 'assignGlobal()'); - $t->can_ok( $obj, 'assign', 'assign()'); - $t->can_ok( $obj, 'gotoBlock', 'gotoBlock()'); - $t->can_ok( $obj, 'getVarValue', 'getVarValue()'); - $t->can_ok( $obj, 'printToScreen', 'printToScreen()'); - $t->can_ok( $obj, 'getOutputContent', 'getOutputContent()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classTreeTest.php b/workflow/engine/test/unit/gulliver/classTreeTest.php deleted file mode 100644 index 157db3667..000000000 --- a/workflow/engine/test/unit/gulliver/classTreeTest.php +++ /dev/null @@ -1,67 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'tree'); - $t = new lime_test(7, new lime_output_color()); - $obj = new Tree( array ('name' => 'value' ) ); - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('Tree'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class Tree' ); - $t->is( $testItems , 14, "class Tree " . $testItems . " methods." ); - $t->isa_ok( $obj , 'Tree', 'class Tree created'); - $t->can_ok( $obj, 'addChild', 'addChild()'); - $t->can_ok( $obj, 'printPlus', 'printPlus()'); - $t->can_ok( $obj, 'printContent', 'printContent()'); - $t->can_ok( $obj, 'render', 'render()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classWebResourceTest.php b/workflow/engine/test/unit/gulliver/classWebResourceTest.php deleted file mode 100644 index c45361d2d..000000000 --- a/workflow/engine/test/unit/gulliver/classWebResourceTest.php +++ /dev/null @@ -1,48 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'webResource'); - - $t = new lime_test( 2, new lime_output_color()); - $obj = "WebResource"; - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('WebResource'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class WebResource' ); - $t->is( $testItems , 2, "class WebResource " . $testItems . " methods." ); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classXmlDocumentTest.php b/workflow/engine/test/unit/gulliver/classXmlDocumentTest.php deleted file mode 100644 index 3947a01f7..000000000 --- a/workflow/engine/test/unit/gulliver/classXmlDocumentTest.php +++ /dev/null @@ -1,74 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'xmlDocument'); - $t = new lime_test(11, new lime_output_color()); - $obj = new Xml_Node( 'name', 'type', 'value' ); - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('Xml_Node'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class Xml_Node' ); - $t->is( $testItems , 8, "class Xml_Node " . $testItems . " methods." ); - - $t->isa_ok( $obj , 'Xml_Node' , 'class Xml_Node created'); - $t->can_ok( $obj , 'addAttribute', 'addAttribute()'); - $t->can_ok( $obj , 'addChildNode', 'addChildNode()'); - $t->can_ok( $obj , 'toTree' , 'toTree()'); - $t->can_ok( $obj , 'findNode' , 'findNode()'); - $t->can_ok( $obj , 'getXML' , 'getXML()'); - $obj = new Xml_document( 'name', 'type', 'value' ); - $t->diag('class Xml_document' ); - $t->isa_ok( $obj , 'Xml_document', 'class Xml_document created'); - $t->can_ok( $obj , 'parseXmlFile', 'parseXmlFile()'); - $t->can_ok( $obj , 'getXML' , 'getXML()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classXmlMenuTest.php b/workflow/engine/test/unit/gulliver/classXmlMenuTest.php deleted file mode 100644 index 90f4e174f..000000000 --- a/workflow/engine/test/unit/gulliver/classXmlMenuTest.php +++ /dev/null @@ -1,65 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - require_once( PATH_CORE . 'config' . PATH_SEP . 'environments.php'); - - global $G_ENVIRONMENTS; - if ( isset ( $G_ENVIRONMENTS ) ) { - $dbfile = $G_ENVIRONMENTS[ G_TEST_ENV ][ 'dbfile']; - if ( !file_exists ( $dbfile ) ) { - printf("%s \n", pakeColor::colorize( "dbfile $dbfile doesn't exist for environment " . G_ENVIRONMENT , 'ERROR')); - exit (200); - } - else - include ( $dbfile ); - } - else - exit (201); - G::LoadThirdParty('pear/json','class.json'); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'xmlMenu'); - $t = new lime_test(4, new lime_output_color()); - $obj = new xmlMenu( 'login/login' ); - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('xmlMenu'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class xmlMenu' ); - $t->is( $testItems , 12, "class xmlMenu " . $testItems . " methods." ); - $t->isa_ok( $obj , 'xmlMenu', 'class xmlMenu created'); - $t->can_ok( $obj, 'render', 'render()'); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/gulliver/classXmlformExtensionTest.php b/workflow/engine/test/unit/gulliver/classXmlformExtensionTest.php deleted file mode 100644 index fc265e2b7..000000000 --- a/workflow/engine/test/unit/gulliver/classXmlformExtensionTest.php +++ /dev/null @@ -1,49 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'xmlformExtension'); - - $t = new lime_test( 2, new lime_output_color()); - $obj ="database_base"; - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('XmlForm_Field_Label'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class XmlForm_Field_Label' ); - $t->is( $testItems , 18, "class XmlForm_Field_Label " . $testItems . " methods." ); - $t->todo( 'review all pendings in this class'); - diff --git a/workflow/engine/test/unit/gulliver/classXmlformTest.php b/workflow/engine/test/unit/gulliver/classXmlformTest.php deleted file mode 100644 index d692e4132..000000000 --- a/workflow/engine/test/unit/gulliver/classXmlformTest.php +++ /dev/null @@ -1,46 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . 'lime/lime.php'); - define ( 'G_ENVIRONMENT', G_TEST_ENV); - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'xmlform'); - $t = new lime_test( 2, new lime_output_color()); - $obj = "XmlForm_Field"; - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods('XmlForm_Field'); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - $t->diag('class XmlForm_Field' ); - $t->is( $testItems , 18, "class XmlForm_Field " . $testItems . " methods." ); - $t->todo( 'review all pendings in this class'); diff --git a/workflow/engine/test/unit/processmaker/classArchiveTest.php b/workflow/engine/test/unit/processmaker/classArchiveTest.php deleted file mode 100644 index 4ce88bba1..000000000 --- a/workflow/engine/test/unit/processmaker/classArchiveTest.php +++ /dev/null @@ -1,167 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - Propel::init( PATH_CORE . "config/databases.php"); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'archive'); - - $obj = new Archive ($dbc); - $t = new lime_test( 27, new lime_output_color() ); - - $className = Archive; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag( "class $className " ); - $t->isa_ok( $obj , $className, "class $className created" ); - - $t->is( count($methods) , 12, "class $className have " . 12 . ' methods.' ); - - //checking method 'archive' - $t->can_ok( $obj, 'archive', 'archive() is callable' ); - - //$result = $obj->archive ( $name); - //$t->isa_ok( $result, 'NULL', 'call to method archive '); - $t->todo( "call to method archive using $name "); - - - //checking method 'set_options' - $t->can_ok( $obj, 'set_options', 'set_options() is callable' ); - - //$result = $obj->set_options ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method set_options '); - $t->todo( "call to method set_options using $options "); - - - //checking method 'create_archive' - $t->can_ok( $obj, 'create_archive', 'create_archive() is callable' ); - - //$result = $obj->create_archive ( ); - //$t->isa_ok( $result, 'NULL', 'call to method create_archive '); - $t->todo( "call to method create_archive using "); - - - //checking method 'add_data' - $t->can_ok( $obj, 'add_data', 'add_data() is callable' ); - - //$result = $obj->add_data ( $data); - //$t->isa_ok( $result, 'NULL', 'call to method add_data '); - $t->todo( "call to method add_data using $data "); - - - //checking method 'make_list' - $t->can_ok( $obj, 'make_list', 'make_list() is callable' ); - - //$result = $obj->make_list ( ); - //$t->isa_ok( $result, 'NULL', 'call to method make_list '); - $t->todo( "call to method make_list using "); - - - //checking method 'add_files' - $t->can_ok( $obj, 'add_files', 'add_files() is callable' ); - - //$result = $obj->add_files ( $list); - //$t->isa_ok( $result, 'NULL', 'call to method add_files '); - $t->todo( "call to method add_files using $list "); - - - //checking method 'exclude_files' - $t->can_ok( $obj, 'exclude_files', 'exclude_files() is callable' ); - - //$result = $obj->exclude_files ( $list); - //$t->isa_ok( $result, 'NULL', 'call to method exclude_files '); - $t->todo( "call to method exclude_files using $list "); - - - //checking method 'store_files' - $t->can_ok( $obj, 'store_files', 'store_files() is callable' ); - - //$result = $obj->store_files ( $list); - //$t->isa_ok( $result, 'NULL', 'call to method store_files '); - $t->todo( "call to method store_files using $list "); - - - //checking method 'list_files' - $t->can_ok( $obj, 'list_files', 'list_files() is callable' ); - - //$result = $obj->list_files ( $list); - //$t->isa_ok( $result, 'NULL', 'call to method list_files '); - $t->todo( "call to method list_files using $list "); - - - //checking method 'parse_dir' - $t->can_ok( $obj, 'parse_dir', 'parse_dir() is callable' ); - - //$result = $obj->parse_dir ( $dirname); - //$t->isa_ok( $result, 'NULL', 'call to method parse_dir '); - $t->todo( "call to method parse_dir using $dirname "); - - - //checking method 'sort_files' - $t->can_ok( $obj, 'sort_files', 'sort_files() is callable' ); - - //$result = $obj->sort_files ( $a, $b); - //$t->isa_ok( $result, 'NULL', 'call to method sort_files '); - $t->todo( "call to method sort_files using $a, $b "); - - - //checking method 'download_file' - $t->can_ok( $obj, 'download_file', 'download_file() is callable' ); - - //$result = $obj->download_file ( ); - //$t->isa_ok( $result, 'NULL', 'call to method download_file '); - $t->todo( "call to method download_file using "); - - $t->todo ( 'review all pendings methods in this class'); - - ?> \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classArrayBasePeerTest.php b/workflow/engine/test/unit/processmaker/classArrayBasePeerTest.php deleted file mode 100644 index 8e10d29c2..000000000 --- a/workflow/engine/test/unit/processmaker/classArrayBasePeerTest.php +++ /dev/null @@ -1,229 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'ArrayPeer'); - - $t = new lime_test( 44, new lime_output_color() ); - $className = "ArrayBasePeer"; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - $t->diag("class $className" ); - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 21, "class $className have " . 21 . ' methods.' ); - $aMethods = array_keys ( $methods ); - - //checking method 'getMapBuilder' - $t->is ( $aMethods[0], 'getMapBuilder', 'getMapBuilder() is callable' ); - - //$result = $obj->getMapBuilder ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getMapBuilder '); - $t->todo( "call to method getMapBuilder using "); - - - //checking method 'getPhpNameMap' - $t->is ( $aMethods[1], 'getPhpNameMap', 'getPhpNameMap() is callable' ); - - //$result = $obj->getPhpNameMap ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getPhpNameMap '); - $t->todo( "call to method getPhpNameMap using "); - - //checking method 'translateFieldName' - $t->is ( $aMethods[2], 'translateFieldName', 'translateFieldName() is callable' ); - - //$result = $obj->translateFieldName ( $name, $fromType, $toType); - //$t->isa_ok( $result, 'NULL', 'call to method translateFieldName '); - $t->todo( "call to method translateFieldName using $name, $fromType, $toType "); - - - //checking method 'getFieldNames' - $t->is ( $aMethods[3], 'getFieldNames', 'getFieldNames() is callable' ); - - //$result = $obj->getFieldNames ( $type); - //$t->isa_ok( $result, 'NULL', 'call to method getFieldNames '); - $t->todo( "call to method getFieldNames using $type "); - - - //checking method 'alias' - $t->is ( $aMethods[4], 'alias', 'alias() is callable' ); - - //$result = $obj->alias ( $alias, $column); - //$t->isa_ok( $result, 'NULL', 'call to method alias '); - $t->todo( "call to method alias using $alias, $column "); - - //checking method 'addSelectColumns' - $t->is ( $aMethods[5], 'addSelectColumns', 'addSelectColumns() is callable' ); - - //$result = $obj->addSelectColumns ( $criteria); - //$t->isa_ok( $result, 'NULL', 'call to method addSelectColumns '); - $t->todo( "call to method addSelectColumns using $criteria "); - - - //checking method 'doCount' - $t->is ( $aMethods[6], 'doCount', 'doCount() is callable' ); - - //$result = $obj->doCount ( $criteria, $distinct, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doCount '); - $t->todo( "call to method doCount using $criteria, $distinct, $con "); - - - //checking method 'doSelectOne' - $t->is ( $aMethods[7], 'doSelectOne', 'doSelectOne() is callable' ); - - //$result = $obj->doSelectOne ( $criteria, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doSelectOne '); - $t->todo( "call to method doSelectOne using $criteria, $con "); - - - //checking method 'createSelectSql' - $t->is ( $aMethods[8], 'createSelectSql', 'createSelectSql() is callable' ); - - //$result = $obj->createSelectSql ( $criteria, $tableName, $params); - //$t->isa_ok( $result, 'NULL', 'call to method createSelectSql '); - $t->todo( "call to method createSelectSql using $criteria, $tableName, $params "); - - - //checking method 'doSelect' - $t->is ( $aMethods[9], 'doSelect', 'doSelect() is callable' ); - - //$result = $obj->doSelect ( $criteria, $tableName, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doSelect '); - $t->todo( "call to method doSelect using $criteria, $tableName, $con "); - - - //checking method 'doSelectRS' - $t->is ( $aMethods[10], 'doSelectRS', 'doSelectRS() is callable' ); - - //$result = $obj->doSelectRS ( $criteria, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doSelectRS '); - $t->todo( "call to method doSelectRS using $criteria, $con "); - - - //checking method 'populateObjects' - $t->is ( $aMethods[11], 'populateObjects', 'populateObjects() is callable' ); - - //$result = $obj->populateObjects ( $rs); - //$t->isa_ok( $result, 'NULL', 'call to method populateObjects '); - $t->todo( "call to method populateObjects using $rs "); - - - //checking method 'getTableMap' - $t->is ( $aMethods[12], 'getTableMap', 'getTableMap() is callable' ); - - //$result = $obj->getTableMap ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getTableMap '); - $t->todo( "call to method getTableMap using "); - - - //checking method 'getOMClass' - $t->is ( $aMethods[13], 'getOMClass', 'getOMClass() is callable' ); - - //$result = $obj->getOMClass ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getOMClass '); - $t->todo( "call to method getOMClass using "); - - - //checking method 'doInsert' - $t->is ( $aMethods[14], 'doInsert', 'doInsert() is callable' ); - - //$result = $obj->doInsert ( $values, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doInsert '); - $t->todo( "call to method doInsert using $values, $con "); - - - //checking method 'doUpdate' - $t->is ( $aMethods[15], 'doUpdate', 'doUpdate() is callable' ); - - //$result = $obj->doUpdate ( $values, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doUpdate '); - $t->todo( "call to method doUpdate using $values, $con "); - - - //checking method 'doDeleteAll' - $t->is ( $aMethods[16], 'doDeleteAll', 'doDeleteAll() is callable' ); - - //$result = $obj->doDeleteAll ( $con); - //$t->isa_ok( $result, 'NULL', 'call to method doDeleteAll '); - $t->todo( "call to method doDeleteAll using $con "); - - - //checking method 'doDelete' - $t->is ( $aMethods[17], 'doDelete', 'doDelete() is callable' ); - - //$result = $obj->doDelete ( $values, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doDelete '); - $t->todo( "call to method doDelete using $values, $con "); - - - //checking method 'doValidate' - $t->is ( $aMethods[18], 'doValidate', 'doValidate() is callable' ); - - //$result = $obj->doValidate ( $obj, $cols); - //$t->isa_ok( $result, 'NULL', 'call to method doValidate '); - $t->todo( "call to method doValidate using $obj, $cols "); - - - //checking method 'retrieveByPK' - $t->is ( $aMethods[19], 'retrieveByPK', 'retrieveByPK() is callable' ); - - //$result = $obj->retrieveByPK ( $pk, $con); - //$t->isa_ok( $result, 'NULL', 'call to method retrieveByPK '); - $t->todo( "call to method retrieveByPK using $pk, $con "); - - - //checking method 'retrieveByPKs' - $t->is ( $aMethods[20], 'retrieveByPKs', 'retrieveByPKs() is callable' ); - - //$result = $obj->retrieveByPKs ( $pks, $con); - //$t->isa_ok( $result, 'NULL', 'call to method retrieveByPKs '); - $t->todo( "call to method retrieveByPKs using $pks, $con "); - - - - $t->todo ( 'review all pendings methods in this class'); - diff --git a/workflow/engine/test/unit/processmaker/classBasePeerTest.php b/workflow/engine/test/unit/processmaker/classBasePeerTest.php deleted file mode 100644 index 659f2fd32..000000000 --- a/workflow/engine/test/unit/processmaker/classBasePeerTest.php +++ /dev/null @@ -1,183 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'BasePeer'); - - - $obj = new BasePeer ($dbc); - $t = new lime_test( 31, new lime_output_color() ); - - $className = BasePeer; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 14, "class $className have " . 14 . ' methods.' ); - - //checking method 'getFieldnames' - $t->can_ok( $obj, 'getFieldnames', 'getFieldnames() is callable' ); - - //$result = $obj->getFieldnames ( $classname, $type); - //$t->isa_ok( $result, 'NULL', 'call to method getFieldnames '); - $t->todo( "call to method getFieldnames using $classname, $type "); - - - //checking method 'translateFieldname' - $t->can_ok( $obj, 'translateFieldname', 'translateFieldname() is callable' ); - - //$result = $obj->translateFieldname ( $classname, $fieldname, $fromType, $toType); - //$t->isa_ok( $result, 'NULL', 'call to method translateFieldname '); - $t->todo( "call to method translateFieldname using $classname, $fieldname, $fromType, $toType "); - - - //checking method 'doDelete' - $t->can_ok( $obj, 'doDelete', 'doDelete() is callable' ); - - //$result = $obj->doDelete ( $criteria, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doDelete '); - $t->todo( "call to method doDelete using $criteria, $con "); - - - //checking method 'doDeleteAll' - $t->can_ok( $obj, 'doDeleteAll', 'doDeleteAll() is callable' ); - - //$result = $obj->doDeleteAll ( $tableName, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doDeleteAll '); - $t->todo( "call to method doDeleteAll using $tableName, $con "); - - - //checking method 'doInsert' - $t->can_ok( $obj, 'doInsert', 'doInsert() is callable' ); - - //$result = $obj->doInsert ( $criteria, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doInsert '); - $t->todo( "call to method doInsert using $criteria, $con "); - - - //checking method 'doUpdate' - $t->can_ok( $obj, 'doUpdate', 'doUpdate() is callable' ); - - //$result = $obj->doUpdate ( $selectCriteria, $updateValues, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doUpdate '); - $t->todo( "call to method doUpdate using $selectCriteria, $updateValues, $con "); - - - //checking method 'doSelect' - $t->can_ok( $obj, 'doSelect', 'doSelect() is callable' ); - - //$result = $obj->doSelect ( $criteria, $con); - //$t->isa_ok( $result, 'NULL', 'call to method doSelect '); - $t->todo( "call to method doSelect using $criteria, $con "); - - - //checking method 'doValidate' - $t->can_ok( $obj, 'doValidate', 'doValidate() is callable' ); - - //$result = $obj->doValidate ( $dbName, $tableName, $columns); - //$t->isa_ok( $result, 'NULL', 'call to method doValidate '); - $t->todo( "call to method doValidate using $dbName, $tableName, $columns "); - - - //checking method 'getPrimaryKey' - $t->can_ok( $obj, 'getPrimaryKey', 'getPrimaryKey() is callable' ); - - //$result = $obj->getPrimaryKey ( $criteria); - //$t->isa_ok( $result, 'NULL', 'call to method getPrimaryKey '); - $t->todo( "call to method getPrimaryKey using $criteria "); - - - //checking method 'createSelectSql' - $t->can_ok( $obj, 'createSelectSql', 'createSelectSql() is callable' ); - - //$result = $obj->createSelectSql ( $criteria, $params); - //$t->isa_ok( $result, 'NULL', 'call to method createSelectSql '); - $t->todo( "call to method createSelectSql using $criteria, $params "); - - - //checking method 'buildParams' - $t->can_ok( $obj, 'buildParams', 'buildParams() is callable' ); - - //$result = $obj->buildParams ( $columns, $values); - //$t->isa_ok( $result, 'NULL', 'call to method buildParams '); - $t->todo( "call to method buildParams using $columns, $values "); - - - //checking method 'populateStmtValues' - $t->can_ok( $obj, 'populateStmtValues', 'populateStmtValues() is callable' ); - - //$result = $obj->populateStmtValues ( $stmt, $params, $dbMap); - //$t->isa_ok( $result, 'NULL', 'call to method populateStmtValues '); - $t->todo( "call to method populateStmtValues using $stmt, $params, $dbMap "); - - - //checking method 'getValidator' - $t->can_ok( $obj, 'getValidator', 'getValidator() is callable' ); - - //$result = $obj->getValidator ( $classname); - //$t->isa_ok( $result, 'NULL', 'call to method getValidator '); - $t->todo( "call to method getValidator using $classname "); - - - //checking method 'getMapBuilder' - $t->can_ok( $obj, 'getMapBuilder', 'getMapBuilder() is callable' ); - - //$result = $obj->getMapBuilder ( $classname); - //$t->isa_ok( $result, 'NULL', 'call to method getMapBuilder '); - $t->todo( "call to method getMapBuilder using $classname "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classCasesTest.php b/workflow/engine/test/unit/processmaker/classCasesTest.php deleted file mode 100644 index 24248e458..000000000 --- a/workflow/engine/test/unit/processmaker/classCasesTest.php +++ /dev/null @@ -1,638 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php'; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'case'); - - - //$obj = new Cases ($dbc); - $t = new lime_test( 3, new lime_output_color() ); - - $className = "Cases"; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $className = ucwords($className); - $t->diag("class $className" ); - - $t->is( count($methods) , 75, "class $className have " . 73 . ' methods.' ); - - // Methods - $aMethods = array_keys ( $methods ); - - - /* - //checking method 'canStartCase' - $t->is ( $aMethods[0], 'canStartCase', 'canStartCase() is callable' ); - - //$result = $obj->canStartCase ( $sUIDUser); - //$t->isa_ok( $result, 'NULL', 'call to method canStartCase '); - $t->todo( "call to method canStartCase using $sUIDUser "); - - - //checking method 'getStartCases' - $t->is ( $aMethods[1], 'getStartCases', 'getStartCases() is callable' ); - - //$result = $obj->getStartCases ( $sUIDUser); - //$t->isa_ok( $result, 'NULL', 'call to method getStartCases '); - $t->todo( "call to method getStartCases using $sUIDUser "); - - //checking method 'loadCase' - $t->is ( $aMethods[2], 'loadCase', 'loadCase() is callable' ); - - //$result = $obj->loadCase ( $sAppUid, $iDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method loadCase '); - $t->todo( "call to method loadCase using $sAppUid, $iDelIndex "); - - - //checking method 'loadCaseByNumber' - $t->is ( $aMethods[3], 'loadCaseByNumber', 'loadCaseByNumber() is callable' ); - - //$result = $obj->loadCaseByNumber ( $sCaseNumber); - //$t->isa_ok( $result, 'NULL', 'call to method loadCaseByNumber '); - $t->todo( "call to method loadCaseByNumber using $sCaseNumber "); - - - //checking method 'refreshCaseLabel' - $t->is ( $aMethods[4], 'refreshCaseLabel', 'refreshCaseLabel() is callable' ); - - //$result = $obj->refreshCaseLabel ( $sAppUid, $aAppData, $sLabel); - //$t->isa_ok( $result, 'NULL', 'call to method refreshCaseLabel '); - $t->todo( "call to method refreshCaseLabel using $sAppUid, $aAppData, $sLabel "); - - - //checking method 'refreshCaseTitle' - $t->is ( $aMethods[5], 'refreshCaseTitle', 'refreshCaseTitle() is callable' ); - - //$result = $obj->refreshCaseTitle ( $sAppUid, $aAppData); - //$t->isa_ok( $result, 'NULL', 'call to method refreshCaseTitle '); - $t->todo( "call to method refreshCaseTitle using $sAppUid, $aAppData "); - - - //checking method 'refreshCaseDescription' - $t->is ( $aMethods[6], 'refreshCaseDescription', 'refreshCaseDescription() is callable' ); - - //$result = $obj->refreshCaseDescription ( $sAppUid, $aAppData); - //$t->isa_ok( $result, 'NULL', 'call to method refreshCaseDescription '); - $t->todo( "call to method refreshCaseDescription using $sAppUid, $aAppData "); - - - //checking method 'refreshCaseStatusCode' - $t->is ( $aMethods[7], 'refreshCaseStatusCode', 'refreshCaseStatusCode() is callable' ); - - //$result = $obj->refreshCaseStatusCode ( $sAppUid, $aAppData); - //$t->isa_ok( $result, 'NULL', 'call to method refreshCaseStatusCode '); - $t->todo( "call to method refreshCaseStatusCode using $sAppUid, $aAppData "); - - - //checking method 'updateCase' - $t->is ( $aMethods[8], 'updateCase', 'updateCase() is callable' ); - - //$result = $obj->updateCase ( $sAppUid, $Fields); - //$t->isa_ok( $result, 'NULL', 'call to method updateCase '); - $t->todo( "call to method updateCase using $sAppUid, $Fields "); - - - //checking method 'removeCase' - $t->is ( $aMethods[9], 'removeCase', 'removeCase() is callable' ); - - //$result = $obj->removeCase ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method removeCase '); - $t->todo( "call to method removeCase using $sAppUid "); - - - //checking method 'setDelInitDate' - $t->is ( $aMethods[10], 'setDelInitDate', 'setDelInitDate() is callable' ); - - //$result = $obj->setDelInitDate ( $sAppUid, $iDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method setDelInitDate '); - $t->todo( "call to method setDelInitDate using $sAppUid, $iDelIndex "); - - - //checking method 'GetOpenThreads' - $t->is ( $aMethods[11], 'GetOpenThreads', 'GetOpenThreads() is callable' ); - - //$result = $obj->GetOpenThreads ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method GetOpenThreads '); - $t->todo( "call to method GetOpenThreads using $sAppUid "); - - - //checking method 'getSiblingThreads' - $t->is ( $aMethods[12], 'getSiblingThreads', 'getSiblingThreads() is callable' ); - - //$result = $obj->getSiblingThreads ( $sAppUid, $iDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method getSiblingThreads '); - $t->todo( "call to method getSiblingThreads using $sAppUid, $iDelIndex "); - - - //checking method 'getOpenSiblingThreads' - $t->is ( $aMethods[13], 'getOpenSiblingThreads', 'getOpenSiblingThreads() is callable' ); - - //$result = $obj->getOpenSiblingThreads ( $sNextTask, $sAppUid, $iDelIndex, $sCurrentTask); - //$t->isa_ok( $result, 'NULL', 'call to method getOpenSiblingThreads '); - $t->todo( "call to method getOpenSiblingThreads using $sNextTask, $sAppUid, $iDelIndex, $sCurrentTask "); - - - //checking method 'CountTotalPreviousTasks' - $t->is ( $aMethods[14], 'CountTotalPreviousTasks', 'CountTotalPreviousTasks() is callable' ); - - //$result = $obj->CountTotalPreviousTasks ( $sTasUid); - //$t->isa_ok( $result, 'NULL', 'call to method CountTotalPreviousTasks '); - $t->todo( "call to method CountTotalPreviousTasks using $sTasUid "); - - - //checking method 'getOpenNullDelegations' - $t->is ( $aMethods[15], 'getOpenNullDelegations', 'getOpenNullDelegations() is callable' ); - - //$result = $obj->getOpenNullDelegations ( $sAppUid, $sTasUid); - //$t->isa_ok( $result, 'NULL', 'call to method getOpenNullDelegations '); - $t->todo( "call to method getOpenNullDelegations using $sAppUid, $sTasUid "); - - - //checking method 'isRouteOpen' - $t->is ( $aMethods[16], 'isRouteOpen', 'isRouteOpen() is callable' ); - - //$result = $obj->isRouteOpen ( $sAppUid, $sTasUid); - //$t->isa_ok( $result, 'NULL', 'call to method isRouteOpen '); - $t->todo( "call to method isRouteOpen using $sAppUid, $sTasUid "); - - - //checking method 'newAppDelegation' - $t->is ( $aMethods[17], 'newAppDelegation', 'newAppDelegation() is callable' ); - - //$result = $obj->newAppDelegation ( $sProUid, $sAppUid, $sTasUid, $sUsrUid, $sPrevious, $iPriority, $sDelType, $iAppThreadIndex); - //$t->isa_ok( $result, 'NULL', 'call to method newAppDelegation '); - $t->todo( "call to method newAppDelegation using $sProUid, $sAppUid, $sTasUid, $sUsrUid, $sPrevious, $iPriority, $sDelType, $iAppThreadIndex "); - - - //checking method 'updateAppDelegation' - $t->is ( $aMethods[18], 'updateAppDelegation', 'updateAppDelegation() is callable' ); - - //$result = $obj->updateAppDelegation ( $sAppUid, $iDelIndex, $iAppThreadIndex); - //$t->isa_ok( $result, 'NULL', 'call to method updateAppDelegation '); - $t->todo( "call to method updateAppDelegation using $sAppUid, $iDelIndex, $iAppThreadIndex "); - - - //checking method 'GetAllDelegations' - $t->is ( $aMethods[19], 'GetAllDelegations', 'GetAllDelegations() is callable' ); - - //$result = $obj->GetAllDelegations ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method GetAllDelegations '); - $t->todo( "call to method GetAllDelegations using $sAppUid "); - - - //checking method 'GetAllThreads' - $t->is ( $aMethods[20], 'GetAllThreads', 'GetAllThreads() is callable' ); - - //$result = $obj->GetAllThreads ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method GetAllThreads '); - $t->todo( "call to method GetAllThreads using $sAppUid "); - - - //checking method 'updateAppThread' - $t->is ( $aMethods[21], 'updateAppThread', 'updateAppThread() is callable' ); - - //$result = $obj->updateAppThread ( $sAppUid, $iAppThreadIndex, $iNewDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method updateAppThread '); - $t->todo( "call to method updateAppThread using $sAppUid, $iAppThreadIndex, $iNewDelIndex "); - - - //checking method 'closeAppThread' - $t->is ( $aMethods[22], 'closeAppThread', 'closeAppThread() is callable' ); - - //$result = $obj->closeAppThread ( $sAppUid, $iAppThreadIndex); - //$t->isa_ok( $result, 'NULL', 'call to method closeAppThread '); - $t->todo( "call to method closeAppThread using $sAppUid, $iAppThreadIndex "); - - - //checking method 'closeAllThreads' - $t->is ( $aMethods[23], 'closeAllThreads', 'closeAllThreads() is callable' ); - - //$result = $obj->closeAllThreads ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method closeAllThreads '); - $t->todo( "call to method closeAllThreads using $sAppUid "); - - - //checking method 'newAppThread' - $t->is ( $aMethods[24], 'newAppThread', 'newAppThread() is callable' ); - - //$result = $obj->newAppThread ( $sAppUid, $iNewDelIndex, $iAppParent); - //$t->isa_ok( $result, 'NULL', 'call to method newAppThread '); - $t->todo( "call to method newAppThread using $sAppUid, $iNewDelIndex, $iAppParent "); - - - //checking method 'closeAllDelegations' - $t->is ( $aMethods[25], 'closeAllDelegations', 'closeAllDelegations() is callable' ); - - //$result = $obj->closeAllDelegations ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method closeAllDelegations '); - $t->todo( "call to method closeAllDelegations using $sAppUid "); - - - //checking method 'CloseCurrentDelegation' - $t->is ( $aMethods[26], 'CloseCurrentDelegation', 'CloseCurrentDelegation() is callable' ); - - //$result = $obj->CloseCurrentDelegation ( $sAppUid, $iDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method CloseCurrentDelegation '); - $t->todo( "call to method CloseCurrentDelegation using $sAppUid, $iDelIndex "); - - - //checking method 'ReactivateCurrentDelegation' - $t->is ( $aMethods[27], 'ReactivateCurrentDelegation', 'ReactivateCurrentDelegation() is callable' ); - - //$result = $obj->ReactivateCurrentDelegation ( $sAppUid, $iDelegation); - //$t->isa_ok( $result, 'NULL', 'call to method ReactivateCurrentDelegation '); - $t->todo( "call to method ReactivateCurrentDelegation using $sAppUid, $iDelegation "); - - - //checking method 'startCase' - $t->is ( $aMethods[28], 'startCase', 'startCase() is callable' ); - - //$result = $obj->startCase ( $sTasUid, $sUsrUid); - //$t->isa_ok( $result, 'NULL', 'call to method startCase '); - $t->todo( "call to method startCase using $sTasUid, $sUsrUid "); - - - //checking method 'getNextStep' - $t->is ( $aMethods[29], 'getNextStep', 'getNextStep() is callable' ); - - //$result = $obj->getNextStep ( $sProUid, $sAppUid, $iDelIndex, $iPosition); - //$t->isa_ok( $result, 'NULL', 'call to method getNextStep '); - $t->todo( "call to method getNextStep using $sProUid, $sAppUid, $iDelIndex, $iPosition "); - - - //checking method 'getPreviousStep' - $t->is ( $aMethods[30], 'getPreviousStep', 'getPreviousStep() is callable' ); - - //$result = $obj->getPreviousStep ( $sProUid, $sAppUid, $iDelIndex, $iPosition); - //$t->isa_ok( $result, 'NULL', 'call to method getPreviousStep '); - $t->todo( "call to method getPreviousStep using $sProUid, $sAppUid, $iDelIndex, $iPosition "); - - - //checking method 'getNextSupervisorStep' - $t->is ( $aMethods[31], 'getNextSupervisorStep', 'getNextSupervisorStep() is callable' ); - - //$result = $obj->getNextSupervisorStep ( $sProcessUID, $iPosition, $sType); - //$t->isa_ok( $result, 'NULL', 'call to method getNextSupervisorStep '); - $t->todo( "call to method getNextSupervisorStep using $sProcessUID, $iPosition, $sType "); - - - //checking method 'getPreviousSupervisorStep' - $t->is ( $aMethods[32], 'getPreviousSupervisorStep', 'getPreviousSupervisorStep() is callable' ); - - //$result = $obj->getPreviousSupervisorStep ( $sProcessUID, $iPosition, $sType); - //$t->isa_ok( $result, 'NULL', 'call to method getPreviousSupervisorStep '); - $t->todo( "call to method getPreviousSupervisorStep using $sProcessUID, $iPosition, $sType "); - - - //checking method 'getTransferHistoryCriteria' - $t->is ( $aMethods[33], 'getTransferHistoryCriteria', 'getTransferHistoryCriteria() is callable' ); - - //$result = $obj->getTransferHistoryCriteria ( $sAppUid); - //$t->isa_ok( $result, 'NULL', 'call to method getTransferHistoryCriteria '); - $t->todo( "call to method getTransferHistoryCriteria using $sAppUid "); - - //checking method 'prepareCriteriaForToDo' - $t->is ( $aMethods[34], 'prepareCriteriaForToDo', 'prepareCriteriaForToDo() is callable' ); - - //$result = $obj->getConditionCasesList ( $sTypeList, $sUIDUserLogged); - //$t->isa_ok( $result, 'NULL', 'call to method getConditionCasesList '); - $t->todo( "call to method prepareCriteriaForToDo using $sTypeList, $sUIDUserLogged "); - - - //checking method 'getConditionCasesList' - $t->is ( $aMethods[35], 'getConditionCasesList', 'getConditionCasesList() is callable' ); - - //$result = $obj->getConditionCasesList ( $sTypeList, $sUIDUserLogged); - //$t->isa_ok( $result, 'NULL', 'call to method getConditionCasesList '); - $t->todo( "call to method getConditionCasesList using $sTypeList, $sUIDUserLogged "); - - - //checking method 'ThrowUnpauseDaemon' - $t->is ( $aMethods[36], 'ThrowUnpauseDaemon', 'ThrowUnpauseDaemon() is callable' ); - - //$result = $obj->ThrowUnpauseDaemon ( ); - //$t->isa_ok( $result, 'NULL', 'call to method ThrowUnpauseDaemon '); - $t->todo( "call to method ThrowUnpauseDaemon using "); - - - //checking method 'getApplicationUIDByNumber' - $t->is ( $aMethods[37], 'getApplicationUIDByNumber', 'getApplicationUIDByNumber() is callable' ); - - //$result = $obj->getApplicationUIDByNumber ( $iApplicationNumber); - //$t->isa_ok( $result, 'NULL', 'call to method getApplicationUIDByNumber '); - $t->todo( "call to method getApplicationUIDByNumber using $iApplicationNumber "); - - - //checking method 'getCurrentDelegation' - $t->is ( $aMethods[38], 'getCurrentDelegation', 'getCurrentDelegation() is callable' ); - - //$result = $obj->getCurrentDelegation ( $sApplicationUID, $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getCurrentDelegation '); - $t->todo( "call to method getCurrentDelegation using $sApplicationUID, $sUserUID "); - - - //checking method 'loadTriggers' - $t->is ( $aMethods[39], 'loadTriggers', 'loadTriggers() is callable' ); - - //$result = $obj->loadTriggers ( $sTasUid, $sStepType, $sStepUidObj, $sTriggerType); - //$t->isa_ok( $result, 'NULL', 'call to method loadTriggers '); - $t->todo( "call to method loadTriggers using $sTasUid, $sStepType, $sStepUidObj, $sTriggerType "); - - - //checking method 'executeTriggers' - $t->is ( $aMethods[40], 'executeTriggers', 'executeTriggers() is callable' ); - - //$result = $obj->executeTriggers ( $sTasUid, $sStepType, $sStepUidObj, $sTriggerType, $aFields); - //$t->isa_ok( $result, 'NULL', 'call to method executeTriggers '); - $t->todo( "call to method executeTriggers using $sTasUid, $sStepType, $sStepUidObj, $sTriggerType, $aFields "); - - - //checking method 'getTriggerNames' - $t->is ( $aMethods[41], 'getTriggerNames', 'getTriggerNames() is callable' ); - - //$result = $obj->getTriggerNames ( $triggers); - //$t->isa_ok( $result, 'NULL', 'call to method getTriggerNames '); - $t->todo( "call to method getTriggerNames using $triggers "); - - - //checking method 'getInputDocumentsCriteria' - $t->is ( $aMethods[42], 'getInputDocumentsCriteria', 'getInputDocumentsCriteria() is callable' ); - - //$result = $obj->getInputDocumentsCriteria ( $sApplicationUID, $iDelegation, $sDocumentUID); - //$t->isa_ok( $result, 'NULL', 'call to method getInputDocumentsCriteria '); - $t->todo( "call to method getInputDocumentsCriteria using $sApplicationUID, $iDelegation, $sDocumentUID "); - - //checking method 'getInputDocumentsCriteriaToRevise' - $t->is ( $aMethods[43], 'getInputDocumentsCriteriaToRevise', 'getInputDocumentsCriteriaToRevise() is callable' ); - - //$result = $obj->getInputDocumentsCriteriaToRevise ( $sApplicationUID); - //$t->isa_ok( $result, 'NULL', 'call to method getInputDocumentsCriteriaToRevise '); - $t->todo( "call to method getInputDocumentsCriteriaToRevise using $sApplicationUID "); - - - //checking method 'getOutputDocumentsCriteriaToRevise' - $t->is ( $aMethods[44], 'getOutputDocumentsCriteriaToRevise', 'getOutputDocumentsCriteriaToRevise() is callable' ); - - //$result = $obj->getOutputDocumentsCriteriaToRevise ( $sApplicationUID); - //$t->isa_ok( $result, 'NULL', 'call to method getOutputDocumentsCriteriaToRevise '); - $t->todo( "call to method getOutputDocumentsCriteriaToRevise using $sApplicationUID "); - - - //checking method 'getCriteriaProcessCases' - $t->is ( $aMethods[45], 'getCriteriaProcessCases', 'getCriteriaProcessCases() is callable' ); - - //$result = $obj->getCriteriaProcessCases ( $status, $PRO_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getCriteriaProcessCases '); - $t->todo( "call to method getCriteriaProcessCases using $status, $PRO_UID "); - - - //checking method 'pauseCase' - $t->is ( $aMethods[46], 'pauseCase', 'pauseCase() is callable' ); - - //$result = $obj->pauseCase ( $sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate); - //$t->isa_ok( $result, 'NULL', 'call to method pauseCase '); - $t->todo( "call to method pauseCase using $sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate "); - - - //checking method 'unpauseCase' - $t->is ( $aMethods[47], 'unpauseCase', 'unpauseCase() is callable' ); - - //$result = $obj->unpauseCase ( $sApplicationUID, $iDelegation, $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method unpauseCase '); - $t->todo( "call to method unpauseCase using $sApplicationUID, $iDelegation, $sUserUID "); - - - //checking method 'cancelCase' - $t->is ( $aMethods[48], 'cancelCase', 'cancelCase() is callable' ); - - //$result = $obj->cancelCase ( $sApplicationUID, $iIndex, $user_logged); - //$t->isa_ok( $result, 'NULL', 'call to method cancelCase '); - $t->todo( "call to method cancelCase using $sApplicationUID, $iIndex, $user_logged "); - - - //checking method 'reactivateCase' - $t->is ( $aMethods[49], 'reactivateCase', 'reactivateCase() is callable' ); - - //$result = $obj->reactivateCase ( $sApplicationUID, $iIndex, $user_logged); - //$t->isa_ok( $result, 'NULL', 'call to method reactivateCase '); - $t->todo( "call to method reactivateCase using $sApplicationUID, $iIndex, $user_logged "); - - - //checking method 'reassignCase' - $t->is ( $aMethods[50], 'reassignCase', 'reassignCase() is callable' ); - - //$result = $obj->reassignCase ( $sApplicationUID, $iDelegation, $sUserUID, $newUserUID, $sType); - //$t->isa_ok( $result, 'NULL', 'call to method reassignCase '); - $t->todo( "call to method reassignCase using $sApplicationUID, $iDelegation, $sUserUID, $newUserUID, $sType "); - - - //checking method 'getAllDynaformsStepsToRevise' - $t->is ( $aMethods[51], 'getAllDynaformsStepsToRevise', 'getAllDynaformsStepsToRevise() is callable' ); - - //$result = $obj->getAllDynaformsStepsToRevise ( $APP_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllDynaformsStepsToRevise '); - $t->todo( "call to method getAllDynaformsStepsToRevise using $APP_UID "); - - - //checking method 'getAllInputsStepsToRevise' - $t->is ( $aMethods[52], 'getAllInputsStepsToRevise', 'getAllInputsStepsToRevise() is callable' ); - - //$result = $obj->getAllInputsStepsToRevise ( $APP_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllInputsStepsToRevise '); - $t->todo( "call to method getAllInputsStepsToRevise using $APP_UID "); - - - //checking method 'getAllUploadedDocumentsCriteria' - $t->is ( $aMethods[53], 'getAllUploadedDocumentsCriteria', 'getAllUploadedDocumentsCriteria() is callable' ); - - //$result = $obj->getAllUploadedDocumentsCriteria ( $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllUploadedDocumentsCriteria '); - $t->todo( "call to method getAllUploadedDocumentsCriteria using $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID "); - - - //checking method 'getAllGeneratedDocumentsCriteria' - $t->is ( $aMethods[54], 'getAllGeneratedDocumentsCriteria', 'getAllGeneratedDocumentsCriteria() is callable' ); - - //$result = $obj->getAllGeneratedDocumentsCriteria ( $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllGeneratedDocumentsCriteria '); - $t->todo( "call to method getAllGeneratedDocumentsCriteria using $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID "); - - - //checking method 'getallDynaformsCriteria' - $t->is ( $aMethods[55], 'getallDynaformsCriteria', 'getallDynaformsCriteria() is callable' ); - - //$result = $obj->getallDynaformsCriteria ( $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getallDynaformsCriteria '); - $t->todo( "call to method getallDynaformsCriteria using $sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID "); - - - //checking method 'sendNotifications' - $t->is ( $aMethods[56], 'sendNotifications', 'sendNotifications() is callable' ); - - //$result = $obj->sendNotifications ( $sCurrentTask, $aTasks, $aFields, $sApplicationUID, $iDelegation, $sFrom); - //$t->isa_ok( $result, 'NULL', 'call to method sendNotifications '); - $t->todo( "call to method sendNotifications using $sCurrentTask, $aTasks, $aFields, $sApplicationUID, $iDelegation, $sFrom "); - - - //checking method 'getAllObjects' - $t->is ( $aMethods[57], 'getAllObjects', 'getAllObjects() is callable' ); - - //$result = $obj->getAllObjects ( $PRO_UID, $APP_UID, $TAS_UID, $USR_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllObjects '); - $t->todo( "call to method getAllObjects using $PRO_UID, $APP_UID, $TAS_UID, $USR_UID "); - - - //checking method 'getAllObjectsFrom' - $t->is ( $aMethods[58], 'getAllObjectsFrom', 'getAllObjectsFrom() is callable' ); - - //$result = $obj->getAllObjectsFrom ( $PRO_UID, $APP_UID, $TAS_UID, $USR_UID, $ACTION); - //$t->isa_ok( $result, 'NULL', 'call to method getAllObjectsFrom '); - $t->todo( "call to method getAllObjectsFrom using $PRO_UID, $APP_UID, $TAS_UID, $USR_UID, $ACTION "); - - - //checking method 'verifyCaseTracker' - $t->is ( $aMethods[59], 'verifyCaseTracker', 'verifyCaseTracker() is callable' ); - - //$result = $obj->verifyCaseTracker ( $case, $pin); - //$t->isa_ok( $result, 'NULL', 'call to method verifyCaseTracker '); - $t->todo( "call to method verifyCaseTracker using $case, $pin "); - - - //checking method 'Permisos' - $t->is ( $aMethods[60], 'Permisos', 'Permisos() is callable' ); - - //$result = $obj->caseTrackerPermissions ( $PRO_UID); - //$t->isa_ok( $result, 'NULL', 'call to method Permisos '); - $t->todo( "call to method Permisos using $PRO_UID "); - - - //checking method 'verifyTable' - $t->is ( $aMethods[61], 'verifyTable', 'verifyTable() is callable' ); - - //$result = $obj->verifyTable ( ); - //$t->isa_ok( $result, 'NULL', 'call to method verifyTable '); - $t->todo( "call to method verifyTable using "); - - - //checking method 'getAllUploadedDocumentsCriteriaTracker' - $t->is ( $aMethods[62], 'getAllUploadedDocumentsCriteriaTracker', 'getAllUploadedDocumentsCriteriaTracker() is callable' ); - - //$result = $obj->getAllUploadedDocumentsCriteriaTracker ( $sProcessUID, $sApplicationUID, $sDocUID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllUploadedDocumentsCriteriaTracker '); - $t->todo( "call to method getAllUploadedDocumentsCriteriaTracker using $sProcessUID, $sApplicationUID, $sDocUID "); - - - //checking method 'getAllGeneratedDocumentsCriteriaTracker' - $t->is ( $aMethods[63], 'getAllGeneratedDocumentsCriteriaTracker', 'getAllGeneratedDocumentsCriteriaTracker() is callable' ); - - //$result = $obj->getAllGeneratedDocumentsCriteriaTracker ( $sProcessUID, $sApplicationUID, $sDocUID); - //$t->isa_ok( $result, 'NULL', 'call to method getAllGeneratedDocumentsCriteriaTracker '); - $t->todo( "call to method getAllGeneratedDocumentsCriteriaTracker using $sProcessUID, $sApplicationUID, $sDocUID "); - - - //checking method 'getHistoryMessagesTracker' - $t->is ( $aMethods[64], 'getHistoryMessagesTracker', 'getHistoryMessagesTracker() is callable' ); - - //$result = $obj->getHistoryMessagesTracker ( $sApplicationUID); - //$t->isa_ok( $result, 'NULL', 'call to method getHistoryMessagesTracker '); - $t->todo( "call to method getHistoryMessagesTracker using $sApplicationUID "); - - - //checking method 'getHistoryMessagesTrackerView' - $t->is ( $aMethods[65], 'getHistoryMessagesTrackerView', 'getHistoryMessagesTrackerView() is callable' ); - - //$result = $obj->getHistoryMessagesTrackerView ( $sApplicationUID, $Msg_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getHistoryMessagesTrackerView '); - $t->todo( "call to method getHistoryMessagesTrackerView using $sApplicationUID, $Msg_UID "); - - - //checking method 'getAllObjectsFromProcess' - $t->is ( $aMethods[66], 'getAllObjectsFromProcess', 'getAllObjectsFromProcess() is callable' ); - - //$result = $obj->getAllObjectsFromProcess ( $PRO_UID, $OBJ_TYPE); - //$t->isa_ok( $result, 'NULL', 'call to method getAllObjectsFromProcess '); - $t->todo( "call to method getAllObjectsFromProcess using $PRO_UID, $OBJ_TYPE "); - - - //checking method 'executeTriggersAfterExternal' - $t->is ( $aMethods[67], 'executeTriggersAfterExternal', 'executeTriggersAfterExternal() is callable' ); - - //$result = $obj->executeTriggersAfterExternal ( $sProcess, $sTask, $sApplication, $iIndex, $iStepPosition, $aNewData); - //$t->isa_ok( $result, 'NULL', 'call to method executeTriggersAfterExternal '); - $t->todo( "call to method executeTriggersAfterExternal using $sProcess, $sTask, $sApplication, $iIndex, $iStepPosition, $aNewData "); - - - //checking method 'thisIsTheCurrentUser' - $t->is ( $aMethods[68], 'thisIsTheCurrentUser', 'thisIsTheCurrentUser() is callable' ); - - //$result = $obj->thisIsTheCurrentUser ( $sApplicationUID, $iIndex, $sUserUID, $sAction, $sURL); - //$t->isa_ok( $result, 'NULL', 'call to method thisIsTheCurrentUser '); - $t->todo( "call to method thisIsTheCurrentUser using $sApplicationUID, $iIndex, $sUserUID, $sAction, $sURL "); - - - //checking method 'getCriteriaUsersCases' - $t->is ( $aMethods[69], 'getCriteriaUsersCases', 'getCriteriaUsersCases() is callable' ); - - //$result = $obj->getCriteriaUsersCases ( $status, $USR_UID); - //$t->isa_ok( $result, 'NULL', 'call to method getCriteriaUsersCases '); - $t->todo( "call to method getCriteriaUsersCases using $status, $USR_UID "); - - - //checking method 'getAdvancedSearch' - $t->is ( $aMethods[70], 'getAdvancedSearch', 'getAdvancedSearch() is callable' ); - - //$result = $obj->getAdvancedSearch ( $sCase, $sProcess, $sTask, $sCurrentUser, $sSentby, $sLastModFrom, $sLastModTo, $sStatus, $permisse, $userlogged, $aSupervisor); - //$t->isa_ok( $result, 'NULL', 'call to method getAdvancedSearch '); - - */ - $t->todo( "call to method getAdvancedSearch using $sCase, $sProcess, $sTask, $sCurrentUser, $sSentby, $sLastModFrom, $sLastModTo, $sStatus, $permisse, $userlogged, $aSupervisor "); - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classDashboardsTest.php b/workflow/engine/test/unit/processmaker/classDashboardsTest.php deleted file mode 100644 index ba93ac0a1..000000000 --- a/workflow/engine/test/unit/processmaker/classDashboardsTest.php +++ /dev/null @@ -1,96 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - Propel::init( PATH_CORE . "config/databases.php"); - - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'dashboards'); - - $obj = new Dashboards ($dbc); - $t = new lime_test( 9, new lime_output_color() ); - - $className = Dashboards; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , 'Dashboards', 'class $className created'); - - $t->is( count($methods) , 3, "class $className have " . 3 . ' methods.' ); - - //checking method 'getConfiguration' - $t->can_ok( $obj, 'getConfiguration', 'getConfiguration() is callable' ); - - //$result = $obj->getConfiguration ( $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getConfiguration '); - $t->todo( "call to method getConfiguration using $sUserUID "); - - - //checking method 'saveConfiguration' - $t->can_ok( $obj, 'saveConfiguration', 'saveConfiguration() is callable' ); - - //$result = $obj->saveConfiguration ( $sUserUID, $aConfiguration); - //$t->isa_ok( $result, 'NULL', 'call to method saveConfiguration '); - $t->todo( "call to method saveConfiguration using $sUserUID, $aConfiguration "); - - - //checking method 'getDashboardsObject' - $t->can_ok( $obj, 'getDashboardsObject', 'getDashboardsObject() is callable' ); - - //$result = $obj->getDashboardsObject ( $sUserUID); - //$t->isa_ok( $result, 'NULL', 'call to method getDashboardsObject '); - $t->todo( "call to method getDashboardsObject using $sUserUID "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classDatesTest.php b/workflow/engine/test/unit/processmaker/classDatesTest.php deleted file mode 100644 index ffb79c191..000000000 --- a/workflow/engine/test/unit/processmaker/classDatesTest.php +++ /dev/null @@ -1,207 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'dates'); - - - $obj = new Dates ($dbc); - $t = new lime_test( 37, new lime_output_color() ); - - $className = Dates; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - //$className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 17, "class $className have " . 17 . ' methods.' ); - - //checking method 'calculateDate' - $t->can_ok( $obj, 'calculateDate', 'calculateDate() is callable' ); - - //$result = $obj->calculateDate ( $sInitDate, $iDuration, $sTimeUnit, $iTypeDay, $UsrUid, $ProUid, $TasUid); - //$t->isa_ok( $result, 'NULL', 'call to method calculateDate '); - $t->todo( "call to method calculateDate using $sInitDate, $iDuration, $sTimeUnit, $iTypeDay, $UsrUid, $ProUid, $TasUid "); - - - //checking method 'calculateDuration' - $t->can_ok( $obj, 'calculateDuration', 'calculateDuration() is callable' ); - - //$result = $obj->calculateDuration ( $sInitDate, $sEndDate, $UsrUid, $ProUid, $TasUid); - //$t->isa_ok( $result, 'NULL', 'call to method calculateDuration '); - $t->todo( "call to method calculateDuration using $sInitDate, $sEndDate, $UsrUid, $ProUid, $TasUid "); - - - //checking method 'prepareInformation' - $t->can_ok( $obj, 'prepareInformation', 'prepareInformation() is callable' ); - - //$result = $obj->prepareInformation ( $UsrUid, $ProUid, $TasUid); - //$t->isa_ok( $result, 'NULL', 'call to method prepareInformation '); - $t->todo( "call to method prepareInformation using $UsrUid, $ProUid, $TasUid "); - - - //checking method 'setSkipEveryYear' - $t->can_ok( $obj, 'setSkipEveryYear', 'setSkipEveryYear() is callable' ); - - //$result = $obj->setSkipEveryYear ( $bSkipEveryYear); - //$t->isa_ok( $result, 'NULL', 'call to method setSkipEveryYear '); - $t->todo( "call to method setSkipEveryYear using $bSkipEveryYear "); - - - //checking method 'addHoliday' - $t->can_ok( $obj, 'addHoliday', 'addHoliday() is callable' ); - - //$result = $obj->addHoliday ( $sDate); - //$t->isa_ok( $result, 'NULL', 'call to method addHoliday '); - $t->todo( "call to method addHoliday using $sDate "); - - - //checking method 'setHolidays' - $t->can_ok( $obj, 'setHolidays', 'setHolidays() is callable' ); - - //$result = $obj->setHolidays ( $aDates); - //$t->isa_ok( $result, 'NULL', 'call to method setHolidays '); - $t->todo( "call to method setHolidays using $aDates "); - - - //checking method 'setWeekends' - $t->can_ok( $obj, 'setWeekends', 'setWeekends() is callable' ); - - //$result = $obj->setWeekends ( $aWeekends); - //$t->isa_ok( $result, 'NULL', 'call to method setWeekends '); - $t->todo( "call to method setWeekends using $aWeekends "); - - - //checking method 'skipDayOfWeek' - $t->can_ok( $obj, 'skipDayOfWeek', 'skipDayOfWeek() is callable' ); - - //$result = $obj->skipDayOfWeek ( $iDayNumber); - //$t->isa_ok( $result, 'NULL', 'call to method skipDayOfWeek '); - $t->todo( "call to method skipDayOfWeek using $iDayNumber "); - - - //checking method 'addNonWorkingRange' - $t->can_ok( $obj, 'addNonWorkingRange', 'addNonWorkingRange() is callable' ); - - //$result = $obj->addNonWorkingRange ( $sDateA, $sDateB); - //$t->isa_ok( $result, 'NULL', 'call to method addNonWorkingRange '); - $t->todo( "call to method addNonWorkingRange using $sDateA, $sDateB "); - - - //checking method 'addDays' - $t->can_ok( $obj, 'addDays', 'addDays() is callable' ); - - //$result = $obj->addDays ( $iInitDate, $iDaysCount, $addSign); - //$t->isa_ok( $result, 'NULL', 'call to method addDays '); - $t->todo( "call to method addDays using $iInitDate, $iDaysCount, $addSign "); - - - //checking method 'addHours' - $t->can_ok( $obj, 'addHours', 'addHours() is callable' ); - - //$result = $obj->addHours ( $sInitDate, $iHoursCount, $addSign); - //$t->isa_ok( $result, 'NULL', 'call to method addHours '); - $t->todo( "call to method addHours using $sInitDate, $iHoursCount, $addSign "); - - - //checking method 'inRange' - $t->can_ok( $obj, 'inRange', 'inRange() is callable' ); - - //$result = $obj->inRange ( $iDate); - //$t->isa_ok( $result, 'NULL', 'call to method inRange '); - $t->todo( "call to method inRange using $iDate "); - - - //checking method 'truncateTime' - $t->can_ok( $obj, 'truncateTime', 'truncateTime() is callable' ); - - //$result = $obj->truncateTime ( $iDate); - //$t->isa_ok( $result, 'NULL', 'call to method truncateTime '); - $t->todo( "call to method truncateTime using $iDate "); - - - //checking method 'getTime' - $t->can_ok( $obj, 'getTime', 'getTime() is callable' ); - - //$result = $obj->getTime ( $iDate); - //$t->isa_ok( $result, 'NULL', 'call to method getTime '); - $t->todo( "call to method getTime using $iDate "); - - - //checking method 'setTime' - $t->can_ok( $obj, 'setTime', 'setTime() is callable' ); - - //$result = $obj->setTime ( $iDate, $aTime); - //$t->isa_ok( $result, 'NULL', 'call to method setTime '); - $t->todo( "call to method setTime using $iDate, $aTime "); - - - //checking method 'listForYear' - $t->can_ok( $obj, 'listForYear', 'listForYear() is callable' ); - - //$result = $obj->listForYear ( $iYear); - //$t->isa_ok( $result, 'NULL', 'call to method listForYear '); - $t->todo( "call to method listForYear using $iYear "); - - - //checking method 'changeYear' - $t->can_ok( $obj, 'changeYear', 'changeYear() is callable' ); - - //$result = $obj->changeYear ( $iDate, $iYear); - //$t->isa_ok( $result, 'NULL', 'call to method changeYear '); - $t->todo( "call to method changeYear using $iDate, $iYear "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classDbConnectionsTest.php b/workflow/engine/test/unit/processmaker/classDbConnectionsTest.php deleted file mode 100644 index b8e20cdcd..000000000 --- a/workflow/engine/test/unit/processmaker/classDbConnectionsTest.php +++ /dev/null @@ -1,151 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'dbConnections'); - - - $obj = new DbConnections ($dbc); - $t = new lime_test( 23, new lime_output_color() ); - - $className = DbConnections; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - //$className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 10, "class $className have " . 10 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $pPRO_UID); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $pPRO_UID "); - - - //checking method 'getAllConnections' - $t->can_ok( $obj, 'getAllConnections', 'getAllConnections() is callable' ); - - //$result = $obj->getAllConnections ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getAllConnections '); - $t->todo( "call to method getAllConnections using "); - - - //checking method 'getConnections' - $t->can_ok( $obj, 'getConnections', 'getConnections() is callable' ); - - //$result = $obj->getConnections ( $pType); - //$t->isa_ok( $result, 'NULL', 'call to method getConnections '); - $t->todo( "call to method getConnections using $pType "); - - - //checking method 'loadAdditionalConnections' - $t->can_ok( $obj, 'loadAdditionalConnections', 'loadAdditionalConnections() is callable' ); - - //$result = $obj->loadAdditionalConnections ( ); - //$t->isa_ok( $result, 'NULL', 'call to method loadAdditionalConnections '); - $t->todo( "call to method loadAdditionalConnections using "); - - - //checking method 'getDbServicesAvailables' - $t->can_ok( $obj, 'getDbServicesAvailables', 'getDbServicesAvailables() is callable' ); - - //$result = $obj->getDbServicesAvailables ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getDbServicesAvailables '); - $t->todo( "call to method getDbServicesAvailables using "); - - - //checking method 'showMsg' - $t->can_ok( $obj, 'showMsg', 'showMsg() is callable' ); - - //$result = $obj->showMsg ( ); - //$t->isa_ok( $result, 'NULL', 'call to method showMsg '); - $t->todo( "call to method showMsg using "); - - - //checking method 'getEncondeList' - $t->can_ok( $obj, 'getEncondeList', 'getEncondeList() is callable' ); - - //$result = $obj->getEncondeList ( $engine); - //$t->isa_ok( $result, 'NULL', 'call to method getEncondeList '); - $t->todo( "call to method getEncondeList using $engine "); - - - //checking method 'getErrno' - $t->can_ok( $obj, 'getErrno', 'getErrno() is callable' ); - - //$result = $obj->getErrno ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getErrno '); - $t->todo( "call to method getErrno using "); - - - //checking method 'getErrmsg' - $t->can_ok( $obj, 'getErrmsg', 'getErrmsg() is callable' ); - - //$result = $obj->getErrmsg ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getErrmsg '); - $t->todo( "call to method getErrmsg using "); - - - //checking method 'ordx' - $t->can_ok( $obj, 'ordx', 'ordx() is callable' ); - - //$result = $obj->ordx ( $m); - //$t->isa_ok( $result, 'NULL', 'call to method ordx '); - $t->todo( "call to method ordx using $m "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classDynaFormFieldTest.php b/workflow/engine/test/unit/processmaker/classDynaFormFieldTest.php deleted file mode 100644 index 982478260..000000000 --- a/workflow/engine/test/unit/processmaker/classDynaFormFieldTest.php +++ /dev/null @@ -1,82 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'dbconnection'); - G::LoadSystem ( 'dbsession'); - G::LoadSystem ( 'dbrecordset'); - G::LoadSystem ( 'dbtable'); - G::LoadClass ( 'dynaFormField'); - - require_once ( PATH_CORE . "config/databases.php"); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - - $obj = new DynaFormField ($dbc); - $t = new lime_test( 6, new lime_output_color() ); - - $t->diag('class DynaFormField' ); - $t->isa_ok( $obj , 'DynaFormField', 'class DynaFormField created'); - - //method Load - $t->can_ok( $obj, 'Load', 'Load() is callable' ); - - // $result = $obj->Load ( $sUID); - // $t->isa_ok( $result, 'NULL', 'call to method Load '); - - - //method Delete - $t->can_ok( $obj, 'Delete', 'Delete() is callable' ); - - // $result = $obj->Delete ( $uid); - // $t->isa_ok( $result, 'NULL', 'call to method Delete '); - - - //method Save - $t->can_ok( $obj, 'Save', 'Save() is callable' ); - - // $result = $obj->Save ( $Fields, $labels, $options); - // $t->isa_ok( $result, 'NULL', 'call to method Save '); - - - //method isNew - $t->can_ok( $obj, 'isNew', 'isNew() is callable' ); - - // $result = $obj->isNew ( ); - // $t->isa_ok( $result, 'NULL', 'call to method isNew '); - - - //$t->fail( 'review all pendings methods in this class'); - $t->todo( "review all pendings methods in this class" ); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classESMTPTest.php b/workflow/engine/test/unit/processmaker/classESMTPTest.php deleted file mode 100644 index 81ec6eb6f..000000000 --- a/workflow/engine/test/unit/processmaker/classESMTPTest.php +++ /dev/null @@ -1,242 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'smtp.rfc-821'); - - - //$obj = new ESMTP ($dbc); - $t = new lime_test( 44, new lime_output_color() ); - - $className = ESMTP; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 21, "class $className have " . 21 . ' methods.' ); - - // Methods $t->is ( $aMethods[0], - $aMethods = array_keys ( $methods ); - - //checking method 'ESMTP' - $t->is ( $aMethods[0], 'ESMTP', 'ESMTP() is callable' ); - - //$result = $obj->ESMTP ( ); - //$t->isa_ok( $result, 'NULL', 'call to method ESMTP '); - $t->todo( "call to method ESMTP using "); - - - //checking method 'Connect' - $t->is ( $aMethods[1], 'Connect', 'Connect() is callable' ); - - //$result = $obj->Connect ( $host, $port, $tval); - //$t->isa_ok( $result, 'NULL', 'call to method Connect '); - $t->todo( "call to method Connect using $host, $port, $tval "); - - - //checking method 'Authenticate' - $t->is ( $aMethods[2], 'Authenticate', 'Authenticate() is callable' ); - - //$result = $obj->Authenticate ( $username, $password); - //$t->isa_ok( $result, 'NULL', 'call to method Authenticate '); - $t->todo( "call to method Authenticate using $username, $password "); - - - //checking method 'Connected' - $t->is ( $aMethods[3], 'Connected', 'Connected() is callable' ); - - //$result = $obj->Connected ( ); - //$t->isa_ok( $result, 'NULL', 'call to method Connected '); - $t->todo( "call to method Connected using "); - - - //checking method 'Close' - $t->is ( $aMethods[4], 'Close', 'Close() is callable' ); - - //$result = $obj->Close ( ); - //$t->isa_ok( $result, 'NULL', 'call to method Close '); - $t->todo( "call to method Close using "); - - - //checking method 'Data' - $t->is ( $aMethods[5], 'Data', 'Data() is callable' ); - - //$result = $obj->Data ( $msg_data); - //$t->isa_ok( $result, 'NULL', 'call to method Data '); - $t->todo( "call to method Data using $msg_data "); - - - //checking method 'Expand' - $t->is ( $aMethods[6], 'Expand', 'Expand() is callable' ); - - //$result = $obj->Expand ( $name); - //$t->isa_ok( $result, 'NULL', 'call to method Expand '); - $t->todo( "call to method Expand using $name "); - - - //checking method 'Hello' - $t->is ( $aMethods[7], 'Hello', 'Hello() is callable' ); - - //$result = $obj->Hello ( $host); - //$t->isa_ok( $result, 'NULL', 'call to method Hello '); - $t->todo( "call to method Hello using $host "); - - - //checking method 'SendHello' - $t->is ( $aMethods[8], 'SendHello', 'SendHello() is callable' ); - - //$result = $obj->SendHello ( $hello, $host); - //$t->isa_ok( $result, 'NULL', 'call to method SendHello '); - $t->todo( "call to method SendHello using $hello, $host "); - - - //checking method 'Help' - $t->is ( $aMethods[9], 'Help', 'Help() is callable' ); - - //$result = $obj->Help ( $keyword); - //$t->isa_ok( $result, 'NULL', 'call to method Help '); - $t->todo( "call to method Help using $keyword "); - - - //checking method 'Mail' - $t->is ( $aMethods[10], 'Mail', 'Mail() is callable' ); - - //$result = $obj->Mail ( $from); - //$t->isa_ok( $result, 'NULL', 'call to method Mail '); - $t->todo( "call to method Mail using $from "); - - - //checking method 'Noop' - $t->is ( $aMethods[11], 'Noop', 'Noop() is callable' ); - - //$result = $obj->Noop ( ); - //$t->isa_ok( $result, 'NULL', 'call to method Noop '); - $t->todo( "call to method Noop using "); - - - //checking method 'Quit' - $t->is ( $aMethods[12], 'Quit', 'Quit() is callable' ); - - //$result = $obj->Quit ( $close_on_error); - //$t->isa_ok( $result, 'NULL', 'call to method Quit '); - $t->todo( "call to method Quit using $close_on_error "); - - - //checking method 'Recipient' - $t->is ( $aMethods[13], 'Recipient', 'Recipient() is callable' ); - - //$result = $obj->Recipient ( $to); - //$t->isa_ok( $result, 'NULL', 'call to method Recipient '); - $t->todo( "call to method Recipient using $to "); - - - //checking method 'Reset' - $t->is ( $aMethods[14], 'Reset', 'Reset() is callable' ); - - //$result = $obj->Reset ( ); - //$t->isa_ok( $result, 'NULL', 'call to method Reset '); - $t->todo( "call to method Reset using "); - - - //checking method 'Send' - $t->is ( $aMethods[15], 'Send', 'Send() is callable' ); - - //$result = $obj->Send ( $from); - //$t->isa_ok( $result, 'NULL', 'call to method Send '); - $t->todo( "call to method Send using $from "); - - - //checking method 'SendAndMail' - $t->is ( $aMethods[16], 'SendAndMail', 'SendAndMail() is callable' ); - - //$result = $obj->SendAndMail ( $from); - //$t->isa_ok( $result, 'NULL', 'call to method SendAndMail '); - $t->todo( "call to method SendAndMail using $from "); - - - //checking method 'SendOrMail' - $t->is ( $aMethods[17], 'SendOrMail', 'SendOrMail() is callable' ); - - //$result = $obj->SendOrMail ( $from); - //$t->isa_ok( $result, 'NULL', 'call to method SendOrMail '); - $t->todo( "call to method SendOrMail using $from "); - - - //checking method 'Turn' - $t->is ( $aMethods[18], 'Turn', 'Turn() is callable' ); - - //$result = $obj->Turn ( ); - //$t->isa_ok( $result, 'NULL', 'call to method Turn '); - $t->todo( "call to method Turn using "); - - - //checking method 'Verify' - $t->is ( $aMethods[19], 'Verify', 'Verify() is callable' ); - - //$result = $obj->Verify ( $name); - //$t->isa_ok( $result, 'NULL', 'call to method Verify '); - $t->todo( "call to method Verify using $name "); - - - //checking method 'get_lines' - $t->is ( $aMethods[20], 'get_lines', 'get_lines() is callable' ); - - //$result = $obj->get_lines ( ); - //$t->isa_ok( $result, 'NULL', 'call to method get_lines '); - $t->todo( "call to method get_lines using "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classInsertTest.php b/workflow/engine/test/unit/processmaker/classInsertTest.php deleted file mode 100644 index e5ad39f25..000000000 --- a/workflow/engine/test/unit/processmaker/classInsertTest.php +++ /dev/null @@ -1,72 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - //$className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 3, "class $className have " . 3 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $db_spool); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $db_spool "); - - - //checking method 'returnStatus' - $t->can_ok( $obj, 'returnStatus', 'returnStatus() is callable' ); - - //$result = $obj->returnStatus ( ); - //$t->isa_ok( $result, 'NULL', 'call to method returnStatus '); - $t->todo( "call to method returnStatus using "); - - - //checking method 'db_insert' - $t->can_ok( $obj, 'db_insert', 'db_insert() is callable' ); - - //$result = $obj->db_insert ( $db_spool); - //$t->isa_ok( $result, 'NULL', 'call to method db_insert '); - $t->todo( "call to method db_insert using $db_spool "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classInstallerTest.php b/workflow/engine/test/unit/processmaker/classInstallerTest.php deleted file mode 100644 index f9a85d713..000000000 --- a/workflow/engine/test/unit/processmaker/classInstallerTest.php +++ /dev/null @@ -1,178 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag( '$className' ); - - $t->isa_ok( $obj , 'Installer', 'class $className created'); - - $t->is( count($methods) , 16, "class $className have " . 16 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( ); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using "); - - - //checking method 'create_site' - $t->can_ok( $obj, 'create_site', 'create_site() is callable' ); - - //$result = $obj->create_site ( $config, $confirmed); - //$t->isa_ok( $result, 'NULL', 'call to method create_site '); - $t->todo( "call to method create_site using $config, $confirmed "); - - - //checking method 'isset_site' - $t->can_ok( $obj, 'isset_site', 'isset_site() is callable' ); - - //$result = $obj->isset_site ( $name); - //$t->isa_ok( $result, 'NULL', 'call to method isset_site '); - $t->todo( "call to method isset_site using $name "); - - - //checking method 'create_site_test' - $t->can_ok( $obj, 'create_site_test', 'create_site_test() is callable' ); - - //$result = $obj->create_site_test ( ); - //$t->isa_ok( $result, 'NULL', 'call to method create_site_test '); - $t->todo( "call to method create_site_test using "); - - - //checking method 'make_site' - $t->can_ok( $obj, 'make_site', 'make_site() is callable' ); - - //$result = $obj->make_site ( ); - //$t->isa_ok( $result, 'NULL', 'call to method make_site '); - $t->todo( "call to method make_site using "); - - - //checking method 'setAdmin' - $t->can_ok( $obj, 'setAdmin', 'setAdmin() is callable' ); - - //$result = $obj->setAdmin ( ); - //$t->isa_ok( $result, 'NULL', 'call to method setAdmin '); - $t->todo( "call to method setAdmin using "); - - - //checking method 'query_sql_file' - $t->can_ok( $obj, 'query_sql_file', 'query_sql_file() is callable' ); - - //$result = $obj->query_sql_file ( $file, $connection); - //$t->isa_ok( $result, 'NULL', 'call to method query_sql_file '); - $t->todo( "call to method query_sql_file using $file, $connection "); - - - //checking method 'check_path' - $t->can_ok( $obj, 'check_path', 'check_path() is callable' ); - - //$result = $obj->check_path ( ); - //$t->isa_ok( $result, 'NULL', 'call to method check_path '); - $t->todo( "call to method check_path using "); - - - //checking method 'find_root_path' - $t->can_ok( $obj, 'find_root_path', 'find_root_path() is callable' ); - - //$result = $obj->find_root_path ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method find_root_path '); - $t->todo( "call to method find_root_path using $path "); - - - //checking method 'file_permisions' - $t->can_ok( $obj, 'file_permisions', 'file_permisions() is callable' ); - - //$result = $obj->file_permisions ( $file, $def); - //$t->isa_ok( $result, 'NULL', 'call to method file_permisions '); - $t->todo( "call to method file_permisions using $file, $def "); - - - //checking method 'is_dir_writable' - $t->can_ok( $obj, 'is_dir_writable', 'is_dir_writable() is callable' ); - - //$result = $obj->is_dir_writable ( $dir); - //$t->isa_ok( $result, 'NULL', 'call to method is_dir_writable '); - $t->todo( "call to method is_dir_writable using $dir "); - - - //checking method 'getDirectoryFiles' - $t->can_ok( $obj, 'getDirectoryFiles', 'getDirectoryFiles() is callable' ); - - //$result = $obj->getDirectoryFiles ( $dir, $extension); - //$t->isa_ok( $result, 'NULL', 'call to method getDirectoryFiles '); - $t->todo( "call to method getDirectoryFiles using $dir, $extension "); - - - //checking method 'check_db_empty' - $t->can_ok( $obj, 'check_db_empty', 'check_db_empty() is callable' ); - - //$result = $obj->check_db_empty ( $dbName); - //$t->isa_ok( $result, 'NULL', 'call to method check_db_empty '); - $t->todo( "call to method check_db_empty using $dbName "); - - - //checking method 'check_db' - $t->can_ok( $obj, 'check_db', 'check_db() is callable' ); - - //$result = $obj->check_db ( $dbName); - //$t->isa_ok( $result, 'NULL', 'call to method check_db '); - $t->todo( "call to method check_db using $dbName "); - - - //checking method 'check_connection' - $t->can_ok( $obj, 'check_connection', 'check_connection() is callable' ); - - //$result = $obj->check_connection ( ); - //$t->isa_ok( $result, 'NULL', 'call to method check_connection '); - $t->todo( "call to method check_connection using "); - - - //checking method 'log' - $t->can_ok( $obj, 'log', 'log() is callable' ); - - //$result = $obj->log ( $text); - //$t->isa_ok( $result, 'NULL', 'call to method log '); - $t->todo( "call to method log using $text "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classJavaBridgePMTest.php b/workflow/engine/test/unit/processmaker/classJavaBridgePMTest.php deleted file mode 100644 index feac82fda..000000000 --- a/workflow/engine/test/unit/processmaker/classJavaBridgePMTest.php +++ /dev/null @@ -1,73 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , 'JavaBridgePM', 'class $className created'); - - $t->is( count($methods) , 3, "class $className have " . 3 . ' methods.' ); - - //checking method 'checkJavaExtension' - $t->can_ok( $obj, 'checkJavaExtension', 'checkJavaExtension() is callable' ); - - //$result = $obj->checkJavaExtension ( ); - //$t->isa_ok( $result, 'NULL', 'call to method checkJavaExtension '); - $t->todo( "call to method checkJavaExtension using "); - - - //checking method 'convertValue' - $t->can_ok( $obj, 'convertValue', 'convertValue() is callable' ); - - //$result = $obj->convertValue ( $value, $className); - //$t->isa_ok( $result, 'NULL', 'call to method convertValue '); - $t->todo( "call to method convertValue using $value, $className "); - - - //checking method 'generateJrxmlFromDynaform' - $t->can_ok( $obj, 'generateJrxmlFromDynaform', 'generateJrxmlFromDynaform() is callable' ); - - //$result = $obj->generateJrxmlFromDynaform ( $outDocUid, $dynaformUid, $template); - //$t->isa_ok( $result, 'NULL', 'call to method generateJrxmlFromDynaform '); - $t->todo( "call to method generateJrxmlFromDynaform using $outDocUid, $dynaformUid, $template "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classLanguagesTest.php b/workflow/engine/test/unit/processmaker/classLanguagesTest.php deleted file mode 100644 index 91f2c8f9f..000000000 --- a/workflow/engine/test/unit/processmaker/classLanguagesTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , "languages", "class $className created"); - - $t->is( count($methods) , 1, "class $className have " . 1 . ' methods.' ); - - //checking method 'importLanguage' - $t->can_ok( $obj, 'importLanguage', 'importLanguage() is callable' ); - - //$result = $obj->importLanguage ( $sLanguageFile, $bXml); - //$t->isa_ok( $result, 'NULL', 'call to method importLanguage '); - $t->todo( "call to method importLanguage using $sLanguageFile, $bXml "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classMenuDetailTest.php b/workflow/engine/test/unit/processmaker/classMenuDetailTest.php deleted file mode 100644 index 994f1a608..000000000 --- a/workflow/engine/test/unit/processmaker/classMenuDetailTest.php +++ /dev/null @@ -1,57 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 1, "class $className have " . 1 . ' methods.' ); - // Methods - $aMethods = array_keys ( $methods ); - //checking method '__construct' - $t->is ( $aMethods[0], '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $sNamespace, $sMenuId, $sFilename); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $sNamespace, $sMenuId, $sFilename "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classNetTest.php b/workflow/engine/test/unit/processmaker/classNetTest.php deleted file mode 100644 index 38e210696..000000000 --- a/workflow/engine/test/unit/processmaker/classNetTest.php +++ /dev/null @@ -1,161 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , 'NET', 'class $className created'); - - $t->is( count($methods) , 14, "class $className have " . 14 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $pHost); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $pHost "); - - - //checking method 'resolv' - $t->can_ok( $obj, 'resolv', 'resolv() is callable' ); - - //$result = $obj->resolv ( $pHost); - //$t->isa_ok( $result, 'NULL', 'call to method resolv '); - $t->todo( "call to method resolv using $pHost "); - - - //checking method 'scannPort' - $t->can_ok( $obj, 'scannPort', 'scannPort() is callable' ); - - //$result = $obj->scannPort ( $pPort); - //$t->isa_ok( $result, 'NULL', 'call to method scannPort '); - $t->todo( "call to method scannPort using $pPort "); - - - //checking method 'is_ipaddress' - $t->can_ok( $obj, 'is_ipaddress', 'is_ipaddress() is callable' ); - - //$result = $obj->is_ipaddress ( $pHost); - //$t->isa_ok( $result, 'NULL', 'call to method is_ipaddress '); - $t->todo( "call to method is_ipaddress using $pHost "); - - - //checking method 'ping' - $t->can_ok( $obj, 'ping', 'ping() is callable' ); - - //$result = $obj->ping ( $pTTL); - //$t->isa_ok( $result, 'NULL', 'call to method ping '); - $t->todo( "call to method ping using $pTTL "); - - - //checking method 'loginDbServer' - $t->can_ok( $obj, 'loginDbServer', 'loginDbServer() is callable' ); - - //$result = $obj->loginDbServer ( $pUser, $pPasswd); - //$t->isa_ok( $result, 'NULL', 'call to method loginDbServer '); - $t->todo( "call to method loginDbServer using $pUser, $pPasswd "); - - - //checking method 'setDataBase' - $t->can_ok( $obj, 'setDataBase', 'setDataBase() is callable' ); - - //$result = $obj->setDataBase ( $pDb, $pPort); - //$t->isa_ok( $result, 'NULL', 'call to method setDataBase '); - $t->todo( "call to method setDataBase using $pDb, $pPort "); - - - //checking method 'tryConnectServer' - $t->can_ok( $obj, 'tryConnectServer', 'tryConnectServer() is callable' ); - - //$result = $obj->tryConnectServer ( $pDbDriver); - //$t->isa_ok( $result, 'NULL', 'call to method tryConnectServer '); - $t->todo( "call to method tryConnectServer using $pDbDriver "); - - - //checking method 'tryOpenDataBase' - $t->can_ok( $obj, 'tryOpenDataBase', 'tryOpenDataBase() is callable' ); - - //$result = $obj->tryOpenDataBase ( $pDbDriver); - //$t->isa_ok( $result, 'NULL', 'call to method tryOpenDataBase '); - $t->todo( "call to method tryOpenDataBase using $pDbDriver "); - - - //checking method 'getDbServerVersion' - $t->can_ok( $obj, 'getDbServerVersion', 'getDbServerVersion() is callable' ); - - //$result = $obj->getDbServerVersion ( $driver); - //$t->isa_ok( $result, 'NULL', 'call to method getDbServerVersion '); - $t->todo( "call to method getDbServerVersion using $driver "); - - - //checking method 'dbName' - $t->can_ok( $obj, 'dbName', 'dbName() is callable' ); - - //$result = $obj->dbName ( $pAdapter); - //$t->isa_ok( $result, 'NULL', 'call to method dbName '); - $t->todo( "call to method dbName using $pAdapter "); - - - //checking method 'showMsg' - $t->can_ok( $obj, 'showMsg', 'showMsg() is callable' ); - - //$result = $obj->showMsg ( ); - //$t->isa_ok( $result, 'NULL', 'call to method showMsg '); - $t->todo( "call to method showMsg using "); - - - //checking method 'getErrno' - $t->can_ok( $obj, 'getErrno', 'getErrno() is callable' ); - - //$result = $obj->getErrno ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getErrno '); - $t->todo( "call to method getErrno using "); - - - //checking method 'getErrmsg' - $t->can_ok( $obj, 'getErrmsg', 'getErrmsg() is callable' ); - - //$result = $obj->getErrmsg ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getErrmsg '); - $t->todo( "call to method getErrmsg using "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classPackageTest.php b/workflow/engine/test/unit/processmaker/classPackageTest.php deleted file mode 100644 index 401873ae4..000000000 --- a/workflow/engine/test/unit/processmaker/classPackageTest.php +++ /dev/null @@ -1,113 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , $className, 'class $className created'); - - $t->is( count($methods) , 8, "class $className have " . 8 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $fileData); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $fileData "); - - - //checking method 'returnHeader' - $t->can_ok( $obj, 'returnHeader', 'returnHeader() is callable' ); - - //$result = $obj->returnHeader ( ); - //$t->isa_ok( $result, 'NULL', 'call to method returnHeader '); - $t->todo( "call to method returnHeader using "); - - - //checking method 'returnBody' - $t->can_ok( $obj, 'returnBody', 'returnBody() is callable' ); - - //$result = $obj->returnBody ( ); - //$t->isa_ok( $result, 'NULL', 'call to method returnBody '); - $t->todo( "call to method returnBody using "); - - - //checking method 'returnErrors' - $t->can_ok( $obj, 'returnErrors', 'returnErrors() is callable' ); - - //$result = $obj->returnErrors ( $error); - //$t->isa_ok( $result, 'NULL', 'call to method returnErrors '); - $t->todo( "call to method returnErrors using $error "); - - - //checking method 'addHeaders' - $t->can_ok( $obj, 'addHeaders', 'addHeaders() is callable' ); - - //$result = $obj->addHeaders ( ); - //$t->isa_ok( $result, 'NULL', 'call to method addHeaders '); - $t->todo( "call to method addHeaders using "); - - - //checking method 'addAttachment' - $t->can_ok( $obj, 'addAttachment', 'addAttachment() is callable' ); - - //$result = $obj->addAttachment ( $data); - //$t->isa_ok( $result, 'NULL', 'call to method addAttachment '); - $t->todo( "call to method addAttachment using $data "); - - - //checking method 'fixbody' - $t->can_ok( $obj, 'fixbody', 'fixbody() is callable' ); - - //$result = $obj->fixbody ( ); - //$t->isa_ok( $result, 'NULL', 'call to method fixbody '); - $t->todo( "call to method fixbody using "); - - - //checking method 'compileBody' - $t->can_ok( $obj, 'compileBody', 'compileBody() is callable' ); - - //$result = $obj->compileBody ( ); - //$t->isa_ok( $result, 'NULL', 'call to method compileBody '); - $t->todo( "call to method compileBody using "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classPluginDetailTest.php b/workflow/engine/test/unit/processmaker/classPluginDetailTest.php deleted file mode 100644 index 317383583..000000000 --- a/workflow/engine/test/unit/processmaker/classPluginDetailTest.php +++ /dev/null @@ -1,57 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 1, "class $className have " . 1 . ' methods.' ); - // Methods - $aMethods = array_keys ( $methods ); - //checking method '__construct' - $t->is ( $aMethods[0], '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $sNamespace, $sClassName, $sFilename, $sFriendlyName, $sPluginFolder, $sDescription, $sSetupPage, $iVersion); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $sNamespace, $sClassName, $sFilename, $sFriendlyName, $sPluginFolder, $sDescription, $sSetupPage, $iVersion "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classPmScriptTest.php b/workflow/engine/test/unit/processmaker/classPmScriptTest.php deleted file mode 100644 index d8dc707e5..000000000 --- a/workflow/engine/test/unit/processmaker/classPmScriptTest.php +++ /dev/null @@ -1,89 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'dbconnection'); - G::LoadSystem ( 'dbsession'); - G::LoadSystem ( 'dbrecordset'); - G::LoadSystem ( 'dbtable'); - G::LoadClass ( 'pmScript'); - - require_once ( PATH_CORE . "config/databases.php"); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - - $obj = new PmScript ($dbc); - $t = new lime_test( 7, new lime_output_color() ); - - $t->diag('class PmScript' ); - $t->isa_ok( $obj , 'PMScript', 'class PmScript created'); - - //method setFields - $t->can_ok( $obj, 'setFields', 'setFields() is callable' ); - -// $result = $obj->setFields ( $aFields); -// $t->isa_ok( $result, 'NULL', 'call to method setFields '); - - - //method setScript - $t->can_ok( $obj, 'setScript', 'setScript() is callable' ); - -// $result = $obj->setScript ( $sScript); -// $t->isa_ok( $result, 'NULL', 'call to method setScript '); - - - //method validSyntax - $t->can_ok( $obj, 'validSyntax', 'validSyntax() is callable' ); - -// $result = $obj->validSyntax ( $sScript); -// $t->isa_ok( $result, 'NULL', 'call to method validSyntax '); - - - //method execute - $t->can_ok( $obj, 'execute', 'execute() is callable' ); - -// $result = $obj->execute ( ); -// $t->isa_ok( $result, 'NULL', 'call to method execute '); - - - //method evaluate - $t->can_ok( $obj, 'evaluate', 'evaluate() is callable' ); - -// $result = $obj->evaluate ( ); -// $t->isa_ok( $result, 'NULL', 'call to method evaluate '); - - - // $t->fail( 'review all pendings methods in this class'); -$t->todo ( "review all pendings methods in this class" ); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classPopupMenuTest.php b/workflow/engine/test/unit/processmaker/classPopupMenuTest.php deleted file mode 100644 index 390828f28..000000000 --- a/workflow/engine/test/unit/processmaker/classPopupMenuTest.php +++ /dev/null @@ -1,55 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'dbconnection'); - G::LoadSystem ( 'dbsession'); - G::LoadSystem ( 'dbrecordset'); - G::LoadSystem ( 'dbtable'); - G::LoadClass ( 'popupMenu'); - - require_once ( PATH_CORE . "config/databases.php"); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - $file = 'login/login'; - - $obj = new PopupMenu ($file); - $t = new lime_test( 2, new lime_output_color() ); - - $t->diag('class PopupMenu' ); - $t->isa_ok( $obj , 'popupMenu', 'class PopupMenu created'); - -// $t->fail( 'review all pendings methods in this class'); - $t->todo( "review all pendings methods in this class"); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classProcessMakerWebDavTest.php b/workflow/engine/test/unit/processmaker/classProcessMakerWebDavTest.php deleted file mode 100644 index 256438ec5..000000000 --- a/workflow/engine/test/unit/processmaker/classProcessMakerWebDavTest.php +++ /dev/null @@ -1,465 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 52, "class $className have " . 52 . ' methods.' ); - // Methods - $aMethods = array_keys ( $methods ); - //checking method 'ServeRequest' - $t->is ( $aMethods[0], 'ServeRequest', 'ServeRequest() is callable' ); - - //$result = $obj->ServeRequest ( $base); - //$t->isa_ok( $result, 'NULL', 'call to method ServeRequest '); - $t->todo( "call to method ServeRequest using $base "); - - - //checking method 'check_auth' - $t->is ( $aMethods[1], 'check_auth', 'check_auth() is callable' ); - - //$result = $obj->check_auth ( $type, $user, $pass); - //$t->isa_ok( $result, 'NULL', 'call to method check_auth '); - $t->todo( "call to method check_auth using $type, $user, $pass "); - - - //checking method 'PROPFIND' - $t->is ( $aMethods[2], 'PROPFIND', 'PROPFIND() is callable' ); - - //$result = $obj->PROPFIND ( $options, $files); - //$t->isa_ok( $result, 'NULL', 'call to method PROPFIND '); - $t->todo( "call to method PROPFIND using $options, $files "); - - - //checking method '_can_execute' - $t->is ( $aMethods[3], '_can_execute', '_can_execute() is callable' ); - - //$result = $obj->_can_execute ( $name, $path); - //$t->isa_ok( $result, 'NULL', 'call to method _can_execute '); - $t->todo( "call to method _can_execute using $name, $path "); - - - //checking method '_mimetype' - $t->is ( $aMethods[4], '_mimetype', '_mimetype() is callable' ); - - //$result = $obj->_mimetype ( $fspath); - //$t->isa_ok( $result, 'NULL', 'call to method _mimetype '); - $t->todo( "call to method _mimetype using $fspath "); - - - //checking method 'GET' - $t->is ( $aMethods[5], 'GET', 'GET() is callable' ); - - //$result = $obj->GET ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method GET '); - $t->todo( "call to method GET using $options "); - - - //checking method 'getRoot' - $t->is ( $aMethods[6], 'getRoot', 'getRoot() is callable' ); - - //$result = $obj->getRoot ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method getRoot '); - $t->todo( "call to method getRoot using $options "); - - - //checking method 'GetDir' - $t->is ( $aMethods[7], 'GetDir', 'GetDir() is callable' ); - - //$result = $obj->GetDir ( $fspath, $options); - //$t->isa_ok( $result, 'NULL', 'call to method GetDir '); - $t->todo( "call to method GetDir using $fspath, $options "); - - - //checking method 'PUT' - $t->is ( $aMethods[8], 'PUT', 'PUT() is callable' ); - - //$result = $obj->PUT ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method PUT '); - $t->todo( "call to method PUT using $options "); - - - //checking method 'MKCOL' - $t->is ( $aMethods[9], 'MKCOL', 'MKCOL() is callable' ); - - //$result = $obj->MKCOL ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method MKCOL '); - $t->todo( "call to method MKCOL using $options "); - - - //checking method 'DELETE' - $t->is ( $aMethods[10], 'DELETE', 'DELETE() is callable' ); - - //$result = $obj->DELETE ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method DELETE '); - $t->todo( "call to method DELETE using $options "); - - - //checking method 'MOVE' - $t->is ( $aMethods[11], 'MOVE', 'MOVE() is callable' ); - - //$result = $obj->MOVE ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method MOVE '); - $t->todo( "call to method MOVE using $options "); - - - //checking method 'COPY' - $t->is ( $aMethods[12], 'COPY', 'COPY() is callable' ); - - //$result = $obj->COPY ( $options, $del); - //$t->isa_ok( $result, 'NULL', 'call to method COPY '); - $t->todo( "call to method COPY using $options, $del "); - - - //checking method 'PROPPATCH' - $t->is ( $aMethods[13], 'PROPPATCH', 'PROPPATCH() is callable' ); - - //$result = $obj->PROPPATCH ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method PROPPATCH '); - $t->todo( "call to method PROPPATCH using $options "); - - - //checking method 'LOCK' - $t->is ( $aMethods[14], 'LOCK', 'LOCK() is callable' ); - - //$result = $obj->LOCK ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method LOCK '); - $t->todo( "call to method LOCK using $options "); - - - //checking method 'UNLOCK' - $t->is ( $aMethods[15], 'UNLOCK', 'UNLOCK() is callable' ); - - //$result = $obj->UNLOCK ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method UNLOCK '); - $t->todo( "call to method UNLOCK using $options "); - - - //checking method 'checkLock' - $t->is ( $aMethods[16], 'checkLock', 'checkLock() is callable' ); - - //$result = $obj->checkLock ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method checkLock '); - $t->todo( "call to method checkLock using $path "); - - - //checking method 'create_database' - $t->is ( $aMethods[17], 'create_database', 'create_database() is callable' ); - - //$result = $obj->create_database ( ); - //$t->isa_ok( $result, 'NULL', 'call to method create_database '); - $t->todo( "call to method create_database using "); - - - //checking method 'HTTP_WebDAV_Server' - $t->is ( $aMethods[18], 'HTTP_WebDAV_Server', 'HTTP_WebDAV_Server() is callable' ); - - //$result = $obj->HTTP_WebDAV_Server ( ); - //$t->isa_ok( $result, 'NULL', 'call to method HTTP_WebDAV_Server '); - $t->todo( "call to method HTTP_WebDAV_Server using "); - - - //checking method 'http_OPTIONS' - $t->is ( $aMethods[19], 'http_OPTIONS', 'http_OPTIONS() is callable' ); - - //$result = $obj->http_OPTIONS ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_OPTIONS '); - $t->todo( "call to method http_OPTIONS using "); - - - //checking method 'http_PROPFIND' - $t->is ( $aMethods[20], 'http_PROPFIND', 'http_PROPFIND() is callable' ); - - //$result = $obj->http_PROPFIND ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_PROPFIND '); - $t->todo( "call to method http_PROPFIND using "); - - - //checking method 'http_PROPPATCH' - $t->is ( $aMethods[21], 'http_PROPPATCH', 'http_PROPPATCH() is callable' ); - - //$result = $obj->http_PROPPATCH ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_PROPPATCH '); - $t->todo( "call to method http_PROPPATCH using "); - - - //checking method 'http_MKCOL' - $t->is ( $aMethods[22], 'http_MKCOL', 'http_MKCOL() is callable' ); - - //$result = $obj->http_MKCOL ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_MKCOL '); - $t->todo( "call to method http_MKCOL using "); - - - //checking method 'http_GET' - $t->is ( $aMethods[23], 'http_GET', 'http_GET() is callable' ); - - //$result = $obj->http_GET ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_GET '); - $t->todo( "call to method http_GET using "); - - - //checking method '_get_ranges' - $t->is ( $aMethods[24], '_get_ranges', '_get_ranges() is callable' ); - - //$result = $obj->_get_ranges ( $options); - //$t->isa_ok( $result, 'NULL', 'call to method _get_ranges '); - $t->todo( "call to method _get_ranges using $options "); - - - //checking method '_multipart_byterange_header' - $t->is ( $aMethods[25], '_multipart_byterange_header', '_multipart_byterange_header() is callable' ); - - //$result = $obj->_multipart_byterange_header ( $mimetype, $from, $to, $total); - //$t->isa_ok( $result, 'NULL', 'call to method _multipart_byterange_header '); - $t->todo( "call to method _multipart_byterange_header using $mimetype, $from, $to, $total "); - - - //checking method 'http_HEAD' - $t->is ( $aMethods[26], 'http_HEAD', 'http_HEAD() is callable' ); - - //$result = $obj->http_HEAD ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_HEAD '); - $t->todo( "call to method http_HEAD using "); - - - //checking method 'http_PUT' - $t->is ( $aMethods[27], 'http_PUT', 'http_PUT() is callable' ); - - //$result = $obj->http_PUT ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_PUT '); - $t->todo( "call to method http_PUT using "); - - - //checking method 'http_DELETE' - $t->is ( $aMethods[28], 'http_DELETE', 'http_DELETE() is callable' ); - - //$result = $obj->http_DELETE ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_DELETE '); - $t->todo( "call to method http_DELETE using "); - - - //checking method 'http_COPY' - $t->is ( $aMethods[29], 'http_COPY', 'http_COPY() is callable' ); - - //$result = $obj->http_COPY ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_COPY '); - $t->todo( "call to method http_COPY using "); - - - //checking method 'http_MOVE' - $t->is ( $aMethods[30], 'http_MOVE', 'http_MOVE() is callable' ); - - //$result = $obj->http_MOVE ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_MOVE '); - $t->todo( "call to method http_MOVE using "); - - - //checking method 'http_LOCK' - $t->is ( $aMethods[31], 'http_LOCK', 'http_LOCK() is callable' ); - - //$result = $obj->http_LOCK ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_LOCK '); - $t->todo( "call to method http_LOCK using "); - - - //checking method 'http_UNLOCK' - $t->is ( $aMethods[32], 'http_UNLOCK', 'http_UNLOCK() is callable' ); - - //$result = $obj->http_UNLOCK ( ); - //$t->isa_ok( $result, 'NULL', 'call to method http_UNLOCK '); - $t->todo( "call to method http_UNLOCK using "); - - - //checking method '_copymove' - $t->is ( $aMethods[33], '_copymove', '_copymove() is callable' ); - - //$result = $obj->_copymove ( $what); - //$t->isa_ok( $result, 'NULL', 'call to method _copymove '); - $t->todo( "call to method _copymove using $what "); - - - //checking method '_allow' - $t->is ( $aMethods[34], '_allow', '_allow() is callable' ); - - //$result = $obj->_allow ( ); - //$t->isa_ok( $result, 'NULL', 'call to method _allow '); - $t->todo( "call to method _allow using "); - - - //checking method 'mkprop' - $t->is ( $aMethods[35], 'mkprop', 'mkprop() is callable' ); - - //$result = $obj->mkprop ( ); - //$t->isa_ok( $result, 'NULL', 'call to method mkprop '); - $t->todo( "call to method mkprop using "); - - - //checking method '_check_auth' - $t->is ( $aMethods[36], '_check_auth', '_check_auth() is callable' ); - - //$result = $obj->_check_auth ( ); - //$t->isa_ok( $result, 'NULL', 'call to method _check_auth '); - $t->todo( "call to method _check_auth using "); - - - //checking method '_new_uuid' - $t->is ( $aMethods[37], '_new_uuid', '_new_uuid() is callable' ); - - //$result = $obj->_new_uuid ( ); - //$t->isa_ok( $result, 'NULL', 'call to method _new_uuid '); - $t->todo( "call to method _new_uuid using "); - - - //checking method '_new_locktoken' - $t->is ( $aMethods[38], '_new_locktoken', '_new_locktoken() is callable' ); - - //$result = $obj->_new_locktoken ( ); - //$t->isa_ok( $result, 'NULL', 'call to method _new_locktoken '); - $t->todo( "call to method _new_locktoken using "); - - - //checking method '_if_header_lexer' - $t->is ( $aMethods[39], '_if_header_lexer', '_if_header_lexer() is callable' ); - - //$result = $obj->_if_header_lexer ( $string, $pos); - //$t->isa_ok( $result, 'NULL', 'call to method _if_header_lexer '); - $t->todo( "call to method _if_header_lexer using $string, $pos "); - - - //checking method '_if_header_parser' - $t->is ( $aMethods[40], '_if_header_parser', '_if_header_parser() is callable' ); - - //$result = $obj->_if_header_parser ( $str); - //$t->isa_ok( $result, 'NULL', 'call to method _if_header_parser '); - $t->todo( "call to method _if_header_parser using $str "); - - - //checking method '_check_if_header_conditions' - $t->is ( $aMethods[41], '_check_if_header_conditions', '_check_if_header_conditions() is callable' ); - - //$result = $obj->_check_if_header_conditions ( ); - //$t->isa_ok( $result, 'NULL', 'call to method _check_if_header_conditions '); - $t->todo( "call to method _check_if_header_conditions using "); - - - //checking method '_check_uri_condition' - $t->is ( $aMethods[42], '_check_uri_condition', '_check_uri_condition() is callable' ); - - //$result = $obj->_check_uri_condition ( $uri, $condition); - //$t->isa_ok( $result, 'NULL', 'call to method _check_uri_condition '); - $t->todo( "call to method _check_uri_condition using $uri, $condition "); - - - //checking method '_check_lock_status' - $t->is ( $aMethods[43], '_check_lock_status', '_check_lock_status() is callable' ); - - //$result = $obj->_check_lock_status ( $path, $exclusive_only); - //$t->isa_ok( $result, 'NULL', 'call to method _check_lock_status '); - $t->todo( "call to method _check_lock_status using $path, $exclusive_only "); - - - //checking method 'lockdiscovery' - $t->is ( $aMethods[44], 'lockdiscovery', 'lockdiscovery() is callable' ); - - //$result = $obj->lockdiscovery ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method lockdiscovery '); - $t->todo( "call to method lockdiscovery using $path "); - - - //checking method 'http_status' - $t->is ( $aMethods[45], 'http_status', 'http_status() is callable' ); - - //$result = $obj->http_status ( $status); - //$t->isa_ok( $result, 'NULL', 'call to method http_status '); - $t->todo( "call to method http_status using $status "); - - - //checking method '_urlencode' - $t->is ( $aMethods[46], '_urlencode', '_urlencode() is callable' ); - - //$result = $obj->_urlencode ( $url); - //$t->isa_ok( $result, 'NULL', 'call to method _urlencode '); - $t->todo( "call to method _urlencode using $url "); - - - //checking method '_urldecode' - $t->is ( $aMethods[47], '_urldecode', '_urldecode() is callable' ); - - //$result = $obj->_urldecode ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method _urldecode '); - $t->todo( "call to method _urldecode using $path "); - - - //checking method '_prop_encode' - $t->is ( $aMethods[48], '_prop_encode', '_prop_encode() is callable' ); - - //$result = $obj->_prop_encode ( $text); - //$t->isa_ok( $result, 'NULL', 'call to method _prop_encode '); - $t->todo( "call to method _prop_encode using $text "); - - - //checking method '_slashify' - $t->is ( $aMethods[49], '_slashify', '_slashify() is callable' ); - - //$result = $obj->_slashify ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method _slashify '); - $t->todo( "call to method _slashify using $path "); - - - //checking method '_unslashify' - $t->is ( $aMethods[50], '_unslashify', '_unslashify() is callable' ); - - //$result = $obj->_unslashify ( $path); - //$t->isa_ok( $result, 'NULL', 'call to method _unslashify '); - $t->todo( "call to method _unslashify using $path "); - - - //checking method '_mergePathes' - $t->is ( $aMethods[51], '_mergePathes', '_mergePathes() is callable' ); - - //$result = $obj->_mergePathes ( $parent, $child); - //$t->isa_ok( $result, 'NULL', 'call to method _mergePathes '); - $t->todo( "call to method _mergePathes using $parent, $child "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classProcessesTest.php b/workflow/engine/test/unit/processmaker/classProcessesTest.php deleted file mode 100644 index 61eadd99c..000000000 --- a/workflow/engine/test/unit/processmaker/classProcessesTest.php +++ /dev/null @@ -1,985 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'processes'); - - - $obj = new Processes ($dbc); - $t = new lime_test( 231, new lime_output_color() ); - - $className = Processes; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - //$t->is( count($methods) , 116, "class $className have " . 116 . ' methods.' ); - $t->is( count($methods) , 120, "class $className have " . 120 . ' methods.' ); - - //checking method 'changeStatus' - $t->can_ok( $obj, 'changeStatus', 'changeStatus() is callable' ); - - //$result = $obj->changeStatus ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method changeStatus '); - $t->todo( "call to method changeStatus using $sProUid "); - - - //checking method 'changeProcessParent' - $t->can_ok( $obj, 'changeProcessParent', 'changeProcessParent() is callable' ); - - //$result = $obj->changeProcessParent ( $sProUid, $sParentUid); - //$t->isa_ok( $result, 'NULL', 'call to method changeProcessParent '); - $t->todo( "call to method changeProcessParent using $sProUid, $sParentUid "); - - - //checking method 'processExists' - $t->can_ok( $obj, 'processExists', 'processExists() is callable' ); - - //$result = $obj->processExists ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method processExists '); - $t->todo( "call to method processExists using $sProUid "); - - - //checking method 'getUnusedProcessGUID' - $t->can_ok( $obj, 'getUnusedProcessGUID', 'getUnusedProcessGUID() is callable' ); - - //$result = $obj->getUnusedProcessGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedProcessGUID '); - $t->todo( "call to method getUnusedProcessGUID using "); - - - //checking method 'taskExists' - $t->can_ok( $obj, 'taskExists', 'taskExists() is callable' ); - - //$result = $obj->taskExists ( $sTasUid); - //$t->isa_ok( $result, 'NULL', 'call to method taskExists '); - $t->todo( "call to method taskExists using $sTasUid "); - - - //checking method 'getUnusedTaskGUID' - $t->can_ok( $obj, 'getUnusedTaskGUID', 'getUnusedTaskGUID() is callable' ); - - //$result = $obj->getUnusedTaskGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedTaskGUID '); - $t->todo( "call to method getUnusedTaskGUID using "); - - - //checking method 'dynaformExists' - $t->can_ok( $obj, 'dynaformExists', 'dynaformExists() is callable' ); - - //$result = $obj->dynaformExists ( $sDynUid); - //$t->isa_ok( $result, 'NULL', 'call to method dynaformExists '); - $t->todo( "call to method dynaformExists using $sDynUid "); - - - //checking method 'inputExists' - $t->can_ok( $obj, 'inputExists', 'inputExists() is callable' ); - - //$result = $obj->inputExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method inputExists '); - $t->todo( "call to method inputExists using $sUid "); - - - //checking method 'outputExists' - $t->can_ok( $obj, 'outputExists', 'outputExists() is callable' ); - - //$result = $obj->outputExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method outputExists '); - $t->todo( "call to method outputExists using $sUid "); - - - //checking method 'triggerExists' - $t->can_ok( $obj, 'triggerExists', 'triggerExists() is callable' ); - - //$result = $obj->triggerExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method triggerExists '); - $t->todo( "call to method triggerExists using $sUid "); - - - //checking method 'SubProcessExists' - $t->can_ok( $obj, 'SubProcessExists', 'SubProcessExists() is callable' ); - - //$result = $obj->SubProcessExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method SubProcessExists '); - $t->todo( "call to method SubProcessExists using $sUid "); - - - //checking method 'caseTrackerObjectExists' - $t->can_ok( $obj, 'caseTrackerObjectExists', 'caseTrackerObjectExists() is callable' ); - - //$result = $obj->caseTrackerObjectExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method caseTrackerObjectExists '); - $t->todo( "call to method caseTrackerObjectExists using $sUid "); - - - //checking method 'caseTrackerExists' - $t->can_ok( $obj, 'caseTrackerExists', 'caseTrackerExists() is callable' ); - - //$result = $obj->caseTrackerExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method caseTrackerExists '); - $t->todo( "call to method caseTrackerExists using $sUid "); - - - //checking method 'dbConnectionExists' - $t->can_ok( $obj, 'dbConnectionExists', 'dbConnectionExists() is callable' ); - - //$result = $obj->dbConnectionExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method dbConnectionExists '); - $t->todo( "call to method dbConnectionExists using $sUid "); - - - //checking method 'objectPermissionExists' - $t->can_ok( $obj, 'objectPermissionExists', 'objectPermissionExists() is callable' ); - - //$result = $obj->objectPermissionExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method objectPermissionExists '); - $t->todo( "call to method objectPermissionExists using $sUid "); - - - //checking method 'routeExists' - $t->can_ok( $obj, 'routeExists', 'routeExists() is callable' ); - - //$result = $obj->routeExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method routeExists '); - $t->todo( "call to method routeExists using $sUid "); - - - //checking method 'stageExists' - $t->can_ok( $obj, 'stageExists', 'stageExists() is callable' ); - - //$result = $obj->stageExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method stageExists '); - $t->todo( "call to method stageExists using $sUid "); - - - //checking method 'slExists' - $t->can_ok( $obj, 'slExists', 'slExists() is callable' ); - - //$result = $obj->slExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method slExists '); - $t->todo( "call to method slExists using $sUid "); - - - //checking method 'reportTableExists' - $t->can_ok( $obj, 'reportTableExists', 'reportTableExists() is callable' ); - - //$result = $obj->reportTableExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method reportTableExists '); - $t->todo( "call to method reportTableExists using $sUid "); - - - //checking method 'reportVarExists' - $t->can_ok( $obj, 'reportVarExists', 'reportVarExists() is callable' ); - - //$result = $obj->reportVarExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method reportVarExists '); - $t->todo( "call to method reportVarExists using $sUid "); - - - //checking method 'getUnusedInputGUID' - $t->can_ok( $obj, 'getUnusedInputGUID', 'getUnusedInputGUID() is callable' ); - - //$result = $obj->getUnusedInputGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedInputGUID '); - $t->todo( "call to method getUnusedInputGUID using "); - - - //checking method 'getUnusedOutputGUID' - $t->can_ok( $obj, 'getUnusedOutputGUID', 'getUnusedOutputGUID() is callable' ); - - //$result = $obj->getUnusedOutputGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedOutputGUID '); - $t->todo( "call to method getUnusedOutputGUID using "); - - - //checking method 'getUnusedTriggerGUID' - $t->can_ok( $obj, 'getUnusedTriggerGUID', 'getUnusedTriggerGUID() is callable' ); - - //$result = $obj->getUnusedTriggerGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedTriggerGUID '); - $t->todo( "call to method getUnusedTriggerGUID using "); - - - //checking method 'getUnusedSubProcessGUID' - $t->can_ok( $obj, 'getUnusedSubProcessGUID', 'getUnusedSubProcessGUID() is callable' ); - - //$result = $obj->getUnusedSubProcessGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedSubProcessGUID '); - $t->todo( "call to method getUnusedSubProcessGUID using "); - - - //checking method 'getUnusedCaseTrackerObjectGUID' - $t->can_ok( $obj, 'getUnusedCaseTrackerObjectGUID', 'getUnusedCaseTrackerObjectGUID() is callable' ); - - //$result = $obj->getUnusedCaseTrackerObjectGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedCaseTrackerObjectGUID '); - $t->todo( "call to method getUnusedCaseTrackerObjectGUID using "); - - - //checking method 'getUnusedDBSourceGUID' - $t->can_ok( $obj, 'getUnusedDBSourceGUID', 'getUnusedDBSourceGUID() is callable' ); - - //$result = $obj->getUnusedDBSourceGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedDBSourceGUID '); - $t->todo( "call to method getUnusedDBSourceGUID using "); - - - //checking method 'getUnusedObjectPermissionGUID' - $t->can_ok( $obj, 'getUnusedObjectPermissionGUID', 'getUnusedObjectPermissionGUID() is callable' ); - - //$result = $obj->getUnusedObjectPermissionGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedObjectPermissionGUID '); - $t->todo( "call to method getUnusedObjectPermissionGUID using "); - - - //checking method 'getUnusedRouteGUID' - $t->can_ok( $obj, 'getUnusedRouteGUID', 'getUnusedRouteGUID() is callable' ); - - //$result = $obj->getUnusedRouteGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedRouteGUID '); - $t->todo( "call to method getUnusedRouteGUID using "); - - - //checking method 'getUnusedStageGUID' - $t->can_ok( $obj, 'getUnusedStageGUID', 'getUnusedStageGUID() is callable' ); - - //$result = $obj->getUnusedStageGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedStageGUID '); - $t->todo( "call to method getUnusedStageGUID using "); - - - //checking method 'getUnusedSLGUID' - $t->can_ok( $obj, 'getUnusedSLGUID', 'getUnusedSLGUID() is callable' ); - - //$result = $obj->getUnusedSLGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedSLGUID '); - $t->todo( "call to method getUnusedSLGUID using "); - - - //checking method 'getUnusedRTGUID' - $t->can_ok( $obj, 'getUnusedRTGUID', 'getUnusedRTGUID() is callable' ); - - //$result = $obj->getUnusedRTGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedRTGUID '); - $t->todo( "call to method getUnusedRTGUID using "); - - - //checking method 'getUnusedRTVGUID' - $t->can_ok( $obj, 'getUnusedRTVGUID', 'getUnusedRTVGUID() is callable' ); - - //$result = $obj->getUnusedRTVGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedRTVGUID '); - $t->todo( "call to method getUnusedRTVGUID using "); - - - //checking method 'stepExists' - $t->can_ok( $obj, 'stepExists', 'stepExists() is callable' ); - - //$result = $obj->stepExists ( $sUid); - //$t->isa_ok( $result, 'NULL', 'call to method stepExists '); - $t->todo( "call to method stepExists using $sUid "); - - - //checking method 'getUnusedStepGUID' - $t->can_ok( $obj, 'getUnusedStepGUID', 'getUnusedStepGUID() is callable' ); - - //$result = $obj->getUnusedStepGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedStepGUID '); - $t->todo( "call to method getUnusedStepGUID using "); - - - //checking method 'getUnusedDynaformGUID' - $t->can_ok( $obj, 'getUnusedDynaformGUID', 'getUnusedDynaformGUID() is callable' ); - - //$result = $obj->getUnusedDynaformGUID ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getUnusedDynaformGUID '); - $t->todo( "call to method getUnusedDynaformGUID using "); - - - //checking method 'setProcessGUID' - $t->can_ok( $obj, 'setProcessGUID', 'setProcessGUID() is callable' ); - - //$result = $obj->setProcessGUID ( $oData, $sNewProUid); - //$t->isa_ok( $result, 'NULL', 'call to method setProcessGUID '); - $t->todo( "call to method setProcessGUID using $oData, $sNewProUid "); - - - //checking method 'setProcessParent' - $t->can_ok( $obj, 'setProcessParent', 'setProcessParent() is callable' ); - - //$result = $obj->setProcessParent ( $oData, $sParentUid); - //$t->isa_ok( $result, 'NULL', 'call to method setProcessParent '); - $t->todo( "call to method setProcessParent using $oData, $sParentUid "); - - - //checking method 'renewAllTaskGuid' - $t->can_ok( $obj, 'renewAllTaskGuid', 'renewAllTaskGuid() is callable' ); - - //$result = $obj->renewAllTaskGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllTaskGuid '); - $t->todo( "call to method renewAllTaskGuid using $oData "); - - - //checking method 'renewAllDynaformGuid' - $t->can_ok( $obj, 'renewAllDynaformGuid', 'renewAllDynaformGuid() is callable' ); - - //$result = $obj->renewAllDynaformGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllDynaformGuid '); - $t->todo( "call to method renewAllDynaformGuid using $oData "); - - - //checking method 'getProcessRow' - $t->can_ok( $obj, 'getProcessRow', 'getProcessRow() is callable' ); - - //$result = $obj->getProcessRow ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getProcessRow '); - $t->todo( "call to method getProcessRow using $sProUid "); - - - //checking method 'createProcessRow' - $t->can_ok( $obj, 'createProcessRow', 'createProcessRow() is callable' ); - - //$result = $obj->createProcessRow ( $row); - //$t->isa_ok( $result, 'NULL', 'call to method createProcessRow '); - $t->todo( "call to method createProcessRow using $row "); - - - //checking method 'updateProcessRow' - $t->can_ok( $obj, 'updateProcessRow', 'updateProcessRow() is callable' ); - - //$result = $obj->updateProcessRow ( $row); - //$t->isa_ok( $result, 'NULL', 'call to method updateProcessRow '); - $t->todo( "call to method updateProcessRow using $row "); - - - //checking method 'getSubProcessRow' - $t->can_ok( $obj, 'getSubProcessRow', 'getSubProcessRow() is callable' ); - - //$result = $obj->getSubProcessRow ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getSubProcessRow '); - $t->todo( "call to method getSubProcessRow using $sProUid "); - - - //checking method 'getCaseTrackerRow' - $t->can_ok( $obj, 'getCaseTrackerRow', 'getCaseTrackerRow() is callable' ); - - //$result = $obj->getCaseTrackerRow ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getCaseTrackerRow '); - $t->todo( "call to method getCaseTrackerRow using $sProUid "); - - - //checking method 'getCaseTrackerObjectRow' - $t->can_ok( $obj, 'getCaseTrackerObjectRow', 'getCaseTrackerObjectRow() is callable' ); - - //$result = $obj->getCaseTrackerObjectRow ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getCaseTrackerObjectRow '); - $t->todo( "call to method getCaseTrackerObjectRow using $sProUid "); - - - //checking method 'getStageRow' - $t->can_ok( $obj, 'getStageRow', 'getStageRow() is callable' ); - - //$result = $obj->getStageRow ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getStageRow '); - $t->todo( "call to method getStageRow using $sProUid "); - - - //checking method 'getAllLanes' - $t->can_ok( $obj, 'getAllLanes', 'getAllLanes() is callable' ); - - //$result = $obj->getAllLanes ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getAllLanes '); - $t->todo( "call to method getAllLanes using $sProUid "); - - - //checking method 'getTaskRows' - $t->can_ok( $obj, 'getTaskRows', 'getTaskRows() is callable' ); - - //$result = $obj->getTaskRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getTaskRows '); - $t->todo( "call to method getTaskRows using $sProUid "); - - - //checking method 'createTaskRows' - $t->can_ok( $obj, 'createTaskRows', 'createTaskRows() is callable' ); - - //$result = $obj->createTaskRows ( $aTasks); - //$t->isa_ok( $result, 'NULL', 'call to method createTaskRows '); - $t->todo( "call to method createTaskRows using $aTasks "); - - - //checking method 'updateTaskRows' - $t->can_ok( $obj, 'updateTaskRows', 'updateTaskRows() is callable' ); - - //$result = $obj->updateTaskRows ( $aTasks); - //$t->isa_ok( $result, 'NULL', 'call to method updateTaskRows '); - $t->todo( "call to method updateTaskRows using $aTasks "); - - - //checking method 'getRouteRows' - $t->can_ok( $obj, 'getRouteRows', 'getRouteRows() is callable' ); - - //$result = $obj->getRouteRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getRouteRows '); - $t->todo( "call to method getRouteRows using $sProUid "); - - - //checking method 'createRouteRows' - $t->can_ok( $obj, 'createRouteRows', 'createRouteRows() is callable' ); - - //$result = $obj->createRouteRows ( $aRoutes); - //$t->isa_ok( $result, 'NULL', 'call to method createRouteRows '); - $t->todo( "call to method createRouteRows using $aRoutes "); - - - //checking method 'updateRouteRows' - $t->can_ok( $obj, 'updateRouteRows', 'updateRouteRows() is callable' ); - - //$result = $obj->updateRouteRows ( $aRoutes); - //$t->isa_ok( $result, 'NULL', 'call to method updateRouteRows '); - $t->todo( "call to method updateRouteRows using $aRoutes "); - - - //checking method 'getLaneRows' - $t->can_ok( $obj, 'getLaneRows', 'getLaneRows() is callable' ); - - //$result = $obj->getLaneRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getLaneRows '); - $t->todo( "call to method getLaneRows using $sProUid "); - - - //checking method 'createLaneRows' - $t->can_ok( $obj, 'createLaneRows', 'createLaneRows() is callable' ); - - //$result = $obj->createLaneRows ( $aLanes); - //$t->isa_ok( $result, 'NULL', 'call to method createLaneRows '); - $t->todo( "call to method createLaneRows using $aLanes "); - - - //checking method 'createSubProcessRows' - $t->can_ok( $obj, 'createSubProcessRows', 'createSubProcessRows() is callable' ); - - //$result = $obj->createSubProcessRows ( $SubProcess); - //$t->isa_ok( $result, 'NULL', 'call to method createSubProcessRows '); - $t->todo( "call to method createSubProcessRows using $SubProcess "); - - - //checking method 'createCaseTrackerRows' - $t->can_ok( $obj, 'createCaseTrackerRows', 'createCaseTrackerRows() is callable' ); - - //$result = $obj->createCaseTrackerRows ( $CaseTracker); - //$t->isa_ok( $result, 'NULL', 'call to method createCaseTrackerRows '); - $t->todo( "call to method createCaseTrackerRows using $CaseTracker "); - - - //checking method 'createCaseTrackerObjectRows' - $t->can_ok( $obj, 'createCaseTrackerObjectRows', 'createCaseTrackerObjectRows() is callable' ); - - //$result = $obj->createCaseTrackerObjectRows ( $CaseTrackerObject); - //$t->isa_ok( $result, 'NULL', 'call to method createCaseTrackerObjectRows '); - $t->todo( "call to method createCaseTrackerObjectRows using $CaseTrackerObject "); - - - //checking method 'createObjectPermissionsRows' - $t->can_ok( $obj, 'createObjectPermissionsRows', 'createObjectPermissionsRows() is callable' ); - - //$result = $obj->createObjectPermissionsRows ( $ObjectPermissions); - //$t->isa_ok( $result, 'NULL', 'call to method createObjectPermissionsRows '); - $t->todo( "call to method createObjectPermissionsRows using $ObjectPermissions "); - - - //checking method 'createStageRows' - $t->can_ok( $obj, 'createStageRows', 'createStageRows() is callable' ); - - //$result = $obj->createStageRows ( $Stage); - //$t->isa_ok( $result, 'NULL', 'call to method createStageRows '); - $t->todo( "call to method createStageRows using $Stage "); - - - //checking method 'getInputRows' - $t->can_ok( $obj, 'getInputRows', 'getInputRows() is callable' ); - - //$result = $obj->getInputRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getInputRows '); - $t->todo( "call to method getInputRows using $sProUid "); - - - //checking method 'createInputRows' - $t->can_ok( $obj, 'createInputRows', 'createInputRows() is callable' ); - - //$result = $obj->createInputRows ( $aInput); - //$t->isa_ok( $result, 'NULL', 'call to method createInputRows '); - $t->todo( "call to method createInputRows using $aInput "); - - - //checking method 'renewAllInputGuid' - $t->can_ok( $obj, 'renewAllInputGuid', 'renewAllInputGuid() is callable' ); - - //$result = $obj->renewAllInputGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllInputGuid '); - $t->todo( "call to method renewAllInputGuid using $oData "); - - - //checking method 'getOutputRows' - $t->can_ok( $obj, 'getOutputRows', 'getOutputRows() is callable' ); - - //$result = $obj->getOutputRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getOutputRows '); - $t->todo( "call to method getOutputRows using $sProUid "); - - - //checking method 'createOutputRows' - $t->can_ok( $obj, 'createOutputRows', 'createOutputRows() is callable' ); - - //$result = $obj->createOutputRows ( $aOutput); - //$t->isa_ok( $result, 'NULL', 'call to method createOutputRows '); - $t->todo( "call to method createOutputRows using $aOutput "); - - - //checking method 'renewAllOutputGuid' - $t->can_ok( $obj, 'renewAllOutputGuid', 'renewAllOutputGuid() is callable' ); - - //$result = $obj->renewAllOutputGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllOutputGuid '); - $t->todo( "call to method renewAllOutputGuid using $oData "); - - - //checking method 'renewAllTriggerGuid' - $t->can_ok( $obj, 'renewAllTriggerGuid', 'renewAllTriggerGuid() is callable' ); - - //$result = $obj->renewAllTriggerGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllTriggerGuid '); - $t->todo( "call to method renewAllTriggerGuid using $oData "); - - - //checking method 'renewAllSubProcessGuid' - $t->can_ok( $obj, 'renewAllSubProcessGuid', 'renewAllSubProcessGuid() is callable' ); - - //$result = $obj->renewAllSubProcessGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllSubProcessGuid '); - $t->todo( "call to method renewAllSubProcessGuid using $oData "); - - - //checking method 'renewAllCaseTrackerObjectGuid' - $t->can_ok( $obj, 'renewAllCaseTrackerObjectGuid', 'renewAllCaseTrackerObjectGuid() is callable' ); - - //$result = $obj->renewAllCaseTrackerObjectGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllCaseTrackerObjectGuid '); - $t->todo( "call to method renewAllCaseTrackerObjectGuid using $oData "); - - - //checking method 'renewAllDBSourceGuid' - $t->can_ok( $obj, 'renewAllDBSourceGuid', 'renewAllDBSourceGuid() is callable' ); - - //$result = $obj->renewAllDBSourceGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllDBSourceGuid '); - $t->todo( "call to method renewAllDBSourceGuid using $oData "); - - - //checking method 'renewAllObjectPermissionGuid' - $t->can_ok( $obj, 'renewAllObjectPermissionGuid', 'renewAllObjectPermissionGuid() is callable' ); - - //$result = $obj->renewAllObjectPermissionGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllObjectPermissionGuid '); - $t->todo( "call to method renewAllObjectPermissionGuid using $oData "); - - - //checking method 'renewAllRouteGuid' - $t->can_ok( $obj, 'renewAllRouteGuid', 'renewAllRouteGuid() is callable' ); - - //$result = $obj->renewAllRouteGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllRouteGuid '); - $t->todo( "call to method renewAllRouteGuid using $oData "); - - - //checking method 'renewAllStageGuid' - $t->can_ok( $obj, 'renewAllStageGuid', 'renewAllStageGuid() is callable' ); - - //$result = $obj->renewAllStageGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllStageGuid '); - $t->todo( "call to method renewAllStageGuid using $oData "); - - - //checking method 'renewAllSwimlanesElementsGuid' - $t->can_ok( $obj, 'renewAllSwimlanesElementsGuid', 'renewAllSwimlanesElementsGuid() is callable' ); - - //$result = $obj->renewAllSwimlanesElementsGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllSwimlanesElementsGuid '); - $t->todo( "call to method renewAllSwimlanesElementsGuid using $oData "); - - - //checking method 'renewAllReportTableGuid' - $t->can_ok( $obj, 'renewAllReportTableGuid', 'renewAllReportTableGuid() is callable' ); - - //$result = $obj->renewAllReportTableGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllReportTableGuid '); - $t->todo( "call to method renewAllReportTableGuid using $oData "); - - - //checking method 'renewAllReportVarGuid' - $t->can_ok( $obj, 'renewAllReportVarGuid', 'renewAllReportVarGuid() is callable' ); - - //$result = $obj->renewAllReportVarGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllReportVarGuid '); - $t->todo( "call to method renewAllReportVarGuid using $oData "); - - - //checking method 'getStepRows' - $t->can_ok( $obj, 'getStepRows', 'getStepRows() is callable' ); - - //$result = $obj->getStepRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getStepRows '); - $t->todo( "call to method getStepRows using $sProUid "); - - - //checking method 'createStepRows' - $t->can_ok( $obj, 'createStepRows', 'createStepRows() is callable' ); - - //$result = $obj->createStepRows ( $aStep); - //$t->isa_ok( $result, 'NULL', 'call to method createStepRows '); - $t->todo( "call to method createStepRows using $aStep "); - - - //checking method 'createStepSupervisorRows' - $t->can_ok( $obj, 'createStepSupervisorRows', 'createStepSupervisorRows() is callable' ); - - //$result = $obj->createStepSupervisorRows ( $aStepSupervisor); - //$t->isa_ok( $result, 'NULL', 'call to method createStepSupervisorRows '); - $t->todo( "call to method createStepSupervisorRows using $aStepSupervisor "); - - - //checking method 'renewAllStepGuid' - $t->can_ok( $obj, 'renewAllStepGuid', 'renewAllStepGuid() is callable' ); - - //$result = $obj->renewAllStepGuid ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method renewAllStepGuid '); - $t->todo( "call to method renewAllStepGuid using $oData "); - - - //checking method 'getDynaformRows' - $t->can_ok( $obj, 'getDynaformRows', 'getDynaformRows() is callable' ); - - //$result = $obj->getDynaformRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getDynaformRows '); - $t->todo( "call to method getDynaformRows using $sProUid "); - - - //checking method 'getObjectPermissionRows' - $t->can_ok( $obj, 'getObjectPermissionRows', 'getObjectPermissionRows() is callable' ); - - //$result = $obj->getObjectPermissionRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getObjectPermissionRows '); - $t->todo( "call to method getObjectPermissionRows using $sProUid "); - - - //checking method 'createDynaformRows' - $t->can_ok( $obj, 'createDynaformRows', 'createDynaformRows() is callable' ); - - //$result = $obj->createDynaformRows ( $aDynaform); - //$t->isa_ok( $result, 'NULL', 'call to method createDynaformRows '); - $t->todo( "call to method createDynaformRows using $aDynaform "); - - - //checking method 'createStepTriggerRows' - $t->can_ok( $obj, 'createStepTriggerRows', 'createStepTriggerRows() is callable' ); - - //$result = $obj->createStepTriggerRows ( $aStepTrigger); - //$t->isa_ok( $result, 'NULL', 'call to method createStepTriggerRows '); - $t->todo( "call to method createStepTriggerRows using $aStepTrigger "); - - - //checking method 'getStepTriggerRows' - $t->can_ok( $obj, 'getStepTriggerRows', 'getStepTriggerRows() is callable' ); - - //$result = $obj->getStepTriggerRows ( $aTask); - //$t->isa_ok( $result, 'NULL', 'call to method getStepTriggerRows '); - $t->todo( "call to method getStepTriggerRows using $aTask "); - - - //checking method 'getTriggerRows' - $t->can_ok( $obj, 'getTriggerRows', 'getTriggerRows() is callable' ); - - //$result = $obj->getTriggerRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getTriggerRows '); - $t->todo( "call to method getTriggerRows using $sProUid "); - - - //checking method 'createTriggerRows' - $t->can_ok( $obj, 'createTriggerRows', 'createTriggerRows() is callable' ); - - //$result = $obj->createTriggerRows ( $aTrigger); - //$t->isa_ok( $result, 'NULL', 'call to method createTriggerRows '); - $t->todo( "call to method createTriggerRows using $aTrigger "); - - - //checking method 'getGroupwfRows' - $t->can_ok( $obj, 'getGroupwfRows', 'getGroupwfRows() is callable' ); - - //$result = $obj->getGroupwfRows ( $aGroups); - //$t->isa_ok( $result, 'NULL', 'call to method getGroupwfRows '); - $t->todo( "call to method getGroupwfRows using $aGroups "); - - - //checking method 'getDBConnectionsRows' - $t->can_ok( $obj, 'getDBConnectionsRows', 'getDBConnectionsRows() is callable' ); - - //$result = $obj->getDBConnectionsRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getDBConnectionsRows '); - $t->todo( "call to method getDBConnectionsRows using $sProUid "); - - - //checking method 'getStepSupervisorRows' - $t->can_ok( $obj, 'getStepSupervisorRows', 'getStepSupervisorRows() is callable' ); - - //$result = $obj->getStepSupervisorRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getStepSupervisorRows '); - $t->todo( "call to method getStepSupervisorRows using $sProUid "); - - - //checking method 'getReportTablesRows' - $t->can_ok( $obj, 'getReportTablesRows', 'getReportTablesRows() is callable' ); - - //$result = $obj->getReportTablesRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getReportTablesRows '); - $t->todo( "call to method getReportTablesRows using $sProUid "); - - - //checking method 'getReportTablesVarsRows' - $t->can_ok( $obj, 'getReportTablesVarsRows', 'getReportTablesVarsRows() is callable' ); - - //$result = $obj->getReportTablesVarsRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method getReportTablesVarsRows '); - $t->todo( "call to method getReportTablesVarsRows using $sProUid "); - - - //checking method 'getTaskUserRows' - $t->can_ok( $obj, 'getTaskUserRows', 'getTaskUserRows() is callable' ); - - //$result = $obj->getTaskUserRows ( $aTask); - //$t->isa_ok( $result, 'NULL', 'call to method getTaskUserRows '); - $t->todo( "call to method getTaskUserRows using $aTask "); - - - //checking method 'createTaskUserRows' - $t->can_ok( $obj, 'createTaskUserRows', 'createTaskUserRows() is callable' ); - - //$result = $obj->createTaskUserRows ( $aTaskUser); - //$t->isa_ok( $result, 'NULL', 'call to method createTaskUserRows '); - $t->todo( "call to method createTaskUserRows using $aTaskUser "); - - - //checking method 'createGroupRow' - $t->can_ok( $obj, 'createGroupRow', 'createGroupRow() is callable' ); - - //$result = $obj->createGroupRow ( $aGroupwf); - //$t->isa_ok( $result, 'NULL', 'call to method createGroupRow '); - $t->todo( "call to method createGroupRow using $aGroupwf "); - - - //checking method 'createDBConnectionsRows' - $t->can_ok( $obj, 'createDBConnectionsRows', 'createDBConnectionsRows() is callable' ); - - //$result = $obj->createDBConnectionsRows ( $aConnections); - //$t->isa_ok( $result, 'NULL', 'call to method createDBConnectionsRows '); - $t->todo( "call to method createDBConnectionsRows using $aConnections "); - - - //checking method 'createReportTables' - $t->can_ok( $obj, 'createReportTables', 'createReportTables() is callable' ); - - //$result = $obj->createReportTables ( $aReportTables, $aReportTablesVars); - //$t->isa_ok( $result, 'NULL', 'call to method createReportTables '); - $t->todo( "call to method createReportTables using $aReportTables, $aReportTablesVars "); - - - //checking method 'updateReportTables' - $t->can_ok( $obj, 'updateReportTables', 'updateReportTables() is callable' ); - - //$result = $obj->updateReportTables ( $aReportTables, $aReportTablesVars); - //$t->isa_ok( $result, 'NULL', 'call to method updateReportTables '); - $t->todo( "call to method updateReportTables using $aReportTables, $aReportTablesVars "); - - - //checking method 'createReportTablesVars' - $t->can_ok( $obj, 'createReportTablesVars', 'createReportTablesVars() is callable' ); - - //$result = $obj->createReportTablesVars ( $aReportTablesVars); - //$t->isa_ok( $result, 'NULL', 'call to method createReportTablesVars '); - $t->todo( "call to method createReportTablesVars using $aReportTablesVars "); - - - //checking method 'cleanupReportTablesReferences' - $t->can_ok( $obj, 'cleanupReportTablesReferences', 'cleanupReportTablesReferences() is callable' ); - - //$result = $obj->cleanupReportTablesReferences ( $aReportTables); - //$t->isa_ok( $result, 'NULL', 'call to method cleanupReportTablesReferences '); - $t->todo( "call to method cleanupReportTablesReferences using $aReportTables "); - - - //checking method 'serializeProcess' - $t->can_ok( $obj, 'serializeProcess', 'serializeProcess() is callable' ); - - //$result = $obj->serializeProcess ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method serializeProcess '); - $t->todo( "call to method serializeProcess using $sProUid "); - - - //checking method 'saveSerializedProcess' - $t->can_ok( $obj, 'saveSerializedProcess', 'saveSerializedProcess() is callable' ); - - //$result = $obj->saveSerializedProcess ( $oData); - //$t->isa_ok( $result, 'NULL', 'call to method saveSerializedProcess '); - $t->todo( "call to method saveSerializedProcess using $oData "); - - - //checking method 'getProcessData' - $t->can_ok( $obj, 'getProcessData', 'getProcessData() is callable' ); - - //$result = $obj->getProcessData ( $pmFilename); - //$t->isa_ok( $result, 'NULL', 'call to method getProcessData '); - $t->todo( "call to method getProcessData using $pmFilename "); - - - //checking method 'disablePreviousProcesses' - $t->can_ok( $obj, 'disablePreviousProcesses', 'disablePreviousProcesses() is callable' ); - - //$result = $obj->disablePreviousProcesses ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method disablePreviousProcesses '); - $t->todo( "call to method disablePreviousProcesses using $sProUid "); - - - //checking method 'createFiles' - $t->can_ok( $obj, 'createFiles', 'createFiles() is callable' ); - - //$result = $obj->createFiles ( $oData, $pmFilename); - //$t->isa_ok( $result, 'NULL', 'call to method createFiles '); - $t->todo( "call to method createFiles using $oData, $pmFilename "); - - - //checking method 'removeProcessRows' - $t->can_ok( $obj, 'removeProcessRows', 'removeProcessRows() is callable' ); - - //$result = $obj->removeProcessRows ( $sProUid); - //$t->isa_ok( $result, 'NULL', 'call to method removeProcessRows '); - $t->todo( "call to method removeProcessRows using $sProUid "); - - - //checking method 'createProcessFromData' - $t->can_ok( $obj, 'createProcessFromData', 'createProcessFromData() is callable' ); - - //$result = $obj->createProcessFromData ( $oData, $pmFilename); - //$t->isa_ok( $result, 'NULL', 'call to method createProcessFromData '); - $t->todo( "call to method createProcessFromData using $oData, $pmFilename "); - - - //checking method 'updateProcessFromData' - $t->can_ok( $obj, 'updateProcessFromData', 'updateProcessFromData() is callable' ); - - //$result = $obj->updateProcessFromData ( $oData, $pmFilename); - //$t->isa_ok( $result, 'NULL', 'call to method updateProcessFromData '); - $t->todo( "call to method updateProcessFromData using $oData, $pmFilename "); - - - //checking method 'getStartingTaskForUser' - $t->can_ok( $obj, 'getStartingTaskForUser', 'getStartingTaskForUser() is callable' ); - - //$result = $obj->getStartingTaskForUser ( $sProUid, $sUsrUid); - //$t->isa_ok( $result, 'NULL', 'call to method getStartingTaskForUser '); - $t->todo( "call to method getStartingTaskForUser using $sProUid, $sUsrUid "); - - - //checking method 'ws_open' - $t->can_ok( $obj, 'ws_open', 'ws_open() is callable' ); - - //$result = $obj->ws_open ( $user, $pass); - //$t->isa_ok( $result, 'NULL', 'call to method ws_open '); - $t->todo( "call to method ws_open using $user, $pass "); - - - //checking method 'ws_open_public' - $t->can_ok( $obj, 'ws_open_public', 'ws_open_public() is callable' ); - - //$result = $obj->ws_open_public ( ); - //$t->isa_ok( $result, 'NULL', 'call to method ws_open_public '); - $t->todo( "call to method ws_open_public using "); - - - //checking method 'ws_processList' - $t->can_ok( $obj, 'ws_processList', 'ws_processList() is callable' ); - - //$result = $obj->ws_processList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method ws_processList '); - $t->todo( "call to method ws_processList using "); - - - //checking method 'downloadFile' - $t->can_ok( $obj, 'downloadFile', 'downloadFile() is callable' ); - - //$result = $obj->downloadFile ( $file, $local_path, $newfilename); - //$t->isa_ok( $result, 'NULL', 'call to method downloadFile '); - $t->todo( "call to method downloadFile using $file, $local_path, $newfilename "); - - - //checking method 'ws_processGetData' - $t->can_ok( $obj, 'ws_processGetData', 'ws_processGetData() is callable' ); - - //$result = $obj->ws_processGetData ( $proId); - //$t->isa_ok( $result, 'NULL', 'call to method ws_processGetData '); - $t->todo( "call to method ws_processGetData using $proId "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classPropelTableTest.php b/workflow/engine/test/unit/processmaker/classPropelTableTest.php deleted file mode 100644 index fb4eeb599..000000000 --- a/workflow/engine/test/unit/processmaker/classPropelTableTest.php +++ /dev/null @@ -1,112 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - //$className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 8, "class $className have " . 8 . ' methods.' ); - - //checking method 'prepareQuery' - $t->can_ok( $obj, 'prepareQuery', 'prepareQuery() is callable' ); - - //$result = $obj->prepareQuery ( $limitPage); - //$t->isa_ok( $result, 'NULL', 'call to method prepareQuery '); - $t->todo( "call to method prepareQuery using $limitPage "); - - - //checking method 'setupFromXmlform' - $t->can_ok( $obj, 'setupFromXmlform', 'setupFromXmlform() is callable' ); - - //$result = $obj->setupFromXmlform ( $xmlForm); - //$t->isa_ok( $result, 'NULL', 'call to method setupFromXmlform '); - $t->todo( "call to method setupFromXmlform using $xmlForm "); - - - //checking method 'count' - $t->can_ok( $obj, 'count', 'count() is callable' ); - - //$result = $obj->count ( ); - //$t->isa_ok( $result, 'NULL', 'call to method count '); - $t->todo( "call to method count using "); - - - //checking method 'renderTitle' - $t->can_ok( $obj, 'renderTitle', 'renderTitle() is callable' ); - - //$result = $obj->renderTitle ( ); - //$t->isa_ok( $result, 'NULL', 'call to method renderTitle '); - $t->todo( "call to method renderTitle using "); - - - //checking method 'renderField' - $t->can_ok( $obj, 'renderField', 'renderField() is callable' ); - - //$result = $obj->renderField ( $row, $r, $result); - //$t->isa_ok( $result, 'NULL', 'call to method renderField '); - $t->todo( "call to method renderField using $row, $r, $result "); - - - //checking method 'defaultStyle' - $t->can_ok( $obj, 'defaultStyle', 'defaultStyle() is callable' ); - - //$result = $obj->defaultStyle ( ); - //$t->isa_ok( $result, 'NULL', 'call to method defaultStyle '); - $t->todo( "call to method defaultStyle using "); - - - //checking method 'renderTable' - $t->can_ok( $obj, 'renderTable', 'renderTable() is callable' ); - - //$result = $obj->renderTable ( $block, $fields); - //$t->isa_ok( $result, 'NULL', 'call to method renderTable '); - $t->todo( "call to method renderTable using $block, $fields "); - - - //checking method 'printForm' - $t->can_ok( $obj, 'printForm', 'printForm() is callable' ); - - //$result = $obj->printForm ( $filename, $data); - //$t->isa_ok( $result, 'NULL', 'call to method printForm '); - $t->todo( "call to method printForm using $filename, $data "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classReportTablesTest.php b/workflow/engine/test/unit/processmaker/classReportTablesTest.php deleted file mode 100644 index 392bbcbbc..000000000 --- a/workflow/engine/test/unit/processmaker/classReportTablesTest.php +++ /dev/null @@ -1,112 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 11, "class $className have " . 11 . ' methods.' ); - - //checking method 'deleteAllReportVars' - $t->can_ok( $obj, 'deleteAllReportVars', 'deleteAllReportVars() is callable' ); - - //$result = $obj->deleteAllReportVars ( $sRepTabUid); - //$t->isa_ok( $result, 'NULL', 'call to method deleteAllReportVars '); - $t->todo( "call to method deleteAllReportVars using $sRepTabUid "); - - - //checking method 'dropTable' - $t->can_ok( $obj, 'dropTable', 'dropTable() is callable' ); - - //$result = $obj->dropTable ( $sTableName, $sConnection); - //$t->isa_ok( $result, 'NULL', 'call to method dropTable '); - $t->todo( "call to method dropTable using $sTableName, $sConnection "); - - - //checking method 'createTable' - $t->can_ok( $obj, 'createTable', 'createTable() is callable' ); - - //$result = $obj->createTable ( $sTableName, $sConnection, $sType, $aFields, $bDefaultFields); - //$t->isa_ok( $result, 'NULL', 'call to method createTable '); - $t->todo( "call to method createTable using $sTableName, $sConnection, $sType, $aFields, $bDefaultFields "); - - - //checking method 'populateTable' - $t->can_ok( $obj, 'populateTable', 'populateTable() is callable' ); - - //$result = $obj->populateTable ( $sTableName, $sConnection, $sType, $aFields, $sProcessUid, $sGrid); - //$t->isa_ok( $result, 'NULL', 'call to method populateTable '); - $t->todo( "call to method populateTable using $sTableName, $sConnection, $sType, $aFields, $sProcessUid, $sGrid "); - - - //checking method 'getTableVars' - $t->can_ok( $obj, 'getTableVars', 'getTableVars() is callable' ); - - //$result = $obj->getTableVars ( $sRepTabUid, $bWhitType); - //$t->isa_ok( $result, 'NULL', 'call to method getTableVars '); - $t->todo( "call to method getTableVars using $sRepTabUid, $bWhitType "); - - - //checking method 'deleteReportTable' - $t->can_ok( $obj, 'deleteReportTable', 'deleteReportTable() is callable' ); - - //$result = $obj->deleteReportTable ( $sRepTabUid); - //$t->isa_ok( $result, 'NULL', 'call to method deleteReportTable '); - $t->todo( "call to method deleteReportTable using $sRepTabUid "); - - - //checking method 'updateTables' - $t->can_ok( $obj, 'updateTables', 'updateTables() is callable' ); - - //$result = $obj->updateTables ( $sProcessUid, $sApplicationUid, $iApplicationNumber, $aFields); - //$t->isa_ok( $result, 'NULL', 'call to method updateTables '); - $t->todo( "call to method updateTables using $sProcessUid, $sApplicationUid, $iApplicationNumber, $aFields "); - - - //checking method 'tableExist' - $t->can_ok( $obj, 'tableExist', 'tableExist() is callable' ); - - //$result = $obj->tableExist ( ); - //$t->isa_ok( $result, 'NULL', 'call to method tableExist '); - $t->todo( "call to method tableExist using "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classReportTest.php b/workflow/engine/test/unit/processmaker/classReportTest.php deleted file mode 100644 index c5f01ecd4..000000000 --- a/workflow/engine/test/unit/processmaker/classReportTest.php +++ /dev/null @@ -1,162 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , 'Report', 'class $className created'); - - $t->is( count($methods) , 14, "class $className have " . 14 . ' methods.' ); - - //checking method 'generatedReport1' - $t->can_ok( $obj, 'generatedReport1', 'generatedReport1() is callable' ); - - //$result = $obj->generatedReport1 ( ); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport1 '); - $t->todo( "call to method generatedReport1 using "); - - - //checking method 'generatedReport1_filter' - $t->can_ok( $obj, 'generatedReport1_filter', 'generatedReport1_filter() is callable' ); - - //$result = $obj->generatedReport1_filter ( $from, $to, $startedby); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport1_filter '); - $t->todo( "call to method generatedReport1_filter using $from, $to, $startedby "); - - - //checking method 'descriptionReport1' - $t->can_ok( $obj, 'descriptionReport1', 'descriptionReport1() is callable' ); - - //$result = $obj->descriptionReport1 ( $PRO_UID); - //$t->isa_ok( $result, 'NULL', 'call to method descriptionReport1 '); - $t->todo( "call to method descriptionReport1 using $PRO_UID "); - - - //checking method 'generatedReport2' - $t->can_ok( $obj, 'generatedReport2', 'generatedReport2() is callable' ); - - //$result = $obj->generatedReport2 ( ); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport2 '); - $t->todo( "call to method generatedReport2 using "); - - - //checking method 'reports_Description_filter' - $t->can_ok( $obj, 'reports_Description_filter', 'reports_Description_filter() is callable' ); - - //$result = $obj->reports_Description_filter ( $from, $to, $startedby, $PRO_UID); - //$t->isa_ok( $result, 'NULL', 'call to method reports_Description_filter '); - $t->todo( "call to method reports_Description_filter using $from, $to, $startedby, $PRO_UID "); - - - //checking method 'generatedReport2_filter' - $t->can_ok( $obj, 'generatedReport2_filter', 'generatedReport2_filter() is callable' ); - - //$result = $obj->generatedReport2_filter ( $from, $to, $startedby); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport2_filter '); - $t->todo( "call to method generatedReport2_filter using $from, $to, $startedby "); - - - //checking method 'generatedReport3' - $t->can_ok( $obj, 'generatedReport3', 'generatedReport3() is callable' ); - - //$result = $obj->generatedReport3 ( ); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport3 '); - $t->todo( "call to method generatedReport3 using "); - - - //checking method 'generatedReport3_filter' - $t->can_ok( $obj, 'generatedReport3_filter', 'generatedReport3_filter() is callable' ); - - //$result = $obj->generatedReport3_filter ( $process, $task); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport3_filter '); - $t->todo( "call to method generatedReport3_filter using $process, $task "); - - - //checking method 'generatedReport4' - $t->can_ok( $obj, 'generatedReport4', 'generatedReport4() is callable' ); - - //$result = $obj->generatedReport4 ( ); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport4 '); - $t->todo( "call to method generatedReport4 using "); - - - //checking method 'generatedReport4_filter' - $t->can_ok( $obj, 'generatedReport4_filter', 'generatedReport4_filter() is callable' ); - - //$result = $obj->generatedReport4_filter ( $process, $task); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport4_filter '); - $t->todo( "call to method generatedReport4_filter using $process, $task "); - - - //checking method 'generatedReport5' - $t->can_ok( $obj, 'generatedReport5', 'generatedReport5() is callable' ); - - //$result = $obj->generatedReport5 ( ); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport5 '); - $t->todo( "call to method generatedReport5 using "); - - - //checking method 'generatedReport5_filter' - $t->can_ok( $obj, 'generatedReport5_filter', 'generatedReport5_filter() is callable' ); - - //$result = $obj->generatedReport5_filter ( $process, $task); - //$t->isa_ok( $result, 'NULL', 'call to method generatedReport5_filter '); - $t->todo( "call to method generatedReport5_filter using $process, $task "); - - - //checking method 'getAvailableReports' - $t->can_ok( $obj, 'getAvailableReports', 'getAvailableReports() is callable' ); - - //$result = $obj->getAvailableReports ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getAvailableReports '); - $t->todo( "call to method getAvailableReports using "); - - - //checking method 'reportsPatch' - $t->can_ok( $obj, 'reportsPatch', 'reportsPatch() is callable' ); - - //$result = $obj->reportsPatch ( ); - //$t->isa_ok( $result, 'NULL', 'call to method reportsPatch '); - $t->todo( "call to method reportsPatch using "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classSessionsTest.php b/workflow/engine/test/unit/processmaker/classSessionsTest.php deleted file mode 100644 index 3ddfab181..000000000 --- a/workflow/engine/test/unit/processmaker/classSessionsTest.php +++ /dev/null @@ -1,65 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , $className, "class $className created"); - - //$t->is( count($methods) , 2, "class $className have " . 2 . ' methods.' ); - $t->is( count($methods) , 7, "class $className have " . 7 . ' methods.' ); - - //checking method 'getSessionUser' - $t->can_ok( $obj, 'getSessionUser', 'getSessionUser() is callable' ); - - //$result = $obj->getSessionUser ( $sSessionId); - //$t->isa_ok( $result, 'NULL', 'call to method getSessionUser '); - $t->todo( "call to method getSessionUser using $sSessionId "); - - - //checking method 'verifySession' - $t->can_ok( $obj, 'verifySession', 'verifySession() is callable' ); - - //$result = $obj->verifySession ( $sSessionId); - //$t->isa_ok( $result, 'NULL', 'call to method verifySession '); - $t->todo( "call to method verifySession using $sSessionId "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classSmtpTest.php b/workflow/engine/test/unit/processmaker/classSmtpTest.php deleted file mode 100644 index 6569f42a9..000000000 --- a/workflow/engine/test/unit/processmaker/classSmtpTest.php +++ /dev/null @@ -1,153 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , $className, 'class $className created'); - - $t->is( count($methods) , 13, "class $className have " . 13 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( ); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using "); - - - //checking method 'setServer' - $t->can_ok( $obj, 'setServer', 'setServer() is callable' ); - - //$result = $obj->setServer ( $sServer); - //$t->isa_ok( $result, 'NULL', 'call to method setServer '); - $t->todo( "call to method setServer using $sServer "); - - - //checking method 'setPort' - $t->can_ok( $obj, 'setPort', 'setPort() is callable' ); - - //$result = $obj->setPort ( $iPort); - //$t->isa_ok( $result, 'NULL', 'call to method setPort '); - $t->todo( "call to method setPort using $iPort "); - - - //checking method 'setReturnPath' - $t->can_ok( $obj, 'setReturnPath', 'setReturnPath() is callable' ); - - //$result = $obj->setReturnPath ( $sReturnPath); - //$t->isa_ok( $result, 'NULL', 'call to method setReturnPath '); - $t->todo( "call to method setReturnPath using $sReturnPath "); - - - //checking method 'setHeaders' - $t->can_ok( $obj, 'setHeaders', 'setHeaders() is callable' ); - - //$result = $obj->setHeaders ( $sHeaders); - //$t->isa_ok( $result, 'NULL', 'call to method setHeaders '); - $t->todo( "call to method setHeaders using $sHeaders "); - - - //checking method 'setBody' - $t->can_ok( $obj, 'setBody', 'setBody() is callable' ); - - //$result = $obj->setBody ( $sBody); - //$t->isa_ok( $result, 'NULL', 'call to method setBody '); - $t->todo( "call to method setBody using $sBody "); - - - //checking method 'setSmtpAuthentication' - $t->can_ok( $obj, 'setSmtpAuthentication', 'setSmtpAuthentication() is callable' ); - - //$result = $obj->setSmtpAuthentication ( $sAuth); - //$t->isa_ok( $result, 'NULL', 'call to method setSmtpAuthentication '); - $t->todo( "call to method setSmtpAuthentication using $sAuth "); - - - //checking method 'setUsername' - $t->can_ok( $obj, 'setUsername', 'setUsername() is callable' ); - - //$result = $obj->setUsername ( $sName); - //$t->isa_ok( $result, 'NULL', 'call to method setUsername '); - $t->todo( "call to method setUsername using $sName "); - - - //checking method 'setPassword' - $t->can_ok( $obj, 'setPassword', 'setPassword() is callable' ); - - //$result = $obj->setPassword ( $sPass); - //$t->isa_ok( $result, 'NULL', 'call to method setPassword '); - $t->todo( "call to method setPassword using $sPass "); - - - //checking method 'returnErrors' - $t->can_ok( $obj, 'returnErrors', 'returnErrors() is callable' ); - - //$result = $obj->returnErrors ( ); - //$t->isa_ok( $result, 'NULL', 'call to method returnErrors '); - $t->todo( "call to method returnErrors using "); - - - //checking method 'returnStatus' - $t->can_ok( $obj, 'returnStatus', 'returnStatus() is callable' ); - - //$result = $obj->returnStatus ( ); - //$t->isa_ok( $result, 'NULL', 'call to method returnStatus '); - $t->todo( "call to method returnStatus using "); - - - //checking method 'setEnvelopeTo' - $t->can_ok( $obj, 'setEnvelopeTo', 'setEnvelopeTo() is callable' ); - - //$result = $obj->setEnvelopeTo ( $env_to); - //$t->isa_ok( $result, 'NULL', 'call to method setEnvelopeTo '); - $t->todo( "call to method setEnvelopeTo using $env_to "); - - - //checking method 'sendMessage' - $t->can_ok( $obj, 'sendMessage', 'sendMessage() is callable' ); - - //$result = $obj->sendMessage ( ); - //$t->isa_ok( $result, 'NULL', 'call to method sendMessage '); - $t->todo( "call to method sendMessage using "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classSpoolRunTest.php b/workflow/engine/test/unit/processmaker/classSpoolRunTest.php deleted file mode 100644 index 30316a88d..000000000 --- a/workflow/engine/test/unit/processmaker/classSpoolRunTest.php +++ /dev/null @@ -1,160 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - require_once( 'propel/Propel.php' ); - require_once ( "creole/Creole.php" ); - require_once ( PATH_CORE . "config/databases.php"); - - G::LoadClass ( 'spool'); - - -// $obj = new SpoolRun ($dbc); - $t = new lime_test( 24, new lime_output_color() ); - - $className = SpoolRun; - $className = strtolower ( substr ($className, 0,1) ) . substr ($className, 1 ); - - $reflect = new ReflectionClass( $className ); - $method = array ( ); - $testItems = 0; - - foreach ( $reflect->getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 12, "class $className have " . 12 . ' methods.' ); - // Methods - $aMethods = array_keys ( $methods ); - //checking method '__construct' - $t->is ( $aMethods[0], '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( ); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using "); - - - //checking method 'getSpoolFilesList' - $t->is ( $aMethods[1], 'getSpoolFilesList', 'getSpoolFilesList() is callable' ); - - //$result = $obj->getSpoolFilesList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getSpoolFilesList '); - $t->todo( "call to method getSpoolFilesList using "); - - - //checking method 'create' - $t->is ( $aMethods[2], 'create', 'create() is callable' ); - - //$result = $obj->create ( $aData); - //$t->isa_ok( $result, 'NULL', 'call to method create '); - $t->todo( "call to method create using $aData "); - - - //checking method 'setConfig' - $t->is ( $aMethods[3], 'setConfig', 'setConfig() is callable' ); - - //$result = $obj->setConfig ( $aConfig); - //$t->isa_ok( $result, 'NULL', 'call to method setConfig '); - $t->todo( "call to method setConfig using $aConfig "); - - - //checking method 'setData' - $t->is ( $aMethods[4], 'setData', 'setData() is callable' ); - - //$result = $obj->setData ( $sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate); - //$t->isa_ok( $result, 'NULL', 'call to method setData '); - $t->todo( "call to method setData using $sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate "); - - - //checking method 'sendMail' - $t->is ( $aMethods[5], 'sendMail', 'sendMail() is callable' ); - - //$result = $obj->sendMail ( ); - //$t->isa_ok( $result, 'NULL', 'call to method sendMail '); - $t->todo( "call to method sendMail using "); - - - //checking method 'updateSpoolStatus' - $t->is ( $aMethods[6], 'updateSpoolStatus', 'updateSpoolStatus() is callable' ); - - //$result = $obj->updateSpoolStatus ( ); - //$t->isa_ok( $result, 'NULL', 'call to method updateSpoolStatus '); - $t->todo( "call to method updateSpoolStatus using "); - - - //checking method 'handleFrom' - $t->is ( $aMethods[7], 'handleFrom', 'handleFrom() is callable' ); - - //$result = $obj->handleFrom ( ); - //$t->isa_ok( $result, 'NULL', 'call to method handleFrom '); - $t->todo( "call to method handleFrom using "); - - - //checking method 'handleEnvelopeTo' - $t->is ( $aMethods[8], 'handleEnvelopeTo', 'handleEnvelopeTo() is callable' ); - - //$result = $obj->handleEnvelopeTo ( ); - //$t->isa_ok( $result, 'NULL', 'call to method handleEnvelopeTo '); - $t->todo( "call to method handleEnvelopeTo using "); - - - //checking method 'handleMail' - $t->is ( $aMethods[9], 'handleMail', 'handleMail() is callable' ); - - //$result = $obj->handleMail ( ); - //$t->isa_ok( $result, 'NULL', 'call to method handleMail '); - $t->todo( "call to method handleMail using "); - - - //checking method 'resendEmails' - $t->is ( $aMethods[10], 'resendEmails', 'resendEmails() is callable' ); - - //$result = $obj->resendEmails ( ); - //$t->isa_ok( $result, 'NULL', 'call to method resendEmails '); - $t->todo( "call to method resendEmails using "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classToolBarTest.php b/workflow/engine/test/unit/processmaker/classToolBarTest.php deleted file mode 100644 index 7b4c8496d..000000000 --- a/workflow/engine/test/unit/processmaker/classToolBarTest.php +++ /dev/null @@ -1,60 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - G::LoadSystem ( 'form'); - G::LoadSystem ( 'dbconnection'); - G::LoadSystem ( 'dbsession'); - G::LoadSystem ( 'dbrecordset'); - G::LoadSystem ( 'dbtable'); - G::LoadClass ( 'toolBar'); - - require_once ( PATH_CORE . "config/databases.php"); - - $dbc = new DBConnection(); - $ses = new DBSession( $dbc); - $file = 'login/login'; - $arg1 = ''; - $arg2 = ''; - $arg3 = ''; - - $obj = new ToolBar ( $file ); - $t = new lime_test( 1, new lime_output_color() ); - - $t->diag('class ToolBar' ); - $t->isa_ok( $obj , 'ToolBar', 'class ToolBar created'); - - $t->diag(' XmlForm_Field_toolbar' ); - - //$t->fail( 'review all pendings methods and CLASSES in this class'); - -?> \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classTranslationTest.php b/workflow/engine/test/unit/processmaker/classTranslationTest.php deleted file mode 100644 index 1067c5619..000000000 --- a/workflow/engine/test/unit/processmaker/classTranslationTest.php +++ /dev/null @@ -1,55 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - $unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php' ; - require_once( $unitFilename ); - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - require_once ( PATH_CORE . "config/databases.php"); - require_once ( "propel/Propel.php" ); - Propel::init( PATH_CORE . "config/databases.php"); - - G::LoadThirdParty('smarty/libs','Smarty.class'); - G::LoadSystem ( 'error'); - G::LoadSystem ( 'xmlform'); - G::LoadSystem ( 'xmlDocument'); - require_once ( 'classes/model/Translation.php'); - - require_once ( PATH_CORE . "config/databases.php"); - $obj = new Translation (); - $obj = new Translation (); - $method = array ( ); - $testItems = 0; - $class_methods = get_class_methods($obj); - foreach ($class_methods as $method_name) { - $methods[ $testItems ] = $method_name; - $testItems++; - } - - $t = new lime_test( 2, new lime_output_color()); - - $t->diag('class filterForm' ); - $t->is( $testItems , 38, "class Translation " . $testItems . " methods." ); - $t->todo( 'review all pendings in this class'); - diff --git a/workflow/engine/test/unit/processmaker/classWsBaseTest.php b/workflow/engine/test/unit/processmaker/classWsBaseTest.php deleted file mode 100644 index 2769d1d64..000000000 --- a/workflow/engine/test/unit/processmaker/classWsBaseTest.php +++ /dev/null @@ -1,233 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , "wsBase", "class $className created"); - - //$t->is( count($methods) , 26, "class $className have " . 26 . ' methods.' ); - - $t->is( count($methods) , 28, "class $className have " . 28 . ' methods.' ); - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( ); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using "); - - - //checking method 'login' - $t->can_ok( $obj, 'login', 'login() is callable' ); - - //$result = $obj->login ( $userid, $password); - //$t->isa_ok( $result, 'NULL', 'call to method login '); - $t->todo( "call to method login using $userid, $password "); - - - //checking method 'processList' - $t->can_ok( $obj, 'processList', 'processList() is callable' ); - - //$result = $obj->processList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method processList '); - $t->todo( "call to method processList using "); - - - //checking method 'roleList' - $t->can_ok( $obj, 'roleList', 'roleList() is callable' ); - - //$result = $obj->roleList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method roleList '); - $t->todo( "call to method roleList using "); - - - //checking method 'groupList' - $t->can_ok( $obj, 'groupList', 'groupList() is callable' ); - - //$result = $obj->groupList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method groupList '); - $t->todo( "call to method groupList using "); - - - //checking method 'caseList' - $t->can_ok( $obj, 'caseList', 'caseList() is callable' ); - - //$result = $obj->caseList ( $userId); - //$t->isa_ok( $result, 'NULL', 'call to method caseList '); - $t->todo( "call to method caseList using $userId "); - - - //checking method 'userList' - $t->can_ok( $obj, 'userList', 'userList() is callable' ); - - //$result = $obj->userList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method userList '); - $t->todo( "call to method userList using "); - - - //checking method 'triggerList' - $t->can_ok( $obj, 'triggerList', 'triggerList() is callable' ); - - //$result = $obj->triggerList ( ); - //$t->isa_ok( $result, 'NULL', 'call to method triggerList '); - $t->todo( "call to method triggerList using "); - - - //checking method 'taskList' - $t->can_ok( $obj, 'taskList', 'taskList() is callable' ); - - //$result = $obj->taskList ( $userId); - //$t->isa_ok( $result, 'NULL', 'call to method taskList '); - $t->todo( "call to method taskList using $userId "); - - - //checking method 'sendMessage' - $t->can_ok( $obj, 'sendMessage', 'sendMessage() is callable' ); - - //$result = $obj->sendMessage ( $caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields); - //$t->isa_ok( $result, 'NULL', 'call to method sendMessage '); - $t->todo( "call to method sendMessage using $caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields "); - - - //checking method 'getCaseInfo' - $t->can_ok( $obj, 'getCaseInfo', 'getCaseInfo() is callable' ); - - //$result = $obj->getCaseInfo ( $caseId, $iDelIndex); - //$t->isa_ok( $result, 'NULL', 'call to method getCaseInfo '); - $t->todo( "call to method getCaseInfo using $caseId, $iDelIndex "); - - - //checking method 'createUser' - $t->can_ok( $obj, 'createUser', 'createUser() is callable' ); - - //$result = $obj->createUser ( $userId, $firstname, $lastname, $email, $role, $password); - //$t->isa_ok( $result, 'NULL', 'call to method createUser '); - $t->todo( "call to method createUser using $userId, $firstname, $lastname, $email, $role, $password "); - - - //checking method 'assignUserToGroup' - $t->can_ok( $obj, 'assignUserToGroup', 'assignUserToGroup() is callable' ); - - //$result = $obj->assignUserToGroup ( $userId, $groupId); - //$t->isa_ok( $result, 'NULL', 'call to method assignUserToGroup '); - $t->todo( "call to method assignUserToGroup using $userId, $groupId "); - - - //checking method 'sendVariables' - $t->can_ok( $obj, 'sendVariables', 'sendVariables() is callable' ); - - //$result = $obj->sendVariables ( $caseId, $variables); - //$t->isa_ok( $result, 'NULL', 'call to method sendVariables '); - $t->todo( "call to method sendVariables using $caseId, $variables "); - - - //checking method 'getVariables' - $t->can_ok( $obj, 'getVariables', 'getVariables() is callable' ); - - //$result = $obj->getVariables ( $caseId, $variables); - //$t->isa_ok( $result, 'NULL', 'call to method getVariables '); - $t->todo( "call to method getVariables using $caseId, $variables "); - - - //checking method 'newCase' - $t->can_ok( $obj, 'newCase', 'newCase() is callable' ); - - //$result = $obj->newCase ( $processId, $userId, $taskId, $variables); - //$t->isa_ok( $result, 'NULL', 'call to method newCase '); - $t->todo( "call to method newCase using $processId, $userId, $taskId, $variables "); - - - //checking method 'newCaseImpersonate' - $t->can_ok( $obj, 'newCaseImpersonate', 'newCaseImpersonate() is callable' ); - - //$result = $obj->newCaseImpersonate ( $processId, $userId, $variables); - //$t->isa_ok( $result, 'NULL', 'call to method newCaseImpersonate '); - $t->todo( "call to method newCaseImpersonate using $processId, $userId, $variables "); - - - //checking method 'derivateCase' - $t->can_ok( $obj, 'derivateCase', 'derivateCase() is callable' ); - - //$result = $obj->derivateCase ( $userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment); - //$t->isa_ok( $result, 'NULL', 'call to method derivateCase '); - $t->todo( "call to method derivateCase using $userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment "); - - - //checking method 'executeTrigger' - $t->can_ok( $obj, 'executeTrigger', 'executeTrigger() is callable' ); - - //$result = $obj->executeTrigger ( $userId, $caseId, $triggerIndex, $delIndex); - //$t->isa_ok( $result, 'NULL', 'call to method executeTrigger '); - $t->todo( "call to method executeTrigger using $userId, $caseId, $triggerIndex, $delIndex "); - - - //checking method 'taskCase' - $t->can_ok( $obj, 'taskCase', 'taskCase() is callable' ); - - //$result = $obj->taskCase ( $caseId); - //$t->isa_ok( $result, 'NULL', 'call to method taskCase '); - $t->todo( "call to method taskCase using $caseId "); - - - //checking method 'processListVerified' - $t->can_ok( $obj, 'processListVerified', 'processListVerified() is callable' ); - - //$result = $obj->processListVerified ( $userId); - //$t->isa_ok( $result, 'NULL', 'call to method processListVerified '); - $t->todo( "call to method processListVerified using $userId "); - - - //checking method 'reassignCase' - $t->can_ok( $obj, 'reassignCase', 'reassignCase() is callable' ); - - //$result = $obj->reassignCase ( $sessionId, $caseId, $delIndex, $userIdSource, $userIdTarget); - //$t->isa_ok( $result, 'NULL', 'call to method reassignCase '); - $t->todo( "call to method reassignCase using $sessionId, $caseId, $delIndex, $userIdSource, $userIdTarget "); - - - //checking method 'systemInformation' - $t->can_ok( $obj, 'systemInformation', 'systemInformation() is callable' ); - - //$result = $obj->systemInformation ( ); - //$t->isa_ok( $result, 'NULL', 'call to method systemInformation '); - $t->todo( "call to method systemInformation using "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classWsResponseTest.php b/workflow/engine/test/unit/processmaker/classWsResponseTest.php deleted file mode 100644 index facb2b1ad..000000000 --- a/workflow/engine/test/unit/processmaker/classWsResponseTest.php +++ /dev/null @@ -1,73 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - - $t->diag('class $className' ); - $t->isa_ok( $obj , $className, 'class $className created'); - - $t->is( count($methods) , 3, "class $className have " . 3 . ' methods.' ); - - //checking method '__construct' - $t->can_ok( $obj, '__construct', '__construct() is callable' ); - - //$result = $obj->__construct ( $status, $message); - //$t->isa_ok( $result, 'NULL', 'call to method __construct '); - $t->todo( "call to method __construct using $status, $message "); - - - //checking method 'getPayloadString' - $t->can_ok( $obj, 'getPayloadString', 'getPayloadString() is callable' ); - - //$result = $obj->getPayloadString ( $operation); - //$t->isa_ok( $result, 'NULL', 'call to method getPayloadString '); - $t->todo( "call to method getPayloadString using $operation "); - - - //checking method 'getPayloadArray' - $t->can_ok( $obj, 'getPayloadArray', 'getPayloadArray() is callable' ); - - //$result = $obj->getPayloadArray ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getPayloadArray '); - $t->todo( "call to method getPayloadArray using "); - - - - $t->todo ( 'review all pendings methods in this class'); \ No newline at end of file diff --git a/workflow/engine/test/unit/processmaker/classXmlDbTest.php b/workflow/engine/test/unit/processmaker/classXmlDbTest.php deleted file mode 100644 index 9e4a5a564..000000000 --- a/workflow/engine/test/unit/processmaker/classXmlDbTest.php +++ /dev/null @@ -1,64 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - $t->isa_ok( $obj , "XMLDB", "class $className created"); - - $t->is( count($methods) , 2, "class $className have " . 2 . ' methods.' ); - - //checking method 'connect' - $t->can_ok( $obj, 'connect', 'connect() is callable' ); - - //$result = $obj->connect ( $dsn, $options); - //$t->isa_ok( $result, 'NULL', 'call to method connect '); - $t->todo( "call to method connect using $dsn, $options "); - - - //checking method 'isError' - $t->can_ok( $obj, 'isError', 'isError() is callable' ); - - //$result = $obj->isError ( $result); - //$t->isa_ok( $result, 'NULL', 'call to method isError '); - $t->todo( "call to method isError using $result "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classXmlForm_Field_ImageTest.php b/workflow/engine/test/unit/processmaker/classXmlForm_Field_ImageTest.php deleted file mode 100644 index ca6385a69..000000000 --- a/workflow/engine/test/unit/processmaker/classXmlForm_Field_ImageTest.php +++ /dev/null @@ -1,209 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - - $t->is( count($methods) , 20, "class $className have " . 20 . ' methods.' ); - // Methods - $aMethods = array_keys ( $methods ); - //checking method 'render' - $t->is ( $aMethods[0], 'render', 'render() is callable' ); - - //$result = $obj->render ( $value, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method render '); - $t->todo( "call to method render using $value, $owner "); - - - //checking method 'XmlForm_Field' - $t->is ( $aMethods[1], 'XmlForm_Field', 'XmlForm_Field() is callable' ); - - //$result = $obj->XmlForm_Field ( $xmlNode, $lang, $home, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method XmlForm_Field '); - $t->todo( "call to method XmlForm_Field using $xmlNode, $lang, $home, $owner "); - - - //checking method 'validateValue' - $t->is ( $aMethods[2], 'validateValue', 'validateValue() is callable' ); - - //$result = $obj->validateValue ( $value); - //$t->isa_ok( $result, 'NULL', 'call to method validateValue '); - $t->todo( "call to method validateValue using $value "); - - - //checking method 'executeXmlDB' - $t->is ( $aMethods[3], 'executeXmlDB', 'executeXmlDB() is callable' ); - - //$result = $obj->executeXmlDB ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executeXmlDB '); - $t->todo( "call to method executeXmlDB using $owner, $row "); - - - //checking method 'executePropel' - $t->is ( $aMethods[4], 'executePropel', 'executePropel() is callable' ); - - //$result = $obj->executePropel ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executePropel '); - $t->todo( "call to method executePropel using $owner, $row "); - - - //checking method 'executeSQL' - $t->is ( $aMethods[5], 'executeSQL', 'executeSQL() is callable' ); - - //$result = $obj->executeSQL ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executeSQL '); - $t->todo( "call to method executeSQL using $owner, $row "); - - - //checking method 'htmlentities' - $t->is ( $aMethods[6], 'htmlentities', 'htmlentities() is callable' ); - - //$result = $obj->htmlentities ( $value, $flags, $encoding); - //$t->isa_ok( $result, 'NULL', 'call to method htmlentities '); - $t->todo( "call to method htmlentities using $value, $flags, $encoding "); - - - //checking method 'renderGrid' - $t->is ( $aMethods[7], 'renderGrid', 'renderGrid() is callable' ); - - //$result = $obj->renderGrid ( $values, $owner, $onlyValue, $therow); - //$t->isa_ok( $result, 'NULL', 'call to method renderGrid '); - $t->todo( "call to method renderGrid using $values, $owner, $onlyValue, $therow "); - - - //checking method 'renderTable' - $t->is ( $aMethods[8], 'renderTable', 'renderTable() is callable' ); - - //$result = $obj->renderTable ( $values, $owner, $onlyValue); - //$t->isa_ok( $result, 'NULL', 'call to method renderTable '); - $t->todo( "call to method renderTable using $values, $owner, $onlyValue "); - - - //checking method 'dependentOf' - $t->is ( $aMethods[9], 'dependentOf', 'dependentOf() is callable' ); - - //$result = $obj->dependentOf ( ); - //$t->isa_ok( $result, 'NULL', 'call to method dependentOf '); - $t->todo( "call to method dependentOf using "); - - - //checking method 'mask' - $t->is ( $aMethods[10], 'mask', 'mask() is callable' ); - - //$result = $obj->mask ( $format, $value); - //$t->isa_ok( $result, 'NULL', 'call to method mask '); - $t->todo( "call to method mask using $format, $value "); - - - //checking method 'getAttributes' - $t->is ( $aMethods[11], 'getAttributes', 'getAttributes() is callable' ); - - //$result = $obj->getAttributes ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getAttributes '); - $t->todo( "call to method getAttributes using "); - - - //checking method 'getEvents' - $t->is ( $aMethods[12], 'getEvents', 'getEvents() is callable' ); - - //$result = $obj->getEvents ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getEvents '); - $t->todo( "call to method getEvents using "); - - - //checking method 'attachEvents' - $t->is ( $aMethods[13], 'attachEvents', 'attachEvents() is callable' ); - - //$result = $obj->attachEvents ( $elementRef); - //$t->isa_ok( $result, 'NULL', 'call to method attachEvents '); - $t->todo( "call to method attachEvents using $elementRef "); - - - //checking method 'createXmlNode' - $t->is ( $aMethods[14], 'createXmlNode', 'createXmlNode() is callable' ); - - //$result = $obj->createXmlNode ( $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method createXmlNode '); - $t->todo( "call to method createXmlNode using $includeDefaultValues "); - - - //checking method 'updateXmlNode' - $t->is ( $aMethods[15], 'updateXmlNode', 'updateXmlNode() is callable' ); - - //$result = $obj->updateXmlNode ( $node, $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method updateXmlNode '); - $t->todo( "call to method updateXmlNode using $node, $includeDefaultValues "); - - - //checking method 'getXmlAttributes' - $t->is ( $aMethods[16], 'getXmlAttributes', 'getXmlAttributes() is callable' ); - - //$result = $obj->getXmlAttributes ( $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method getXmlAttributes '); - $t->todo( "call to method getXmlAttributes using $includeDefaultValues "); - - - //checking method 'maskValue' - $t->is ( $aMethods[17], 'maskValue', 'maskValue() is callable' ); - - //$result = $obj->maskValue ( $value, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method maskValue '); - $t->todo( "call to method maskValue using $value, $owner "); - - - //checking method 'cloneObject' - $t->is ( $aMethods[18], 'cloneObject', 'cloneObject() is callable' ); - - //$result = $obj->cloneObject ( ); - //$t->isa_ok( $result, 'NULL', 'call to method cloneObject '); - $t->todo( "call to method cloneObject using "); - - - //checking method 'getPMTableValue' - $t->is ( $aMethods[19], 'getPMTableValue', 'getPMTableValue() is callable' ); - - //$result = $obj->getPMTableValue ( $oOwner); - //$t->isa_ok( $result, 'NULL', 'call to method getPMTableValue '); - $t->todo( "call to method getPMTableValue using $oOwner "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/processmaker/classXmlForm_Field_TextPMTest.php b/workflow/engine/test/unit/processmaker/classXmlForm_Field_TextPMTest.php deleted file mode 100644 index 2784caaa6..000000000 --- a/workflow/engine/test/unit/processmaker/classXmlForm_Field_TextPMTest.php +++ /dev/null @@ -1,210 +0,0 @@ -getMethods() as $reflectmethod ) { - $params = ''; - foreach ( $reflectmethod->getParameters() as $key => $row ) { - if ( $params != '' ) $params .= ', '; - $params .= '$' . $row->name; - } - - $testItems++; - $methods[ $reflectmethod->getName() ] = $params; - } - //To change the case only the first letter of each word, TIA - $className = ucwords($className); - $t->diag("class $className" ); - - //$t->isa_ok( $obj , $className, "class $className created"); - $t->is( count($methods) , 20, "class $className have " . 20 . ' methods.' ); - - //Methods - $aMethods = array_keys ( $methods ); - - //checking method 'render' - $t->is ( $aMethods[0], 'render', 'render() is callable' ); - - //$result = $obj->render ( $value, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method render '); - $t->todo( "call to method render using $value, $owner "); - - - //checking method 'renderGrid' - $t->is ( $aMethods[1], 'renderGrid', 'renderGrid() is callable' ); - - //$result = $obj->renderGrid ( $values, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method renderGrid '); - $t->todo( "call to method renderGrid using $values, $owner "); - - - //checking method 'attachEvents' - $t->is ( $aMethods[2], 'attachEvents', 'attachEvents() is callable' ); - - //$result = $obj->attachEvents ( $element); - //$t->isa_ok( $result, 'NULL', 'call to method attachEvents '); - $t->todo( "call to method attachEvents using $element "); - - - //checking method 'XmlForm_Field' - $t->is ( $aMethods[3], 'XmlForm_Field', 'XmlForm_Field() is callable' ); - - //$result = $obj->XmlForm_Field ( $xmlNode, $lang, $home, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method XmlForm_Field '); - $t->todo( "call to method XmlForm_Field using $xmlNode, $lang, $home, $owner "); - - - //checking method 'validateValue' - $t->is ( $aMethods[4], 'validateValue', 'validateValue() is callable' ); - - //$result = $obj->validateValue ( $value); - //$t->isa_ok( $result, 'NULL', 'call to method validateValue '); - $t->todo( "call to method validateValue using $value "); - - - //checking method 'executeXmlDB' - $t->is ( $aMethods[5], 'executeXmlDB', 'executeXmlDB() is callable' ); - - //$result = $obj->executeXmlDB ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executeXmlDB '); - $t->todo( "call to method executeXmlDB using $owner, $row "); - - - //checking method 'executePropel' - $t->is ( $aMethods[6], 'executePropel', 'executePropel() is callable' ); - - //$result = $obj->executePropel ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executePropel '); - $t->todo( "call to method executePropel using $owner, $row "); - - - //checking method 'executeSQL' - $t->is ( $aMethods[7], 'executeSQL', 'executeSQL() is callable' ); - - //$result = $obj->executeSQL ( $owner, $row); - //$t->isa_ok( $result, 'NULL', 'call to method executeSQL '); - $t->todo( "call to method executeSQL using $owner, $row "); - - - //checking method 'htmlentities' - $t->is ( $aMethods[8], 'htmlentities', 'htmlentities() is callable' ); - - //$result = $obj->htmlentities ( $value, $flags, $encoding); - //$t->isa_ok( $result, 'NULL', 'call to method htmlentities '); - $t->todo( "call to method htmlentities using $value, $flags, $encoding "); - - - //checking method 'renderTable' - $t->is ( $aMethods[9], 'renderTable', 'renderTable() is callable' ); - - //$result = $obj->renderTable ( $values, $owner, $onlyValue); - //$t->isa_ok( $result, 'NULL', 'call to method renderTable '); - $t->todo( "call to method renderTable using $values, $owner, $onlyValue "); - - - //checking method 'dependentOf' - $t->is ( $aMethods[10], 'dependentOf', 'dependentOf() is callable' ); - - //$result = $obj->dependentOf ( ); - //$t->isa_ok( $result, 'NULL', 'call to method dependentOf '); - $t->todo( "call to method dependentOf using "); - - - //checking method 'mask' - $t->is ( $aMethods[11], 'mask', 'mask() is callable' ); - - //$result = $obj->mask ( $format, $value); - //$t->isa_ok( $result, 'NULL', 'call to method mask '); - $t->todo( "call to method mask using $format, $value "); - - - //checking method 'getAttributes' - $t->is ( $aMethods[12], 'getAttributes', 'getAttributes() is callable' ); - - //$result = $obj->getAttributes ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getAttributes '); - $t->todo( "call to method getAttributes using "); - - - //checking method 'getEvents' - $t->is ( $aMethods[13], 'getEvents', 'getEvents() is callable' ); - - //$result = $obj->getEvents ( ); - //$t->isa_ok( $result, 'NULL', 'call to method getEvents '); - $t->todo( "call to method getEvents using "); - - - //checking method 'createXmlNode' - $t->is ( $aMethods[14], 'createXmlNode', 'createXmlNode() is callable' ); - - //$result = $obj->createXmlNode ( $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method createXmlNode '); - $t->todo( "call to method createXmlNode using $includeDefaultValues "); - - - //checking method 'updateXmlNode' - $t->is ( $aMethods[15], 'updateXmlNode', 'updateXmlNode() is callable' ); - - //$result = $obj->updateXmlNode ( $node, $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method updateXmlNode '); - $t->todo( "call to method updateXmlNode using $node, $includeDefaultValues "); - - - //checking method 'getXmlAttributes' - $t->is ( $aMethods[16], 'getXmlAttributes', 'getXmlAttributes() is callable' ); - - //$result = $obj->getXmlAttributes ( $includeDefaultValues); - //$t->isa_ok( $result, 'NULL', 'call to method getXmlAttributes '); - $t->todo( "call to method getXmlAttributes using $includeDefaultValues "); - - - //checking method 'maskValue' - $t->is ( $aMethods[17], 'maskValue', 'maskValue() is callable' ); - - //$result = $obj->maskValue ( $value, $owner); - //$t->isa_ok( $result, 'NULL', 'call to method maskValue '); - $t->todo( "call to method maskValue using $value, $owner "); - - - //checking method 'cloneObject' - $t->is ( $aMethods[18], 'cloneObject', 'cloneObject() is callable' ); - - //$result = $obj->cloneObject ( ); - //$t->isa_ok( $result, 'NULL', 'call to method cloneObject '); - $t->todo( "call to method cloneObject using "); - - - //checking method 'getPMTableValue' - $t->is ( $aMethods[19], 'getPMTableValue', 'getPMTableValue() is callable' ); - - //$result = $obj->getPMTableValue ( $oOwner); - //$t->isa_ok( $result, 'NULL', 'call to method getPMTableValue '); - $t->todo( "call to method getPMTableValue using $oOwner "); - - - - $t->todo ( 'review all pendings methods in this class'); diff --git a/workflow/engine/test/unit/ws/EvaluationDerivationTest.php b/workflow/engine/test/unit/ws/EvaluationDerivationTest.php deleted file mode 100644 index c9195bdb8..000000000 --- a/workflow/engine/test/unit/ws/EvaluationDerivationTest.php +++ /dev/null @@ -1,182 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - $t = new lime_test( 34, new lime_output_color()); - $t->diag('Evaluation Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_EVALUATION', '62540106148bd5278cafec4025395237'); - define ( 'START_EVA_CYCLICAL_TASK', '61213500548bd52a7587928010684501'); - define ( 'START_EVA_MANUAL_TASK', '11768216248bd52ae02ced4099046337'); - define ( 'START_EVA_VALUE_TASK', '18044058448bd52f9b9a5e7001261804'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Evaluation Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_EVALUATION ); - $t->diag('Starting Task: ' . START_EVA_CYCLICAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_EVALUATION, START_EVA_CYCLICAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $amount = rand( 1, 200 ); - $variables = array ( 'amount' => $amount ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "1 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $t->todo( 'Check if the above user is changing according the Group in cyclical order'); - $t->diag( "Check if the case was derivated according the amount = \033[2;31;32m" . $amount . "\033[0m "); - - $result = ws_derivateCase ($caseId, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - if ( $result->status_code == 17 ) { - $t->is( $result->status_code, 17, 'ws_derivateCase status_code = 17'); - $t->diag($result->message ); - $msg = trim ( sprintf ( "Check the case: \033[0;31;32m%s\033[1;32m is in the user To Do List", $caseNumber)); - $t->todo( $msg); - } - else { - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $msg = trim ( sprintf ( "Check that case: \033[0;31;32m%s\033[1;32m is in your Completed List", $caseNumber)); - $t->todo( $msg); - } - } - - $t->diag('---------------------------------' ); - $t->diag('Manual Evaluation Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_EVALUATION ); - $t->diag('Starting Task: ' . START_EVA_MANUAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_EVALUATION, START_EVA_MANUAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code , 0, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $amount = rand( 1, 200 ); - $variables = array ( 'amount' => $amount ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "1 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code , 15, 'ws_derivateCase status_code = 15'); - $t->is( $result->message , 'The task is defined for Manual assignment', 'Task defined for Manual Assignment'); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - //$t->todo( 'Check if the above user is changing according the Group in cyclical order'); - } - - $t->diag('-----------------------------------' ); - $t->diag('Value Evaluation Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_EVALUATION ); - $t->diag('Starting Task: ' . START_EVA_VALUE_TASK ); - - $result = ws_newCase ( PROCESS_UID_EVALUATION, START_EVA_VALUE_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 100 , true, 'ws_derivateCase status_code = 100'); - $msg1 = "Task doesn't have a valid user in variable SYS_NEXT_USER_TO_BE_ASSIGNED or this variable doesn't exist."; - $t->is( $result->message , $msg1, $msg1 ); - - $amount = rand( 1, 200 ); - $variables = array ( 'SYS_NEXT_USER_TO_BE_ASSIGNED' => '00000000000000000000000000000001', 'amount' => $amount ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "2 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 0 , true, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - if ( $amount > 100 ) - $msg1 = "Task 2 - Value Assign(admin)"; - else - $msg1 = "Task 3 - Value Assign(admin)"; - $t->is( trim( $result->message) , $msg1, $msg1 ); - - } - */ diff --git a/workflow/engine/test/unit/ws/OtherMethodsTest.php b/workflow/engine/test/unit/ws/OtherMethodsTest.php deleted file mode 100644 index a0befb1c9..000000000 --- a/workflow/engine/test/unit/ws/OtherMethodsTest.php +++ /dev/null @@ -1,83 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - - $t = new lime_test( 12, new lime_output_color()); - $t->diag('Sequential Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_SEQUENTIAL', '34537126948bc50f6dc0ad8058165755'); - define ( 'START_SEQ_CYCLICAL_TASK', '31132134648bc50fb7afa90020304752'); - define ( 'START_SEQ_MANUAL_TASK', '58845888048bc514a9ca3f6076028720'); - define ( 'START_REQ_VALUE_TASK', '42952443148bc515a7aae98069470300'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - $t->is( function_exists('ws_open'),true, 'ws_open()'); - $t->is( function_exists('ws_newCase'),true, 'ws_newCase()'); - $t->is( function_exists('ws_getCaseInfo'),true, 'ws_getCaseInfo()'); - $t->is( function_exists('ws_derivateCase'),true, 'ws_derivateCase()'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $t->diag('-----------------------------------' ); - $t->diag('Other Methods Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SEQUENTIAL ); - $t->diag('Starting Task: ' . START_SEQ_CYCLICAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_SEQUENTIAL, START_SEQ_CYCLICAL_TASK, array('A'=>'aaa','B'=>'bbb','C'=>'ccc')); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $result = ws_getCaseInfo($result->caseId, 1); - $t->isa_ok( $result, 'stdClass', 'executed ws_getCaseInfo'); - $t->is( $result->caseStatus, 'DRAFT', 'status is DRAFT'); - } - -*/ \ No newline at end of file diff --git a/workflow/engine/test/unit/ws/ParallelDerivation2Test.php b/workflow/engine/test/unit/ws/ParallelDerivation2Test.php deleted file mode 100644 index 5b3de3035..000000000 --- a/workflow/engine/test/unit/ws/ParallelDerivation2Test.php +++ /dev/null @@ -1,206 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - - /* - $t = new lime_test( 39, new lime_output_color()); - $t->diag('Parallel Derivation Test (Variation 1)' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define('PROCESS_UID', '4494018554909d147000020046858161'); - define('START_TASK', '8112792964909d1579896b1090244999'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $users = ws_userList (); - - $t->diag('-----------------------------------' ); - $t->diag('Parallel Derivation Test (Variation 1)' ); - $t->diag('Process Guid: ' . PROCESS_UID); - $t->diag('Starting Task: ' . START_TASK ); - - //First variant - $result = ws_newCase ( PROCESS_UID, START_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - - $variables = array('TASK4' => '0'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $variables = array('TASK6' => '1'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 3 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 4 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 5 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 6 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 7 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 8 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - } - - //Second variant - $result = ws_newCase ( PROCESS_UID, START_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - - $variables = array('TASK4' => '0'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $variables = array('TASK6' => '0'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 3 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 4 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 5 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 6 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 7 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 8 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - } - - //Third variant - $result = ws_newCase ( PROCESS_UID, START_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - - $variables = array('TASK4' => '1'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 4 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $variables = array('TASK4' => '0'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 5 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $variables = array('TASK6' => '1'); - $result = ws_sendVariables ($caseId, $variables ); - $result = ws_derivateCase ($caseId, 3 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 6 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 7 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 8 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 9 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - - $result = ws_derivateCase ($caseId, 10 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - } - - - */ \ No newline at end of file diff --git a/workflow/engine/test/unit/ws/ParallelDerivationTest.php b/workflow/engine/test/unit/ws/ParallelDerivationTest.php deleted file mode 100644 index 93dd2b265..000000000 --- a/workflow/engine/test/unit/ws/ParallelDerivationTest.php +++ /dev/null @@ -1,172 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - - $t = new lime_test( 28, new lime_output_color()); - $t->diag('Parallel Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_PARALLEL', '44326695648bd573b100c74003649014'); - define ( 'START_PAR_CYCLICAL_TASK', '34868254848bd57718bb733027805100'); - define ( 'START_PAR_MANUAL_TASK', '74379238448bd5785506e34066123807'); - define ( 'START_PAR_VALUE_TASK', '28967746348bd57906ff834047943521'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $users = ws_userList (); - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Parallel Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_PARALLEL ); - $t->diag('Starting Task: ' . START_PAR_CYCLICAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_PARALLEL, START_PAR_CYCLICAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $t->todo( 'Check if the above user is changing according the Group in cyclical order'); - - $result = ws_derivateCase ($caseId, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - if ( $result->status_code == 17 ) { - $t->is( $result->status_code, 17, 'ws_derivateCase status_code = 17'); - $t->diag($result->message ); - $msg = trim ( sprintf ( "Check the case: \033[0;31;32m%s\033[1;32m is in the user To Do List", $caseNumber)); - $t->todo( $msg); - } - else { - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $msg = trim ( sprintf ( "Check that case: \033[0;31;32m%s\033[1;32m is in your Completed List", $caseNumber)); - $t->todo( $msg); - } - } - - $t->diag('---------------------------------' ); - $t->diag('Manual Parallel Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_PARALLEL ); - $t->diag('Starting Task: ' . START_PAR_MANUAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_PARALLEL, START_PAR_MANUAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code , 0, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code , 15, 'ws_derivateCase status_code = 15'); - $t->is( $result->message , 'The task is defined for Manual assignment', 'Task defined for Manual Assignment'); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - - $t->diag('-----------------------------------' ); - $t->diag('Value Parallel Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_PARALLEL ); - $t->diag('Starting Task: ' . START_PAR_VALUE_TASK ); - - $result = ws_newCase ( PROCESS_UID_PARALLEL, START_PAR_VALUE_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 100 , true, 'ws_derivateCase status_code = 100'); - $msg1 = "Task doesn't have a valid user in variable leftUser or this variable doesn't exist."; - $t->is( $result->message , $msg1, $msg1 ); - - $user1 = rand(0, count($users)-1 ); - $user2 = rand(0, count($users)-1 ); - $userGuid1 = $users[$user1]['guid']; - $userName1 = $users[$user1]['name']; - $userGuid2 = $users[$user2]['guid']; - $userName2 = $users[$user2]['name']; - $variables = array ( 'leftUser' => $userGuid1, 'rightUser' => $userGuid2 ); - print_r ($variables); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "2 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $msg1 = "Left Task - Value Assign($userName1),Right Task - Value Assign($userName2)"; - $t->is( trim( $result->message) , $msg1, $msg1 ); - - } - -*/ diff --git a/workflow/engine/test/unit/ws/ProcessWithSubprocess.php b/workflow/engine/test/unit/ws/ProcessWithSubprocess.php deleted file mode 100644 index 19d61237c..000000000 --- a/workflow/engine/test/unit/ws/ProcessWithSubprocess.php +++ /dev/null @@ -1,108 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - $t = new lime_test( 25, new lime_output_color()); - $t->diag('Selection Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_SELECTION', '324304616490b213ae38690016293793'); - define ( 'START_CYCLICAL_TASK', '917060771490b214838edb9072930947'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Selection Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_CYCLICAL_TASK ); - for($i=0;$i<1;$i++) - { - $result = ws_newCase ( PROCESS_UID_SELECTION, START_CYCLICAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 21, 'ws_derivateCase status_code = 21'); - $msg1 = "Cannot derivate a \"Manual\" derivation using webservices."; - $t->is( $result->message , $msg1, $msg1 ); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - - $t->diag('-----------------------------------' ); - $t->diag('Manual Selection Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_MANUAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_SELECTION, START_MANUAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 21, 'ws_derivateCase status_code = 21'); - $msg1 = "Cannot derivate a \"Manual\" derivation using webservices."; - $t->is( $result->message , $msg1, $msg1 ); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - -*/ \ No newline at end of file diff --git a/workflow/engine/test/unit/ws/SelectionDerivationTest.php b/workflow/engine/test/unit/ws/SelectionDerivationTest.php deleted file mode 100644 index 350f852ed..000000000 --- a/workflow/engine/test/unit/ws/SelectionDerivationTest.php +++ /dev/null @@ -1,152 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - $t = new lime_test( 25, new lime_output_color()); - $t->diag('Selection Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_SELECTION', '29881714148bd4b985432e5088934432'); - define ( 'START_CYCLICAL_TASK', '53023950248bd4c14e5f337057096979'); - define ( 'START_MANUAL_TASK', '7820297748bd4c185f5f64009218065'); - define ( 'START_VALUE_TASK', '87978806148bd4c1b01e1f2068245917'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Selection Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_CYCLICAL_TASK ); - - //for($i=0;$i<80;$i++) - //{ - $result = ws_newCase ( PROCESS_UID_SELECTION, START_CYCLICAL_TASK, array('A'=>'aaa','B'=>'bbb','C'=>'ccc')); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 21, 'ws_derivateCase status_code = 21'); - $msg1 = "Cannot derivate a \"Manual\" derivation using webservices."; - $t->is( $result->message , $msg1, $msg1 ); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - - $t->diag('-----------------------------------' ); - $t->diag('Manual Selection Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_MANUAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_SELECTION, START_MANUAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 21, 'ws_derivateCase status_code = 21'); - $msg1 = "Cannot derivate a \"Manual\" derivation using webservices."; - $t->is( $result->message , $msg1, $msg1 ); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - - $t->diag('-----------------------------------' ); - $t->diag('Manual Selection Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_VALUE_TASK ); - - $result = ws_newCase ( PROCESS_UID_SELECTION, START_VALUE_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 100 , true, 'ws_derivateCase status_code = 100'); - $msg1 = "Task doesn't have a valid user in variable SYS_NEXT_USER_TO_BE_ASSIGNED or this variable doesn't exist."; - $t->is( $result->message , $msg1, $msg1 ); - - $variables = array ( 'SYS_NEXT_USER_TO_BE_ASSIGNED' => '00000000000000000000000000000001' ); - //$variables = array ( 'SYS_NEXT_USER_TO_BE_ASSIGNED' => '20212274648f60fc8a575d7042794581' ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "1 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 21, 'ws_derivateCase status_code = 21'); - $msg1 = "Cannot derivate a \"Manual\" derivation using webservices."; - $t->is( $result->message , $msg1, $msg1 ); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - } - //} - -*/ diff --git a/workflow/engine/test/unit/ws/SequentialDerivationTest.php b/workflow/engine/test/unit/ws/SequentialDerivationTest.php deleted file mode 100644 index ac6ca0126..000000000 --- a/workflow/engine/test/unit/ws/SequentialDerivationTest.php +++ /dev/null @@ -1,156 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - $t = new lime_test( 32, new lime_output_color()); - $t->diag('Sequential Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_SEQUENTIAL', '34537126948bc50f6dc0ad8058165755'); - define ( 'START_SEQ_CYCLICAL_TASK', '31132134648bc50fb7afa90020304752'); - define ( 'START_SEQ_MANUAL_TASK', '58845888048bc514a9ca3f6076028720'); - define ( 'START_REQ_VALUE_TASK', '42952443148bc515a7aae98069470300'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - $t->is( function_exists('ws_open'),true, 'ws_open()'); - $t->is( function_exists('ws_newCase'),true, 'ws_newCase()'); - $t->is( function_exists('ws_sendEmailMessage'),true, 'ws_sendEmailMessage()'); - $t->is( function_exists('ws_getVariables'),true, 'ws_getVariables()'); - $t->is( function_exists('ws_sendVariables'),true, 'ws_sendVariables()'); - $t->is( function_exists('ws_executeTrigger'),true, 'ws_executeTrigger()'); - $t->is( function_exists('ws_derivateCase'),true, 'ws_derivateCase()'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Sequential Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SEQUENTIAL ); - $t->diag('Starting Task: ' . START_SEQ_CYCLICAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_SEQUENTIAL, START_SEQ_CYCLICAL_TASK, array('A'=>'aaa','B'=>'bbb','C'=>'ccc')); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0'); - $assign = $result->message; - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $t->todo( 'Check if the above user is changing according the Group in cyclical order'); - } - - - $t->diag('---------------------------------' ); - $t->diag('Manual Sequential Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SEQUENTIAL ); - $t->diag('Starting Task: ' . START_SEQ_MANUAL_TASK ); - - $result = ws_newCase ( PROCESS_UID_SEQUENTIAL, START_SEQ_MANUAL_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code , 0, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code , 15, 'ws_derivateCase status_code = 15'); - $t->is( $result->message , 'The task is defined for Manual assignment', 'Task defined for Manual Assignment'); - $assign = $result->message; - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - //$t->todo( 'Check if the above user is changing according the Group in cyclical order'); - } - - $t->diag('-----------------------------------' ); - $t->diag('Value Sequential Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SEQUENTIAL ); - $t->diag('Starting Task: ' . START_REQ_VALUE_TASK ); - - $result = ws_newCase ( PROCESS_UID_SEQUENTIAL, START_REQ_VALUE_TASK, array()); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 100 , true, 'ws_derivateCase status_code = 100'); - $msg1 = "Task doesn't have a valid user in variable SYS_NEXT_USER_TO_BE_ASSIGNED or this variable doesn't exist."; - $t->is( $result->message , $msg1, $msg1 ); - - $variables = array ( 'SYS_NEXT_USER_TO_BE_ASSIGNED' => '00000000000000000000000000000001' ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "1 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code == 0 , true, 'ws_derivateCase status_code = 0'); - $assign = $result->message; - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - $msg1 = "Task 2 - Value Assign(admin)"; - $t->is( trim( $result->message) , $msg1, $msg1 ); - - } - - - -*/ diff --git a/workflow/engine/test/unit/ws/SubprocessTest.php b/workflow/engine/test/unit/ws/SubprocessTest.php deleted file mode 100644 index d97596971..000000000 --- a/workflow/engine/test/unit/ws/SubprocessTest.php +++ /dev/null @@ -1,166 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - $t = new lime_test( 2, new lime_output_color()); - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->todo( 'complete this test'); - -/* - - $t = new lime_test( 39, new lime_output_color()); - $t->diag('Selection Derivation Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID_SELECTION', '324304616490b213ae38690016293793'); - define ( 'START_CYCLICAL_TASK', '917060771490b214838edb9072930947'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php'); - $t->is( function_exists ('ws_open') , true, 'include wsClient.php'); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - - ws_open (); - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->is( strlen ($sessionId) > 10 , true, 'get a valid SessionId'); - $t->diag('Session Id: ' . $sessionId ); - - $t->diag('-----------------------------------' ); - $t->diag('Initial Subprocess Test' ); - $t->diag('Process Guid: ' . PROCESS_UID_SELECTION ); - $t->diag('Starting Task: ' . START_CYCLICAL_TASK ); - for($i=0;$i<1;$i++) - { - $result = ws_newCase ( PROCESS_UID_SELECTION, START_CYCLICAL_TASK, array()); - - //se crea el proceso padre - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - $t->is( $result->status_code == 0 , true, 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) - { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - - //se envia valor para el dynaform de la primera tarea - $variables = array ( 'name' => 'Pepes' ); - $result = ws_sendVariables ($caseId, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg1 = "1 variables received."; - $t->is( $result->message , $msg1, $msg1 ); - - //se deriva y esto ocasiona que se el proceso HIJO sea creado, - $result = ws_derivateCase ($caseId, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0 '); //verificar tipo de derivaciopn s/ws - $t->diag( 'Case number--> ' . $result->derivation['caseNumber'] ); - //deberiamos obtener de alguna forma el UID del proceso HIJO - $caseIdHijo = $result->derivation['caseId']; - $t->diag( 'child caseid ' . $caseIdHijo ); - - //verificar que el proceso hijo tiene la variable names, con el valor que nosotros enviamos al proceso PADRE - $variables = array ( 'names', 'SYS_LANG', 'SYS_APPLICATION'); - $result = ws_getVariables ( $caseIdHijo, $variables ); - - $t->is( $result->variables['names'] , 'Pepes', 'variables[names] should be constant'); - $t->is( $result->variables['SYS_LANG'] , 'en', 'variables[SYS_LANG] should be constant en'); - - //derivar a la siguiente tarea del proceso hijo - $result = ws_derivateCase ($caseIdHijo, 1 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase : from first to second task in child Case'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0 '); //verificar tipo de derivaciopn s/ws - - - // enviar valores para las variables A y B, para realizar las operaciones aritmeticas. - $variables = array ( 'NUMX' => '4', 'NUMY' => '2' ); - $result = ws_sendVariables ($caseIdHijo, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_sendVariables in child process'); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0'); - $msg2 = "2 variables received."; - $t->is( $result->message , $msg2, $msg2 ); - $t->diag('Execute Triggers.....'); - - //execute triggers - $result = ws_executeTrigger ( $caseIdHijo, '613346661490b60f7b7e4f3014763320', 2 ); - $t->is( $result->status_code == 0 , true, 'ws_sendVariables status_code = 0, execute trigrer succesfull '); - $t->diag($result->message); - $t->diag('Execute Triggers end.....'); - - //verificar que el proceso hijo ha terminado - $variables = array ( 'SUM', 'RES', 'MUL', 'DIV'); - $result = ws_getVariables ( $caseIdHijo, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_getVariables in child process'); - $t->is( $result->variables['SUM'] , 6, 'variables[SUM] should be 6'); - $t->is( $result->variables['RES'] , 2, 'variables[RES] should be 2'); - $t->is( $result->variables['MUL'] , 8, 'variables[MUL] should be 8'); //derivar el proceso HIJO al padre, - $t->is( $result->variables['DIV'] , 2, 'variables[DIV] should be 2'); $result = ws_derivateCase ($caseIdHijo, 2 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase : from second to third(end) task in child Case'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0 from second to third(end) task in child Case'); - - //verificar en el proceso PADRE que llegaron las variables resultado de las operaciones matematicas - $variables = array ( 'sum', 'res', 'mul', 'div'); - $result = ws_getVariables ( $caseId, $variables ); - $t->is( $result->variables['sum'] , 6, 'variables[SUM] should be 6'); - $t->is( $result->variables['res'] , 2, 'variables[RES] should be 2'); - $t->is( $result->variables['mul'] , 8, 'variables[MUL] should be 8'); - $t->is( $result->variables['div'] , 2, 'variables[DIV] should be 2'); - - //derivar el proceso PADRE a su ultima tarea - $result = ws_derivateCase ($caseId, 3 ); - $t->isa_ok( $result, 'stdClass', 'executed ws_derivateCase : from second to third(end) task in child Case'); - $t->is( $result->status_code, 0, 'ws_derivateCase status_code = 0 from second to third(end) task in child Case'); - - //verificar que el proceso PADRE ha terminado - $result = ws_getCaseInfo ($caseId, 0); print_r($result); - $t->isa_ok( $result, 'stdClass', 'Finish process to testing'); - $t->is( $result->status_code, 0, 'ws_getCaseInfo status_code = 0 '); - $t->is( $result->message, 'case found', 'ws_getCaseInfo message case found'); - $t->is( $result->caseId, $caseId, 'ws_getCaseInfo caseId ox'); - $t->is( $result->caseNumber, $caseNumber, 'ws_getCaseInfo caseNumber ox'); - $t->is( $result->caseStatus, 'COMPLETED', 'ws_getCaseInfo caseStatus ox'); - $t->is( $result->caseParalell, 'N', 'ws_getCaseInfo caseParalell ox'); - $msg = sprintf ( "Check the case \033[0;31;32m%s\033[0m in the Draft List", $caseNumber); - $t->diag($msg ); - - } - - } - - -*/ \ No newline at end of file diff --git a/workflow/engine/test/unit/ws/basicMethodsTest.php b/workflow/engine/test/unit/ws/basicMethodsTest.php deleted file mode 100644 index 5a73946ef..000000000 --- a/workflow/engine/test/unit/ws/basicMethodsTest.php +++ /dev/null @@ -1,492 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - - $t = new lime_test( 153, new lime_output_color()); - $t->diag('Basic Web Services Methods Test' ); - - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - define ( 'PROCESS_UID', '34537126948bc50f6dc0ad8058165755'); - define ( 'PROCESS_UID_LIBRARY', '45325906448e0e237986394052497623'); - define ( 'START_SEQ_CYCLICAL_TASK', '31132134648bc50fb7afa90020304752'); - define ( 'START_SEQ_MANUAL_TASK', '58845888048bc514a9ca3f6076028720'); - define ( 'START_REQ_VALUE_TASK', '42952443148bc515a7aae98069470300'); - define ( 'STARTERS_GROUP', '4466311448bd9a5788a892004431840'); - define ( 'DERIVATORS_GROUP', '24537073048ee0d6fc69088047537069'); - define ( 'TEST_TRIGGER', '6421002784aa91b4fced632057479964'); - - global $sessionId; - global $client; - - $t->is( strlen (WS_WSDL_URL) > 10 , true, 'include wsConfig.php' ); - $t->is( function_exists('ws_open') , true, 'include wsClient.php' ); - $t->diag('--------------- wsClient functions --------------------' ); - $t->is( function_exists('ws_open'), true, 'ws_open()' ); - $t->is( function_exists('ws_open_with_params'), true, 'ws_open_with_params()' ); - $t->is( function_exists('ws_newCase'), true, 'ws_newCase()' ); - $t->is( function_exists('ws_sendEmailMessage'), true, 'ws_sendEmailMessage()' ); - $t->is( function_exists('ws_getVariables'), true, 'ws_getVariables()' ); - $t->is( function_exists('ws_sendVariables'), true, 'ws_sendVariables()' ); - $t->is( function_exists('ws_executeTrigger'), true, 'ws_executeTrigger()' ); - $t->is( function_exists('ws_routeCase'), true, 'ws_routeCase()' ); - $t->is( function_exists('ws_processList'), true, 'ws_processList()' ); - $t->is( function_exists('ws_getCaseInfo'), true, 'ws_getCaseInfo()' ); - $t->is( function_exists('ws_reassignCase'), true, 'ws_reassignCase()' ); - $t->is( function_exists('ws_userList'), true, 'ws_userList()' ); - $t->is( function_exists('ws_groupList'), true, 'ws_groupList()' ); - $t->is( function_exists('ws_caseList'), true, 'ws_caseList()' ); - $t->is( function_exists('ws_roleList'), true, 'ws_roleList()' ); - $t->is( function_exists('ws_taskCase'), true, 'ws_taskCase()' ); - //$t->is( function_exists('ws_sendFileByCurl'), true, 'ws_sendFileByCurl()' ); - $t->is( function_exists('ws_createUser'), true, 'ws_createUser()' ); - $t->is( function_exists('ws_assignUserToGroup'),true, 'ws_assignUserToGroup()' ); - $t->is( function_exists('ws_systemInformation'),true, 'ws_systemInformation()' ); - $t->is( function_exists('ws_triggerList') ,true, 'ws_triggerList()' ); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - ws_open (); - - $t->diag('--------------- defined WSDL functions --------------------' ); - $methods = $client->__getFunctions(); - $types = $client->__getTypes(); - - $t->is( count($methods) , 22, '22 functions in the wsdl file'); - $t->is( $methods[0] , 'loginResponse login(login $parameters)', 'login'); - $t->is( $methods[1] , 'processListResponse processList(processListRequest $parameters)' , 'processList'); - $t->is( $methods[2] , 'roleListResponse roleList(roleListRequest $parameters)' , 'roleList'); - $t->is( $methods[3] , 'groupListResponse groupList(groupListRequest $parameters)' , 'groupList'); - $t->is( $methods[4] , 'userListResponse userList(userListRequest $parameters)' , 'userList'); - $t->is( $methods[5] , 'caseListResponse caseList(caseListRequest $parameters)' , 'caseList'); - $t->is( $methods[6] , 'createUserResponse createUser(createUserRequest $parameters)' , 'createUser'); - $t->is( $methods[7] , 'pmResponse assignUserToGroup(assignUserToGroupRequest $parameters)' , 'assignUserToGroup'); - $t->is( $methods[8] , 'newCaseResponse newCase(newCaseRequest $parameters)' , 'newCase'); - $t->is( $methods[9] , 'pmResponse reassignCase(reassignCaseRequest $parameters)' , 'reassignCase'); - $t->is( $methods[10] , 'pmResponse newCaseImpersonate(newCaseImpersonateRequest $parameters)', 'newCaseImpersonate'); - $t->is( $methods[11] , 'routeCaseResponse routeCase(routeCaseRequest $parameters)' , 'routeCase'); - $t->is( $methods[12] , 'pmResponse executeTrigger(executeTriggerRequest $parameters)' , 'executeTrigger'); - $t->is( $methods[13] , 'pmResponse sendVariables(sendVariablesRequest $parameters)' , 'sendVariables'); - $t->is( $methods[14] , 'getVariablesResponse getVariables(getVariablesRequest $parameters)' , 'getVariables'); - $t->is( $methods[15] , 'pmResponse sendMessage(sendMessageRequest $parameters)' , 'sendMessage'); - $t->is( $methods[16] , 'getCaseInfoResponse getCaseInfo(getCaseInfoRequest $parameters)' , 'getCaseInfo'); - $t->is( $methods[17] , 'taskListResponse taskList(taskListRequest $parameters)' , 'taskList'); - $t->is( $methods[18] , 'taskCaseResponse taskCase(taskCaseRequest $parameters)' , 'taskCase'); - $t->is( $methods[19] , 'systemInformationResponse systemInformation(systemInformationRequest $parameters)', 'systemInformation'); - $t->is( $methods[20] , 'triggerListResponse triggerList(triggerListRequest $parameters)' , 'triggerList'); - - $t->diag('--------------- defined WSDL types --------------------' ); - - $t->is( count($types) , 52, '52 types in the wsdl file'); - - $type0 = "struct login {\n string userid;\n string password;\n}"; - $type1 = "struct loginResponse {\n integer status_code;\n string message;\n string version;\n string timestamp;\n}" ; - $type2 = "struct pmResponse {\n integer status_code;\n string message;\n string timestamp;\n}" ; - $type3 = "struct processListRequest {\n string sessionId;\n}" ; - $type4 = "struct processListStruct {\n string guid;\n string name;\n}" ; - $type5 = "struct processListResponse {\n processListStruct processes;\n}" ; - $type6 = "struct roleListStruct {\n string guid;\n string name;\n}" ; - $type7 = "struct roleListRequest {\n string sessionId;\n}" ; - $type8 = "struct roleListResponse {\n roleListStruct roles;\n}" ; - $type9 = "struct groupListStruct {\n string guid;\n string name;\n}" ; - $type10 = "struct groupListRequest {\n string sessionId;\n}" ; - $type11 = "struct groupListResponse {\n groupListStruct groups;\n}" ; - $type12 = "struct userListStruct {\n string guid;\n string name;\n}" ; - $type13 = "struct userListRequest {\n string sessionId;\n}" ; - $type14 = "struct userListResponse {\n userListStruct users;\n}" ; - $type15 = "struct caseListStruct {\n string guid;\n string name;\n string status;\n string delIndex;\n}" ; - $type16 = "struct caseListRequest {\n string sessionId;\n}" ; - $type17 = "struct caseListResponse {\n caseListStruct cases;\n}" ; - $type18 = "struct createUserRequest {\n string sessionId;\n string userId;\n string firstname;\n string lastname;\n string email;\n string role;\n string password;\n}" ; - $type19 = "struct createUserResponse {\n integer status_code;\n string message;\n string userUID;\n string timestamp;\n}" ; - $type20 = "struct assignUserToGroupRequest {\n string sessionId;\n string userId;\n string groupId;\n}" ; - $type21 = "struct variableStruct {\n string name;\n}" ; - $type22 = "struct sendVariablesRequest {\n string sessionId;\n string caseId;\n variableListStruct variables;\n}" ; - $type23 = "struct variableListStruct {\n string name;\n string value;\n}" ; - $type24 = "struct variableListRequest {\n variableListStruct variables;\n}" ; - $type25 = "struct getVariablesResponse {\n integer status_code;\n string message;\n string timestamp;\n variableListStruct variables;\n}" ; - $type26 = "struct getVariablesRequest {\n string sessionId;\n string caseId;\n variableStruct variables;\n}" ; - $type27 = "struct newCaseRequest {\n string sessionId;\n string processId;\n string taskId;\n variableListStruct variables;\n}" ; - $type28 = "struct newCaseResponse {\n integer status_code;\n string message;\n string caseId;\n string caseNumber;\n string timestamp;\n}" ; - $type29 = "struct reassignCaseRequest {\n string sessionId;\n string caseId;\n string delIndex;\n string userIdSource;\n string userIdTarget;\n}" ; - $type30 = "struct newCaseImpersonateRequest {\n string sessionId;\n string processId;\n string userId;\n variableStruct variables;\n}" ; - $type31 = "struct routeListStruct {\n string userId;\n string userName;\n string taskId;\n string taskName;\n integer delIndex;\n integer delThread;\n string delThreadStatus;\n}" ; - $type32 = "struct routeCaseRequest {\n string sessionId;\n string caseId;\n string delIndex;\n}" ; - $type33 = "struct routeCaseResponse {\n integer status_code;\n string message;\n string timestamp;\n routeListStruct routing;\n}" ; - $type34 = "struct executeTriggerRequest {\n string sessionId;\n string caseId;\n string triggerIndex;\n string delIndex;\n}" ; - $type35 = "struct sendMessageRequest {\n string sessionId;\n string caseId;\n string from;\n string to;\n string cc;\n string bcc;\n string subject;\n string template;\n}" ; - $type36 = "struct getCaseInfoRequest {\n string sessionId;\n string caseId;\n string delIndex;\n}" ; - $type37 = "struct getCaseInfoStruct {\n string userId;\n string userName;\n string taskId;\n string taskName;\n integer delIndex;\n integer delThread;\n string delThreadStatus;\n}"; - $type38 = "struct getCaseInfoResponse {\n integer status_code;\n string message;\n string caseId;\n string caseNumber;\n string caseName;\n string caseStatus;\n string caseParalell;\n string caseCreatorUser;\n string caseCreatorUserName;\n string processId;\n string processName;\n string createDate;\n getCaseInfoStruct currentUsers;\n}"; - $type39 = "struct taskListRequest {\n string sessionId;\n}" ; - $type40 = "struct taskListStruct {\n string guid;\n string name;\n}" ; - $type41 = "struct taskListResponse {\n taskListStruct tasks;\n}" ; - $type42 = "struct taskCaseStruct {\n string guid;\n string name;\n}" ; - $type43 = "struct taskCaseRequest {\n string sessionId;\n string caseId;\n}" ; - $type44 = "struct taskCaseResponse {\n taskCaseStruct taskCases;\n}"; - $type45 = "struct systemInformationRequest {\n string sessionId;\n}"; - $type46 = "struct systemInformationResponse {\n integer status_code;\n string message;\n string timestamp;\n string version;\n string operatingSystem;\n string webServer;\n string serverName;\n string serverIp;\n string phpVersion;\n string databaseVersion;\n string databaseServerIp;\n string databaseName;\n string availableDatabases;\n string userBrowser;\n string userIp;\n}"; - $type47 = "struct triggerListRequest {\n string sessionId;\n}"; - $type48 = "struct triggerListStruct {\n string guid;\n string name;\n string processId;\n}"; - $type49 = "struct triggerListResponse {\n triggerListStruct triggers;\n}"; - - $t->is( $types[0 ] , $type0 , 'login ' ); - $t->is( $types[1 ] , $type1 , 'loginResponse ' ); - $t->is( $types[2 ] , $type2 , 'pmResponse ' ); - $t->is( $types[3 ] , $type3 , 'processListRequest ' ); - $t->is( $types[4 ] , $type4 , 'processListStruct ' ); - $t->is( $types[5 ] , $type5 , 'processListResponse ' ); - $t->is( $types[6 ] , $type6 , 'processListStruct ' ); - $t->is( $types[7 ] , $type7 , 'roleListStruct ' ); - $t->is( $types[8 ] , $type8 , 'roleListRequest ' ); - $t->is( $types[9 ] , $type9 , 'roleListResponse ' ); - $t->is( $types[10] , $type10 , 'groupListStruct ' ); - $t->is( $types[11] , $type11 , 'groupListRequest ' ); - $t->is( $types[12] , $type12 , 'groupListResponse ' ); - $t->is( $types[13] , $type13 , 'userListStruct ' ); - $t->is( $types[14] , $type14 , 'userListRequest ' ); - $t->is( $types[15] , $type15 , 'userListResponse ' ); - $t->is( $types[16] , $type16 , 'caseListStruct ' ); - $t->is( $types[17] , $type17 , 'caseListRequest ' ); - $t->is( $types[18] , $type18 , 'caseListResponse ' ); - $t->is( $types[19] , $type19 , 'createUserRequest ' ); - $t->is( $types[20] , $type20 , 'createUserResponse ' ); - $t->is( $types[21] , $type21 , 'assignUserToGroupRequest ' ); - $t->is( $types[22] , $type22 , 'variableStruct ' ); - $t->is( $types[23] , $type23 , 'sendVariablesRequest ' ); - $t->is( $types[24] , $type24 , 'variableListStruct ' ); - $t->is( $types[25] , $type25 , 'variableListRequest ' ); - $t->is( $types[26] , $type26 , 'variableListResponse ' ); - $t->is( $types[27] , $type27 , 'getVariablesRequest ' ); - $t->is( $types[28] , $type28 , 'newCaseRequest ' ); - $t->is( $types[29] , $type29 , 'newCaseResponse ' ); - $t->is( $types[30] , $type30 , 'reassignCaseRequest ' ); - $t->is( $types[31] , $type31 , 'newCaseImpersonateRequest ' ); - $t->is( $types[32] , $type32 , 'derivateListStruct ' ); - $t->is( $types[33] , $type33 , 'routeCaseRequest ' ); - $t->is( $types[34] , $type34 , 'routeCaseResponse ' ); - $t->is( $types[35] , $type35 , 'executeTriggerRequest ' ); - $t->is( $types[36] , $type36 , 'sendMessageRequest ' ); - $t->is( $types[37] , $type37 , 'getCaseInfoRequest ' ); - $t->is( $types[38] , $type38 , 'getCaseInfoStruct ' ); - $t->is( $types[39] , $type39 , 'getCaseInfoResponse ' ); - $t->is( $types[40] , $type40 , 'taskListRequest ' ); - $t->is( $types[41] , $type41 , 'taskListStruct ' ); - $t->is( $types[42] , $type42 , 'taskListResponse ' ); - $t->is( $types[43] , $type43 , 'taskCaseStruct ' ); - $t->is( $types[44] , $type44 , 'taskCaseRequest ' ); - $t->is( $types[45] , $type45 , 'taskCaseResponse ' ); - $t->is( $types[46] , $type46 , 'systemInformationRequest ' ); - $t->is( $types[47] , $type47 , 'systemInformationResponse ' ); - $t->is( $types[48] , $type48 , 'triggerListRequest ' ); - $t->is( $types[49] , $type49 , 'triggerListStruct ' ); - $t->is( $types[50] , $type50 , 'triggerListResponse ' ); - $t->is( $types[51] , $type51 , 'triggerListResponse ' ); - $t->is( $types[52] , $type52 , 'triggerListResponse ' ); - - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - $t->diag('--------------- now will check every method of wsdl and soap --------------------' ); - - $info = ws_systemInformation(); - - $t->is( $info->status_code , 0 , 'ws_systemInformation status_code = 0'); - $t->diag( ' version ' . $info->version ); - $t->diag( ' operatingSystem ' . $info->operatingSystem ); - $t->diag( ' webServer ' . $info->webServer ); - $t->diag( ' serverName ' . $info->serverName ); - $t->diag( ' serverIp ' . $info->serverIp ); - $t->diag( ' phpVersion ' . $info->phpVersion ); - $t->diag( ' databaseVersion ' . $info->databaseVersion ); - $t->diag( ' databaseServerIp ' . $info->databaseServerIp ); - $t->diag( ' databaseName ' . $info->databaseName ); - $t->diag( ' availableDatabases ' . $info->availableDatabases ); - $t->diag( ' userBrowser ' . $info->userBrowser ); - $t->diag( ' userIp ' . $info->userIp ); - - $t->is( strlen ($sessionId) > 30 , true, 'getting a valid SessionId'); - $t->is( strlen ($sessionId) > 30 , true, 'ws_open works fine'); - $t->diag('Session Id: ' . $sessionId ); - - //checking the processList - $processes = ws_processList(); - $t->is( count ($processes->processes) >= 0 , true, 'ws_processList works fine'); - - $foundProcess = false; - if ( is_array ($processes->processes ) ) { - foreach ( $processes->processes as $key => $val ) { - if ( $val->guid == PROCESS_UID ) $foundProcess = true; - } - } - else - if ( $processes->processes->guid == PROCESS_UID ) $foundProcess = true; - - if ( $foundProcess ) { - $t->is( $foundProcess, true, 'Sequential Process is present in this Workspace'); - } - - //checking the groupList - $groups = ws_groupList() ; - $t->is( count ($groups->groups) >= 2 , true, 'ws_groupList works fine'); - $foundGroup1 = false; - $foundGroup2 = false; - foreach ( $groups->groups as $key => $val ) { - if ( $val->guid == STARTERS_GROUP ) $foundGroup1 = true; - if ( $val->guid == DERIVATORS_GROUP ) $foundGroup2 = true; - } - $t->is( $foundGroup1, true, 'Starter grous is present in Workspace'); - $t->is( $foundGroup2, true, 'derivators grous is present in Workspace'); - - //checking user list - $users = ws_userList() ; - $t->is( count ($users->users) >= 1 , true, 'ws_userList works fine'); - $foundUser1 = false; - foreach ( $users->users as $key => $val ) { - if ( $val->guid == '00000000000000000000000000000001' ) $foundUser1 = true; - } - $t->is( $foundUser1, true, 'Admin user is present in Workspace'); - - //checking roles - $roles = ws_roleList() ; - $t->is( count ($roles->roles) >= 2 , true, 'ws_roleList works fine'); - $roleOperator = ''; - foreach ( $roles->roles as $key => $val ) { - if ( $val->name == 'PROCESSMAKER_OPERATOR' ) - $roleOperator = $val->guid; - } - $t->is( strlen( $roleOperator ) >= 30 , true, 'role PROCESSMAKER_OPERATOR exists'); - - //checking the triggerList - $triggers = ws_triggerList(); - $t->is( count ($triggers->triggers) >= 1 , true, 'ws_triggerList there are ' . count ($triggers->triggers) . ' triggers in this workspace' ); - - $foundTrigger = false; - if ( is_array ( $triggers->triggers ) ) - foreach ( $triggers->triggers as $key => $val ) { - if ( $val->guid == TEST_TRIGGER )$foundTrigger = true; - } - else { - if ( $triggers->triggers->guid == TEST_TRIGGER )$foundTrigger = true; - } - $t->is( $foundTrigger, true, 'the test trigger is present in Workspace'); - - $t->diag('-----------------------------------' ); - $t->diag('Cyclical Sequential Derivation Test' ); - $t->diag('Process Guid: ' . PROCESS_UID ); - $t->diag('Starting Task: ' . START_SEQ_CYCLICAL_TASK ); - - //creating two new users for the starters and derivations groups' - $dateNow = date ( 'H-m-d H:i:s' ); - $dateDay = date ( 'W' ); - $dateYear = date ( 'Y' ); - - $user1Id = 'John' . date ( 'mdHi' ); - $firstname = 'John ' . date ( 'mdHi' ); - $lastname = 'Doe'; - $email = 'John' . date ( 'mdHi' ) . '@colosa.com'; - $role = $roleOperator; - $password = 'sample'; - $res = ws_createUser ( $user1Id, $firstname, $lastname, $email, $roleOperator, $password ); - $t->isa_ok( $res, 'stdClass', 'executed ws_createUser'); - if( $res->status_code == 0 ) - {$t->is( $res->status_code,0, 'ws_createUser status_code = 0'); - } - else{$t->is( $res->status_code,7, 'ws_createUser status_code = 7'); - } - $t->diag( $res->message ); - $t->diag( 'UserUID = ' . $res->userUID); - $user1Uid = $res->userUID; - $res = ws_assignUserToGroup ( $user1Uid, STARTERS_GROUP ); - - $user2Id = 'Mary' . date ( 'mdHi' ); - $firstname = 'Mary ' . date ( 'mdHi' ); - $lastname = 'Smith'; - $email = 'Mary' . date ( 'mdHi' ) . '@colosa.com'; - $role = $roleOperator; - $password = 'sample'; - $res = ws_createUser ( $user2Id, $firstname, $lastname, $email, $roleOperator, $password ); - $t->isa_ok( $res, 'stdClass', 'executed ws_createUser'); - if( $res->status_code == 0 ){ - $t->is( $res->status_code , 0 , 'ws_createUser status_code = 0'); - }else{ - $t->is( $res->status_code , 7 , 'ws_createUser status_code = 7'); - } - - $t->diag( $res->message ); - $t->diag( 'UserUID = ' . $res->userUID); - $user2Uid = $res->userUID; - $res = ws_assignUserToGroup ( $user2Uid, DERIVATORS_GROUP ); - - $res = ws_open_with_params ( WS_WSDL_URL, $user1Id, 'sample'); - - //create a case with John - $variables = array(); - $variables[] = array ( 'name' => 'webServer', 'value' => $info->webServer ); - $variables[] = array ( 'name' => 'phpVersion', 'value' => $info->phpVersion ); - - $result = ws_newCase ( PROCESS_UID, START_SEQ_CYCLICAL_TASK, $variables ); - $t->isa_ok( $result, 'stdClass', 'executed ws_newCase'); - - $t->is( $result->status_code , 0 , 'ws_newCase status_code = 0'); - if ( $result->status_code == 0 ) { - $caseId = $result->caseId; - $caseNumber = $result->caseNumber; - $msg = sprintf ( "New Case created: \033[0;31;32m%s %s\033[0m", $caseNumber, $caseId ); - $t->diag($msg ); - } - else { - $t->diag('------------ Error executing newCase ---------------------' ); - $t->diag(' status code : ' . $result->status_code ); - $t->diag(' message : ' . $result->message ); - $t->diag(' timestamp : ' . $result->timestamp ); - die; - } - - - //check caseList as the newCase was succesful, there are at least one case for this user - $cases = ws_caseList() ; - $t->is( count ($cases->cases ) >= 1 , true, 'ws_caseList works fine'); - - //getCaseInfo - $delIndex = 1; - $res = ws_getCaseInfo ($caseId, $delIndex); - $t->is( $res->status_code , 0 , 'ws_getCaseInfo status_code = 0'); - $t->is( $res->message , 'Command executed successfully', 'ws_getCaseInfo message '); - $t->is( $res->caseId , $caseId , 'ws_getCaseInfo caseId = ' . $caseId); - $t->is( $res->caseStatus , 'DRAFT' , 'ws_getCaseInfo caseStatus = ' . $res->caseStatus ); - if( $res->caseCreatorUser == '3454143534b144c02717596034198392'){ - $t->is( $res->caseCreatorUser , $user1Uid , 'ws_getCaseInfo caseCreatorUser = ' . $user1Id ); - } - $routedUser = $res->caseCurrentUser; - $t->diag('ws_getCaseInfo caseNumber: ' . $res->caseNumber ); - $t->diag('ws_getCaseInfo caseName: ' . $res->caseName ); - $t->diag('ws_getCaseInfo caseStatus: ' . $res->caseStatus ); - $t->diag('ws_getCaseInfo caseParalell: ' . $res->caseParalell ); - $t->diag('ws_getCaseInfo caseCreatorUser: ' . $res->caseCreatorUser ); - $t->diag('ws_getCaseInfo caseCreatorUserName: ' . $res->caseCreatorUserName ); - $t->diag('ws_getCaseInfo processId: ' . $res->processId ); - $t->diag('ws_getCaseInfo processName: ' . $res->processName ); - $t->diag('ws_getCaseInfo createDate: ' . $res->createDate ); - $t->diag('ws_getCaseInfo currentUsers: ' . $res->currentUsers); - - //sending two variables to this case - $variables = array(); - $variables[] = array ( 'name' => 'firstString', 'value' => $user1Id ); - $variables[] = array ( 'name' => 'secondString', 'value' => PHP_OS ); - $res = ws_sendVariables ($caseId, $variables ); - $t->is( $res->status_code , 0 , "ws_sendVariables status_code = 0 "); - $t->is( $res->message, '2 variables received' , "ws_sendVariables 2 variables received"); - - //execute trigger to concatenate previous strings - $res = ws_executeTrigger ($caseId, TEST_TRIGGER ,$delIndex ); - $t->is( $res->status_code , 0 , 'ws_executeTrigger status_code = 0'); - $t->diag( "trigger source code: \n" . $res->message); - - //get variables and check results - $getVariables = array( 'PIN', 'firstString', 'secondString', 'result', 'today', 'webServer', 'phpVersion' ); - $res = ws_getVariables ($caseId, $getVariables ); - $t->is( $res->status_code , 0 , 'ws_getVariables status_code = 0'); - $t->is( $res->message, '7 variables sent' , "ws_getVariables 7 variables received"); - $t->is( strlen($res->variables[0]->value), 4 , "variable PIN received ok (" . $res->variables[0]->value . ")" ); - $t->is( $res->variables[1]->value, $user1Id , "variable firstString received ok (" . $res->variables[1]->value . ")" ); - $t->is( $res->variables[2]->value, PHP_OS , "variable secondString received ok (" . $res->variables[2]->value . ")" ); - $t->is( $res->variables[3]->value,$user1Id.' '.PHP_OS, "variable result received ok (" . $res->variables[3]->value . ")" ); - $t->is( substr($res->variables[4]->value,0,10),date('Y-m-d'),"variable today received ok (" . $res->variables[4]->value . ")" ); - $t->is( $res->variables[5]->value, $info->webServer , "variable webServer received ok (" . $res->variables[5]->value . ")" ); - $t->is( $res->variables[6]->value, $info->phpVersion , "variable phpVersion received ok (" . $res->variables[6]->value . ")" ); - - //Get case info for invalid case - $res = ws_getCaseInfo ('123456', $delIndex); - $t->is( $res->status_code , 100 , "ws_getCaseInfo status_code = 100 Case doesn't exist."); - $t->diag('ws_getCaseInfo for invalid case is : '. $res->message ); - - //routing a case from John to Mary - $delIndex = 1; - $result = ws_routeCase ($caseId, $delIndex ); - $t->isa_ok( $result, 'stdClass', 'executed ws_routeCase'); - $t->is( $result->status_code, 0, 'ws_routeCase status_code = 0'); - $t->diag ( 'route case message: ' . $result->message ); - $t->is( $result->routing->delIndex, 2 , "delIndex = 2" ); - $t->is( $result->routing->delThread, 1 , "delThread = 1" ); - $t->is( $result->routing->delThreadStatus, 'OPEN', "delThreadStatus = OPEN" ); - - $msg = trim ( sprintf ( "Case Routed to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - - //getCaseInfo to get the current user - $delIndex = 2; - $res = ws_getCaseInfo ($caseId, $delIndex); - $t->is( $res->status_code , 0 , 'ws_getCaseInfo status_code = 0'); - $routedUser = $res->currentUsers->userId; - $routedUserName = $res->currentUsers->userName; - $delIndex = $res->currentUsers->delIndex; - $t->diag( 'ws_getCaseInfo Routed user is ' . $routedUser ); - $t->diag( 'ws_getCaseInfo Routed user is ' . $routedUserName ); - $t->is( $res->caseStatus , 'TO_DO' , 'ws_getCaseInfo caseStatus = ' . $res->caseStatus ); - - - //reassign this case to Mary - $res = ws_open( ); - - $result = ws_reassignCase ($caseId, $delIndex, $routedUser, $user2Uid); - $t->isa_ok( $result, 'stdClass', 'executed ws_reassignCase'); - if ( $result->status_code == 0 ) { - $t->is( $result->status_code, 0, 'ws_reassignCase status_code = 0'); - $t->diag( 'ws_reassignCase message: ' . $result->message ); - } - else { - $t->is( $result->status_code, 30, 'ws_reassignCase status_code = 30'); - $t->diag( 'ws_reassignCase message: ' . $result->message ); - } - //update delIndex after reassign - $res = ws_getCaseInfo ($caseId, $delIndex); - $t->is( $res->status_code , 0 , 'ws_getCaseInfo status_code = 0'); - $routedUser = $res->currentUsers->userId; - $routedUserName = $res->currentUsers->userName; - $delIndex = $res->currentUsers->delIndex; - $t->diag( 'ws_getCaseInfo Reassigned user is ' . $routedUser ); - $t->diag( 'ws_getCaseInfo Reassigned user is ' . $routedUserName ); - - //finishing a case from Mary - $res = ws_open_with_params ( WS_WSDL_URL, $user2Id, 'sample'); - $result = ws_routeCase ($caseId, $delIndex ); - $t->isa_ok( $result, 'stdClass', 'executed ws_routeCase'); - $t->is( $result->status_code, 0, 'ws_routeCase status_code = 0'); - $assign = $result->message; - - $msg = trim ( sprintf ( "Case Derivated to: \033[0;31;32m%s\033[0m", $result->message)); - $t->diag($msg ); - - //check if the case is closed - $res = ws_getCaseInfo ($caseId, $delIndex); - $t->is( $res->status_code , 0 , 'ws_getCaseInfo status_code = 0'); - $t->is( $res->caseStatus , 'COMPLETED' , 'ws_getCaseInfo caseStatus = ' . $res->caseStatus ); diff --git a/workflow/engine/test/unit/ws/bugRelease09Test.php b/workflow/engine/test/unit/ws/bugRelease09Test.php deleted file mode 100644 index 03fff991f..000000000 --- a/workflow/engine/test/unit/ws/bugRelease09Test.php +++ /dev/null @@ -1,334 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - //checking the processList - - function processList($t, $uid_Process,$process_uid_library ) - { - $processes = ws_processList(); - $t->is( count ($processes->processes) >= 0 , true, 'ws_processList works fine'); - - $foundProcess = false; - if ( is_array ($processes->processes ) ) { - foreach ( $processes->processes as $key => $val ) { - if ( $val->guid == $uid_Process ){ - $foundProcess = true; - - } - } - } - else - if ( $processes->processes->guid == $uid_Process ){ - $foundProcess = true; - } - - if ( $foundProcess ) { - $t->is( $foundProcess, true, 'Process for' .$uidName[1]. 'is present in this Workspace'); - } - - } - //creating an user, if this user exists just skip this lines - function verifyUserExists ( $t, $username ) { - global $roleOperator; - - $firstname = $username ; - $lastname = 'Doe'; - $email = $username . '@colosa.com'; - $role = $roleOperator; - $password = 'sample'; - - $res = ws_createUser ( $username, $firstname, $lastname, $email, $roleOperator, $password ); - $t->isa_ok( $res, 'stdClass', 'executed ws_createUser'); - if ($res->status_code == 7 ) { - $t->is( $res->status_code , 7 , $username . ' is already created '); - } - - if ($res->status_code == 0 ) { - $t->is( $res->status_code , 0 , 'ws_createUser status_code = 0 for user ' . $username ); - $t->diag( $res->message ); - $t->diag( 'UserUID = ' . $res->userUID); - } - - } - - //Archivos requeridos - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - //******* Constates Procesos Release 09 ******* // - //Constates Procesos Bug 3947 - define ( 'PROCESS_UID', '5041008614abc53492778f2062174269'); - define ( 'PROCESS_UID_LIBRARY', '4024267104ac4af2771b844012334031'); - define ( 'START_TASK_UID', '2376437854abc5355ba93e8020811984'); - - //Constates Procesos Bug 3500 - define ( 'PROCESS_UID3500', '5492768614ad6a341a8d302080479261'); - define ( 'PROCESS_UID_LIBRARY3500', '7048004704ac6834046dff5024006812'); - define ( 'START_TASK_UID3500', '2225149194ad6a34a675960047603206'); - - //Constates Procesos Bug 3948 - define ( 'PROCESS_UID3948', '67593524648f370c469c043033436171'); - define ( 'PROCESS_UID_LIBRARY3948', '3779354504ad72506358ef5025405839'); - define ( 'START_TASK_UID3948', '2225149194ad6a34a675960047603206'); - - //Constates Procesos Bug 3757 - define ( 'PROCESS_UID3757', '7019135294acd8f11cc1275089288026'); - define ( 'PROCESS_UID_LIBRARY3757', '8470043374ad729196bc233052722688'); - define ( 'START_TASK_UID3757', '8783364554acd8f2f5aa371001390670'); - - - //******* Constates Procesos Release 11 *************// - - //Constates Procesos Bug 4138 - define ( 'PROCESS_UID4138', '7403318024afbd568328557093846607'); - define ( 'PROCESS_UID_LIBRARY4138', '618889924b0d72ee1e8d48041492421'); - define ( 'START_TASK_UID4138', ''); - - //Constates Procesos Bug 3227 - define ( 'PROCESS_UID3227', '5961202124afbbb96071641087311915'); - define ( 'PROCESS_UID_LIBRARY3227', '2341590934afc26725dae19067296505'); - define ( 'START_TASK_UID3227', '8985149674afbbb9f5e7b02093180322'); - - //Constates Procesos Bug 4025 - define ( 'PROCESS_UID4025', '7226950814af80ca8482ea8038668461'); - define ( 'PROCESS_UID_LIBRARY4025', '8185117214af9c139378dc8084788430'); - define ( 'START_TASK_UID4025', '8326587904af80cad7f72c8087571555'); - - //Constates Procesos Bug 3216 - define ( 'PROCESS_UID3216', '3182159894ade14309d0151096572870'); - define ( 'PROCESS_UID_LIBRARY3216', '3990660714af9baeb8d04a6038902756'); - define ( 'START_TASK_UID3216', '7099649794ade14365e5a55015058276'); - - //Constates Procesos Bug 3495 - define ( 'PROCESS_UID3495', '5384638834af26792c75720068072932'); - define ( 'PROCESS_UID_LIBRARY3495', '6443124704afc8405bae5c6095427535'); - define ( 'START_TASK_UID3495', '8345191624af2679a6b74a5066292659'); - - //Constates Procesos Bug 3943 - define ( 'PROCESS_UID3943', '447CEAF7BE6AEB'); - define ( 'PROCESS_UID_LIBRARY3943', '23310008148f211b3abef31074370823'); - define ( 'START_TASK_UID3943', '447CEAF7BE6AEB'); - - - //Constates Procesos Bug 3904 - define ( 'PROCESS_UID3904', '6863908894afd6a750802b7096073967'); - define ( 'PROCESS_UID_LIBRARY3904', '190051244b01c27c5d3bc4073716555'); - define ( 'START_TASK_UID3904', '8489595944afd6a7f062852065972316'); - - //Constates Procesos Bug 3903 - define ( 'PROCESS_UID3903', '8320886204b031419a70f84016574892'); - define ( 'PROCESS_UID_LIBRARY3903', '5651557564b05d34f0c6a54085262893'); - define ( 'START_TASK_UID3903', ''); - //Constates Procesos Bug 4120 - define ( 'PROCESS_UID4120', '3393197484afd256abf8111021901109'); - define ( 'PROCESS_UID_LIBRARY4120', '6544108344b06d0b55f8c44001258903'); - define ( 'START_TASK_UID4120', ''); - - - //**********************************************************************// - - global $sessionId; - global $client; - global $roleOperator; - - - - $t = new lime_test( 66, new lime_output_color()); - $t->diag('Basic Web Services Methods Test' ); - - - $t->is( function_exists('ws_open') , true, 'include wsClient.php' ); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - ws_open (); - - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - //Creación importación de procesos de la librería 09 - processList($t, PROCESS_UID , PROCESS_UID_LIBRARY ); - processList($t, PROCESS_UID3500, PROCESS_UID_LIBRARY3500 ); - processList($t, PROCESS_UID3948, PROCESS_UID_LIBRARY3948 ); - processList($t, PROCESS_UID3757, PROCESS_UID_LIBRARY3757 ); - - //Creación importación de procesos de la librería 11 - processList($t, PROCESS_UID4138, PROCESS_UID_LIBRARY4138 ); - processList($t, PROCESS_UID3227, PROCESS_UID_LIBRARY3227 ); - processList($t, PROCESS_UID4025, PROCESS_UID_LIBRARY4025 ); - processList($t, PROCESS_UID3216, PROCESS_UID_LIBRARY3216 ); - processList($t, PROCESS_UID3495, PROCESS_UID_LIBRARY3495 ); - processList($t, PROCESS_UID3943, PROCESS_UID_LIBRARY3943 ); - processList($t, PROCESS_UID3904, PROCESS_UID_LIBRARY3904 ); - processList($t, PROCESS_UID3903, PROCESS_UID_LIBRARY3903 ); - processList($t, PROCESS_UID4120, PROCESS_UID_LIBRARY4120 ); - - - //checking the groupList - $groups = ws_groupList() ; - $t->is( count ($groups->groups) >= 0 , true, 'ws_groupList works fine'); - $foundGroup1 = false; - $foundGroup2 = false; - $foundGroup3 = false; - $foundGroup4 = false; - $foundGroup5 = false; - $foundGroup6 = false; - $foundGroup7 = false; - $employees = false; - $supervisors = false; - $finance = false; - - foreach ( $groups->groups as $key => $val ) { - - if ( $val->name == "Group One" ) $foundGroup1 = true; - if ( $val->name == "Group Two" ) $foundGroup2 = true; - if ( $val->name == "Group Three") $foundGroup3 = true; - if ( $val->name == "Group Four" ) $foundGroup1 = true; - if ( $val->name == "Group Five" ) $foundGroup2 = true; - if ( $val->name == "Group Six" ) $foundGroup3 = true; - if ( $val->name == "Group Seven" ) $foundGroup1 = true; - if ( $val->name == "Employees" ) $employees = true; - if ( $val->name == "supervisors" ) $supervisors = true; - if ( $val->name == "employees" ) $finance = true; - - } - $t->is( $foundGroup1, true, 'ONE grous is present in Workspace'); - $t->is( $foundGroup2, true, 'TWO grous is present in Workspace'); - $t->is( $foundGroup2, true, 'THREE grous is present in Workspace'); - $t->is( $foundGroup2, true, 'FOUR grous is present in Workspace'); - $t->is( $foundGroup2, true, 'FIVE grous is present in Workspace'); - $t->is( $foundGroup2, true, 'SIX grous is present in Workspace'); - $t->is( $foundGroup2, true, 'SEVEN grous is present in Workspace'); - $t->is( $foundGroup2, true, 'employees grous is present in Workspace'); - $t->is( $foundGroup2, true, 'supervisors grous is present in Workspace'); - $t->is( $foundGroup2, true, 'finance grous is present in Workspace'); - - //checking roles - $roles = ws_roleList() ; - $t->is( count ($roles->roles) >= 2 , true, 'ws_roleList works fine'); - $roleOperator = ''; - foreach ( $roles->roles as $key => $val ) { - if ( $val->name == 'PROCESSMAKER_OPERATOR' ) - $roleOperator = $val->guid; - } - $t->is( strlen( $roleOperator ) >= 30 , true, 'role PROCESSMAKER_OPERATOR exists'); - - - //crear los 3 usuarios - - verifyUserExists ( $t, 'user1' ); - verifyUserExists ( $t, 'user2' ); - verifyUserExists ( $t, 'user3' ); - verifyUserExists ( $t, 'user4' ); - verifyUserExists ( $t, 'user5' ); - verifyUserExists ( $t, 'user6' ); - verifyUserExists ( $t, 'user7' ); - - - //checking user list and verify the three users are created - $users = ws_userList() ; - - $t->is( count ($users->users) >= 1 , true, 'ws_userList works fine'); - - $foundUser1 = false; - $foundUser2 = false; - $foundUser3 = false; - $foundUser4 = false; - $foundUser5 = false; - $foundUser6 = false; - $foundUser7 = false; - - $foundGroup1 = false; - $foundGroup2 = false; - $foundGroup3 = false; - $foundGroup4 = false; - $foundGroup5 = false; - $foundGroup6 = false; - $foundGroup7 = false; - - $supervisors = false; - $employees = false; - $finance = false; - // - $users = ws_userList(); - foreach ( $users->users as $key => $valuser ) { - if ( $valuser->name == 'user1' ) {$valuser1=$valuser->guid; $foundUser1 = true;} - if ( $valuser->name == 'user2' ) {$valuser2=$valuser->guid; $foundUser2 = true;} - if ( $valuser->name == 'user3' ) {$valuser3=$valuser->guid; $foundUser3 = true;} - if ( $valuser->name == 'user4' ) {$valuser4=$valuser->guid; $foundUser4 = true;} - if ( $valuser->name == 'user5' ) {$valuser5=$valuser->guid; $foundUser5 = true;} - if ( $valuser->name == 'user6' ) {$valuser6=$valuser->guid; $foundUser6 = true;} - if ( $valuser->name == 'user7' ) {$valuser7=$valuser->guid; $foundUser7 = true;} - - } - - $groups = ws_groupList(); - foreach ( $groups->groups as $key => $valgroups ) { - - if ( $valgroups ->name == 'Group One' ){$valgroups1=$valgroups->guid; $foundGroup1 = true;} - if ( $valgroups ->name == 'Group Two' ){$valgroups2=$valgroups->guid; $foundGroup2 = true;} - if ( $valgroups ->name == 'Group Three'){$valgroups3=$valgroups->guid; $foundGroup3 = true;} - if ( $valgroups ->name == 'Group Four' ){$valgroups4=$valgroups->guid; $foundGroup4 = true;} - if ( $valgroups ->name == 'Group Five' ){$valgroups5=$valgroups->guid; $foundGroup5 = true;} - if ( $valgroups ->name == 'Group Six' ){$valgroups6=$valgroups->guid; $foundGroup6 = true;} - if ( $valgroups ->name == 'Group Seven'){$valgroups7=$valgroups->guid; $foundGroup7 = true;} - - if ( $valgroups ->name == 'supervisors'){$valgroupsSupervisors =$valgroups->guid; $supervisors = true;} - if ( $valgroups ->name == 'employees') {$valgroupsEmployees =$valgroups->guid; $employees = true;} - if ( $valgroups ->name == 'finance') {$valgroupsFinance =$valgroups->guid; $finance = true;} - } - //Test unit - $groups= ws_assignUserToGroup ( $valuser1, $valgroups1 ); - $groups= ws_assignUserToGroup ( $valuser2, $valgroups2 ); - $groups= ws_assignUserToGroup ( $valuser3, $valgroups3 ); - $groups= ws_assignUserToGroup ( $valuser4, $valgroups4 ); - $groups= ws_assignUserToGroup ( $valuser5, $valgroups5 ); - $groups= ws_assignUserToGroup ( $valuser6, $valgroups6 ); - $groups= ws_assignUserToGroup ( $valuser7, $valgroups7 ); - - - - - // Expend report - $groups= ws_assignUserToGroup ( $valuser1, $valgroupsSupervisors); - $groups= ws_assignUserToGroup ( $valuser2, $valgroupsEmployees ); - $groups= ws_assignUserToGroup ( $valuser3, $valgroupsFinance ); - - $t->is( $foundUser1, true, 'user1 is present in Group One'); - $t->is( $foundUser2, true, 'user2 is present in Group Two'); - $t->is( $foundUser3, true, 'user3 is present in Group Three'); - $t->is( $foundUser3, true, 'user4 is present in Group Four'); - $t->is( $foundUser3, true, 'user5 is present in Group Five'); - $t->is( $foundUser3, true, 'user6 is present in Group Six'); - $t->is( $foundUser3, true, 'user7 is present in Group Seven'); - - $t->is( $foundUser1, true, 'user1 is present in Group supervisors'); - $t->is( $foundUser2, true, 'user2 is present in Group employees'); - $t->is( $foundUser3, true, 'user3 is present in Group finance'); - diff --git a/workflow/engine/test/unit/ws/reportsToTest.php b/workflow/engine/test/unit/ws/reportsToTest.php deleted file mode 100644 index 4b75fa405..000000000 --- a/workflow/engine/test/unit/ws/reportsToTest.php +++ /dev/null @@ -1,260 +0,0 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - //checking the processList - - //Archivos requeridos - if ( !defined ('PATH_THIRDPARTY') ) { - require_once( $_SERVER['PWD']. '/test/bootstrap/unit.php'); - } - require_once( PATH_THIRDPARTY . '/lime/lime.php'); - require_once( PATH_THIRDPARTY.'lime/yaml.class.php'); - include_once ( "wsConfig.php" ); - include_once ( "wsClient.php" ); - - $aGroups = file_get_values ( 'groups.txt' ); - $aFirstname = file_get_values ( 'firstname.txt' ); - $aLastname = file_get_values ( 'lastname.txt' ); - $aDepartments = file_get_departments ( 'departments.txt' ); - - $iGroups = count ( $aGroups ); - $iFirstname = count ( $aFirstname ); - $iLastname = count ( $aLastname ); - $iDepartments = count ( $aDepartments ); - - global $sessionId; - global $client; - global $roleOperator; - - $t = new lime_test( 570, new lime_output_color()); - $t = new lime_test( 7 + $iGroups*2 + $iFirstname*5 + $iDepartments*2, new lime_output_color()); - $t->diag('Reports To Test' ); - - - $t->is( function_exists('ws_open') , true, 'include wsClient.php' ); - - $t->diag('WS WSDL URL ' . WS_WSDL_URL ); - $t->diag('WS_USER_ID ' . WS_USER_ID ); - $t->diag('WS_USER_PASS ' . WS_USER_PASS ); - ws_open (); - - $t->isa_ok( $client , 'SoapClient', 'class SoapClient created'); - - //checking the groupList - $groups = ws_groupList() ; - $t->is( count ($groups->groups) >= 0 , true, 'ws_groupList works fine'); - - $groupId = array(); - foreach ( $aGroups as $key => $val ) { - $groupId[] = group_exists ( $t, $groups, $val ); - } - - //checking roles - $roles = ws_roleList() ; - $t->is( count ($roles->roles) >= 2 , true, 'ws_roleList works fine'); - - $roleOperator = ''; - foreach ( $roles->roles as $key => $val ) { - if ( $val->name == 'PROCESSMAKER_OPERATOR' ) - $roleOperator = $val->guid; - } - $t->is( strlen( $roleOperator ) >= 30 , true, 'role PROCESSMAKER_OPERATOR exists'); - if ( $roleOperator == '' ) - throw ( new Exception ( "role PROCESSMAKER_OPERATOR doesn't exist" ) ); - - //checking user list - $users = ws_userList(); - $t->is( count ($users->users) >= 1 , true, 'ws_userList works fine'); - - //create users - $userId = array(); - foreach ( $aFirstname as $key => $val ) { - $lastname = $aLastname [ rand( 0, $iLastname ) ]; - $userId[] = user_exists ( $t, $users, $val, $lastname,$roleOperator ); - } - - //assign groups - for ( $i = 0; $i < count( $userId ); $i++ ) { - $userUid = $userId [ $i ]; - $groupUid = $groupId [ rand( 0, count( $groupId )-1 ) ]; - assignUserToGroup ( $t, $userUid, $groupUid); - $groupUid = $groupId [ rand( 0, count( $groupId )-1 ) ]; - assignUserToGroup ( $t, $userUid, $groupUid); - } - - //checking the departmentList - $deps = ws_departmentList() ; - $t->is( count ($deps->departments) >= 0 , true, 'ws_departmentList works fine'); - - $depId = array(); - foreach ( $aDepartments as $key => $val ) { - $depId[] = department_exists ( $t, $val[0], $val[1] ); - } - - //assign departments - for ( $i = 0; $i < count( $userId ); $i++ ) { - $usrUid = $userId [ $i ]; - $depUid = $depId [ rand( 0, count( $depId )-1 ) ]; - assignUserToDepartment ( $t, $usrUid, $depUid, true ); - } - - function assignUserToGroup ( $t, $userId, $groupId ) { - $result = ws_assignUserToGroup ( $userId, $groupId ); - if ( $result->status_code == 8 ) { - $t->pass( "User $userId already exists in the group"); - return; - } - if ( $result->status_code != 0 ) { - throw ( new Exception ( $result->message ) ); - } - $t->pass( "assigned $userId to group $groupId"); - } - - function assignUserToDepartment ( $t, $userId, $depId, $manager ) { - $result = ws_assignUserToDepartment ( $userId, $depId, $manager ); -/* if ( $result->status_code == 8 ) { - $t->pass( "User $userId already exists in the group"); - return; - } -*/ - if ( $result->status_code != 0 ) { - throw ( new Exception ( $result->message ) ); - } - $t->pass( "assigned $userId to dep $depId"); - } - - //check if the group exists, if not, create it and returns the guid - function group_exists ( $t, $groups, $groupName ) { - $groupId = ''; - foreach ( $groups->groups as $key => $val ) { - if ( $val->name == $groupName ) $groupId = $val->guid ; - } - - //creates group - if ( $groupId == '' ) { - $result = ws_createGroup ( $groupName ); - if ( $result->status_code != 0 ) { - throw ( new Exception ( $result->message ) ); - } - $groupId = $result->groupUID; - $t->pass( "Group $groupName created successfully"); - } - else - $t->pass( 'Not necessary create the group ' . $groupName ); - - $t->pass ( "$groupName group exists with UID = $groupId"); - - return $groupId; - } - - //check if the department exists, if not, create it and returns the guid - function department_exists ( $t, $depName, $depParentName ) { - $deps = ws_departmentList() ; - $depId = ''; - foreach ( $deps->departments as $key => $val ) { - if ( $val->name == $depName ) $depId = $val->guid ; - } - - $depParentId = ''; - foreach ( $deps->departments as $key => $val ) { - if ( $val->name == $depParentName ) $depParentId = $val->guid ; - } - - //creates department - if ( $depId == '' ) { - $result = ws_createDepartment ( $depName, $depParentId ); - if ( $result->status_code != 0 ) { - throw ( new Exception ( $result->message ) ); - } - $depId = $result->departmentUID; - $t->pass( "Department $depName created successfully"); - } - else - $t->pass( "Not necessary create the Department $depName" ); - - $t->pass ( "$depName department exists with UID = $depId"); - - return $depId; - } - - //check if the user exists, if not, create it and returns the guid - function user_exists ( $t, $users, $firstname, $lastname, $roleOperator ) { - $userId = ''; - $username = strtolower ($firstname); - foreach ( $users->users as $key => $val ) { - if ( strtolower($val->name) == $username ) $userId = $val->guid ; - } - //creates user - if ( $userId == '' ) { - $firstname = ucwords( $firstname ); - $lasstname = ucwords( $lasstname ); - $email = $username . '@colosa.com'; - $password = 'sample'; - $result = ws_createUser ( $username, $firstname, $lastname, $email, $roleOperator, $password ); - if ( $result->status_code != 0 ) { - throw ( new Exception ( $result->message ) ); - } - $userId = $result->userUID; - $t->pass( "User $username created successfully"); - } - else - $t->pass( 'Not necessary create the user ' . $username ); - - $t->pass ( "$username exists with UID = $userId"); - - return $userId; - } - - function file_get_values ( $fileName ) { - $fName = PATH_CORE. 'test'.PATH_SEP.'fixtures'.PATH_SEP. $fileName; - $array = array(); - if ( !file_exists($fName) ) - throw (new Exception ( "file $fName doesn't exist." ) ); - - $fp = fopen ( $fName, 'r' ); - $i = 0; - while ( !feof( $fp ) ) { - $line = trim(fgets ( $fp )); - if ( /*$i++ < 10 && */ $line != '' ) $array[] = $line; - } - return $array; - } - - function file_get_departments ( $fileName ) { - $fName = PATH_CORE. 'test'.PATH_SEP.'fixtures'.PATH_SEP. $fileName; - $array = array(); - if ( !file_exists($fName) ) - throw (new Exception ( "file $fName doesn't exist." ) ); - - $fp = fopen ( $fName, 'r' ); - $i = 0; - while ( !feof( $fp ) ) { - $line = trim(fgets ( $fp ) ); - if ( /*$i++ < 10 &&*/ $line != '' ) { - $aux = explode('|', $line ); - $array[] = array ( trim($aux[0]) , trim($aux[1]) ); - } - } - return $array; - } diff --git a/workflow/engine/test/unit/ws/wsClient.php b/workflow/engine/test/unit/ws/wsClient.php deleted file mode 100644 index 45b8f5af6..000000000 --- a/workflow/engine/test/unit/ws/wsClient.php +++ /dev/null @@ -1,665 +0,0 @@ -item) && ! is_array($array)) { - return null; - } - - $result = array (); - if (isset($array->item)) { - foreach ( $array->item as $key => $value ) { - $result[$value->key] = $value->value; - } - } else { - foreach ( $array as $key => $value ) { - $result[$value->key] = $value->value; - } - } - return $result; -} - -/** - * function convertFormToWSObjects - * @param $form - * Convert a normal POST form into the correspondent valid structure for webservice - * @return array of objects - */ -function convertFormToWSObjects($form) { - $aVariables = array(); - foreach ( $form as $key => $val ) { - if (! is_array($val)) { //Normal Variables - $obj = new stdClass(); - $obj->name = $key; - $obj->value = $val; - $aVariables[] = $obj; - } else { - foreach ( $val as $gridKey => $gridRow ) { //Sp�cial Variables like grids or checkgroups - if (is_array($gridRow)) { //Grids - foreach ( $gridRow as $col => $colValue ) { - $obj = new stdClass(); - $obj->name = $key . "][" . $gridKey . "][" . $col; - $obj->value = $colValue; - $aVariables[] = $obj; - } - } else { //Checkgroups, Radiogroups - $obj = new stdClass(); - $obj->name = $key; - $obj->value = implode("|", $val); - $aVariables[] = $obj; - } - } - } - } - - return $aVariables; -} - -//this function is not necesary for version 2 of PM webservices -function convertSoapArrayToArray($object) { - $result = array (); - $properties = get_object_vars($object); - - foreach ( $properties as $keyProperties => $valProperties ) { - $array = array (); - foreach ( $valProperties as $keyItems => $valItems ) { - $node = array (); - if (isset($valItems->item)) { - foreach ( $valItems->item as $keyNode => $valNode ) { - $node[$valNode->key] = $valNode->value; - } - } - if (is_array($valItems)) { - foreach ( $valItems as $keyNode => $valNode ) { - $node[$valNode->key] = $valNode->value; - } - } - $array[] = $node; - } - $result[$keyProperties] = $array; - } - return $result; -} - -function ws_parser($result) { - $rows = array (); - if (isset($result->derivation)) - if (is_array($result->derivation->item)) { - foreach ( $result->derivation->item as $index => $val ) { - $rows[$val->key] = $val->value; - } - } else { - $rows[$result->derivation->item->key] = $result->derivation->item->value; - } - - return $rows; -} - -function ws_open() { - global $sessionId; - global $client; - $endpoint = WS_WSDL_URL; - $sessionId = ''; - @$client = new SoapClient($endpoint); - - $user = WS_USER_ID; - $pass = WS_USER_PASS; - - $params = array ( - 'userid' => $user, - 'password' => $pass - ); - $result = $client->__SoapCall('login', array ( - $params - )); - - if ($result->status_code == 0) { - $sessionId = $result->message; - return 1; - } - throw (new Exception($result->message)); -} - -function ws_open_with_params($endpoint, $user, $pass) { - global $sessionId; - global $client; - $sessionId = ''; - @$client = new SoapClient($endpoint); - - $params = array ( - 'userid' => $user, - 'password' => $pass - ); - $result = $client->__SoapCall('login', array ( - $params - )); - - if ($result->status_code == 0) { - $sessionId = $result->message; - return 1; - } - throw (new Exception($result->message)); -} - -function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $template) { - global $sessionId; - global $client; - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'from' => 'soporte ', - 'to' => $toEmail, - 'cc' => $ccEmail, - 'bcc' => $bccEmail, - 'subject' => $sSubject, - 'template' => $template - ); - $result = $client->__SoapCall('sendMessage', array ( - $params - )); - return $result; -} - -function ws_sendMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $template) { - global $sessionId; - global $client; - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'from' => 'soporte ', - 'to' => $toEmail, - 'cc' => $ccEmail, - 'bcc' => $bccEmail, - 'subject' => $sSubject, - 'template' => $template - ); - $result = $client->__SoapCall('sendMessage', array ( - $params - )); - return $result; -} - -function ws_getVariables($caseId, $variables) { - global $sessionId; - global $client; - - $aVariables = array (); - foreach ( $variables as $key => $val ) { - $obj = new stdClass(); - $obj->name = $val; - $aVariables[] = $obj; - } - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'variables' => $aVariables - ); - $result = $client->__SoapCall('getVariables', array ( - $params - )); - return $result; -} - -function ws_newCase($proUid, $taskUid, $variables) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'processId' => $proUid, - 'taskId' => $taskUid, - 'variables' => $variables - ); - - $result = $client->__SoapCall('newCase', array ( - $params - )); - - return $result; -} - -function ws_sendVariables($caseId, $variables) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'variables' => $variables - ); - $result = $client->__SoapCall('sendVariables', array ( - $params - )); - - return $result; -} - -function ws_executeTrigger($caseId, $triggerId, $delIndex) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'triggerIndex' => $triggerId, - 'delIndex' => $delIndex - ); - $result = $client->__SoapCall('executeTrigger', array ( - $params - )); - return $result; -} - -//only for backward compatibility -function ws_derivateCase($caseId, $delId) { - global $sessionId; - global $client; - - $rows = array (); - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'delIndex' => $delId - ); - $result = $client->__SoapCall('derivateCase', array ( - $params - )); - $rows = ws_parser($result); - - $result->derivation = $rows; - //print_r($result); - return $result; -} - -function ws_routeCase($caseId, $delId) { - global $sessionId; - global $client; - - $rows = array (); - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'delIndex' => $delId - ); - $result = $client->__SoapCall('routeCase', array ( - $params - )); - return $result; -} - -function ws_processList() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('processList', array ( - $params - )); - //if ( $result->status_code == 0 ) { - return $result; - //} -//throw ( new Exception ( $result->message ) ); -} - -function ws_groupList() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('groupList', array ( - $params - )); - return $result; -} - -function ws_departmentList() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('departmentList', array ( - $params - )); - - if ( !is_array($result->departments) ) { - $res = new StdClass(); - $res->departments[0] = $result->departments; - return $res; - } - - return $result; -} - -function ws_roleList() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('roleList', array ( - $params - )); - return $result; -} - -function ws_caseList() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('caseList', array ( - $params - )); - return $result; -} - -function ws_userList() { - global $sessionId; - global $client; - - $users = array (); - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('userList', array ( - $params - )); - return $result; -} - -function ws_triggerList() { - global $sessionId; - global $client; - - $users = array (); - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('triggerList', array ( - $params - )); - return $result; -} - -function ws_getCaseInfo($caseId, $delIndex = NULL) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'delIndex' => $delIndex - ); - $result = $client->__SoapCall('getCaseInfo', array ( - $params - )); - return $result; -} - -function ws_reassignCase($caseId, $delIndex, $userIdSource, $userIdTarget) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId, - 'delIndex' => $delIndex, - 'userIdSource' => $userIdSource, - 'userIdTarget' => $userIdTarget - ); - $result = $client->__SoapCall('reassignCase', array ( - $params - )); - //if ( $result->status_code == 0 ) { - // return $result; - //} - return $result; - //throw ( new Exception ( $result->message ) ); -} - -function ws_taskCase($caseId) { - global $sessionId; - global $client; - - $params = array ( - 'caseId' => $caseId - ); - //$result = $client->__SoapCall( 'sessionId' => $sessionId, 'taskCase', array($params) ); - // $result = $client->__SoapCall( 'sessionId' => $sessionId, 'taskCase', array($params) ); - if ($result->status_code == 0) { - return $result; - } - throw (new Exception($result->message)); -} - -function ws_sendFile( - $FILENAME, - $USR_UID, - $APP_UID, - $DEL_INDEX=1, - $DOC_UID=null, - $APP_DOC_FIELDNAME=null, - $title=null, - $comment=null -) { - $DOC_UID = ($DOC_UID != null)? $DOC_UID : -1; - $APP_DOC_TYPE = ($DOC_UID == -1)? "ATTACHED" : "INPUT"; - $title = ($title != null)? $title : $FILENAME; - $comment = ($comment != null)? $comment : null; - - $params = array( - "ATTACH_FILE" => "@$FILENAME", - "APPLICATION" => $APP_UID, - "INDEX" => $DEL_INDEX, - "DOC_UID" => $DOC_UID, - "USR_UID" => $USR_UID, - "APP_DOC_TYPE" => $APP_DOC_TYPE, - "APP_DOC_FIELDNAME" => $APP_DOC_FIELDNAME, - "TITLE" => $title, - "COMMENT" => $comment - ); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, WS_UPLOAD_URL); - //curl_setopt($ch, CURLOPT_VERBOSE, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); - $response = curl_exec($ch); - curl_close($ch); - - return $response; -} - -function ws_updateFile($APP_DOC_UID, $FILENAME, $DOC_VERSION, $APP_DOC_TYPE=NULL, $USR_UID=NULL, $APP_UID=NULL, $DEL_INDEX=NULL, $DOC_UID=NULL, $title=NULL, $comment=NULL) { - - $params = array ( - 'APP_DOC_UID' => $APP_DOC_UID, - 'DOC_VERSION' => $DOC_VERSION, - 'ATTACH_FILE' => "@$FILENAME" - ); - - if( $APP_UID != NULL) - $params['APPLICATION'] = $APP_UID; - if( $DEL_INDEX != NULL) - $params['INDEX'] = $DEL_INDEX; - if( $USR_UID != NULL) - $params['USR_UID'] = $USR_UID; - if( $DOC_UID != NULL) - $params['DOC_UID'] = $DOC_UID; - if( $APP_DOC_TYPE != NULL) - $params['APP_DOC_TYPE'] = $APP_DOC_TYPE; - if( $title != NULL) - $params['TITLE'] = $title; - if( $comment != NULL) - $params['COMMENT'] = $comment; - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, WS_UPLOAD_URL); - //curl_setopt($ch, CURLOPT_VERBOSE, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - $response = curl_exec($ch); - curl_close($ch); - - return $response; -} - -//create a new user -function ws_createUser($userId, $firstname, $lastname, $email, $role, $password) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'userId' => $userId, - 'firstname' => $firstname, - 'lastname' => $lastname, - 'email' => $email, - 'role' => $role, - 'password' => $password - ); - - $result = $client->__SoapCall('createUser', array ( - $params - )); - - return $result; -} - -//create a new group -function ws_createGroup( $groupName ) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'name' => $groupName - ); - $result = $client->__SoapCall('createGroup', array ( $params )); - return $result; -} - -//create a new group -function ws_createDepartment( $depName, $depParentId ) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'name' => $depName, - 'parentUID' => $depParentId - ); - $result = $client->__SoapCall('createDepartment', array ( $params )); - return $result; -} - -//assignUserToGroup -function ws_assignUserToGroup($userId, $groupId) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'userId' => $userId, - 'groupId' => $groupId - ); - - $result = $client->__SoapCall('assignUserToGroup', array ( - $params - )); - return $result; -} - -//assignUserToGroup -function ws_assignUserToDepartment($userId, $depId, $manager ) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'userId' => $userId, - 'departmentId' => $depId, - 'manager' => $manager - ); - - $result = $client->__SoapCall('assignUserToDepartment', array ( - $params - )); - return $result; -} - -function ws_systemInformation() { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId - ); - $result = $client->__SoapCall('systemInformation', array ( - $params - )); - return $result; -} - -function ws_InputDocumentList($caseId) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId - ); - - $result = $client->__SoapCall('InputDocumentList', array ( - $params - )); - - return $result; -} - -function ws_outputDocumentList($caseId) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'caseId' => $caseId - ); - - $result = $client->__SoapCall('outputDocumentList', array ( - $params - )); - - return $result; -} - -function ws_removeDocument($appDocUid) { - global $sessionId; - global $client; - - $params = array ( - 'sessionId' => $sessionId, - 'appDocUid' => $appDocUid - ); - - $result = $client->__SoapCall('RemoveDocument', array ( - $params - )); - - return $result; -} diff --git a/workflow/engine/test/unit/ws/wsConfig.php.example b/workflow/engine/test/unit/ws/wsConfig.php.example deleted file mode 100644 index 3f1e95973..000000000 --- a/workflow/engine/test/unit/ws/wsConfig.php.example +++ /dev/null @@ -1,9 +0,0 @@ -