Есть ли у вас опыт написания модульных / функциональных тестов для ProcessMaker.
Я сделал исследование и:
Может ли кто-нибудь помочь?
Вам не нужно беспокоиться о модульных тестах в ядре, если вы хотите запустить модульные тесты только на своем плагине.
Это требует phpunit. Тогда вам просто нужно 2 основных файла.
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"backupStaticAttributes="false"codecoverage="true"colors="true"convertErrorsToExceptions="true"convertNoticesToExceptions="true"convertWarningsToExceptions="true"processIsolation="false"stopOnFailure="false"syntaxCheck="true"bootstrap="./tests/bootstrap.php">
<testsuites>
<testsuite name="My Test Suite">
<directory>./tests/MyTestFolder/</directory>
</testsuite>
</testsuites>
<php>
<const name="ROOT_FOLDER" value="processmaker" />
<const name="PLUGIN_NAME" value="MyPluginName" />
<const name="SYS_SYS" value="workflow" />
<const name="SYS_SKIN" value="neoclassic" />
<const name="SYS_LANG" value="en" />
</php>
<logging>
<log type="coverage-html" target="tests/reports/coverage" lowUpperBound="80" highLowerBound="90"/>
<log type="coverage-clover" target="tests/reports/coverage.xml"/>
<log type="coverage-php" target="tests/reports/coverage.serialized"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
<log type="junit" target="tests/reports/junit.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>
А затем bootstrap.php, на который ссылается
<?php
if ( !defined('PATH_SEP') ) {
define("PATH_SEP", (substr(PHP_OS, 0, 3) == "WIN")? "\\" : "/");
}
//Important: Make sure that you change the realpath to reflect your environment
//Configure PATH_TRUNK to the base directory that contains the "workflow/engine/plugins" directory
define('PATH_TRUNK', realpath(__DIR__ . '/../../../../..') . PATH_SEP);
define('PATH_HOME', PATH_TRUNK . 'workflow' . PATH_SEP);
require_once (PATH_TRUNK . "framework/src/Maveriks/Util/ClassLoader.php");
require_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php');
require_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
require_once (PATH_CORE . 'classes' . PATH_SEP . 'class.system.php');
require_once ( "propel/Propel.php" );
require_once ( "creole/Creole.php" );
require_once(PATH_DB . SYS_SYS . PATH_SEP . "db.php");
//***************** PM Paths DATA **************************
define('PATH_DATA_SITE', PATH_DATA . 'sites/' . SYS_SYS . '/');
define('PATH_DOCUMENT', PATH_DATA_SITE . 'files/');
define('PATH_DATA_MAILTEMPLATES', PATH_DATA_SITE . 'mailTemplates/');
define('PATH_DATA_PUBLIC', PATH_DATA_SITE . 'public/');
define('PATH_DATA_REPORTS', PATH_DATA_SITE . 'reports/');
define('PATH_DYNAFORM', PATH_DATA_SITE . 'xmlForms/');
define('PATH_IMAGES_ENVIRONMENT_FILES', PATH_DATA_SITE . 'usersFiles' . PATH_SEP);
define('PATH_IMAGES_ENVIRONMENT_USERS', PATH_DATA_SITE . 'usersPhotographies' . PATH_SEP);
G::LoadClass ( 'system' );
$config = System::getSystemConfiguration();
$error_level = E_ALL & ~E_STRICT;
ini_set('display_errors', $error_level);
ini_set('error_reporting', $error_level);
ini_set('short_open_tag', 'On');
ini_set('default_charset', "UTF-8");
ini_set('memory_limit', $config['memory_limit']);
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
ini_set('date.timezone', $config['time_zone']);
define ('DEBUG_SQL_LOG', $config['debug_sql']);
define ('DEBUG_TIME_LOG', $config['debug_time']);
define ('DEBUG_CALENDAR_LOG', $config['debug_calendar']);
define ('MEMCACHED_ENABLED', $config['memcached']);
define ('MEMCACHED_SERVER', $config['memcached_server']);
define ('TIME_ZONE', $config['time_zone']);
$classLoader = \Maveriks\Util\ClassLoader::getInstance();
$classLoader->add(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP, "Maveriks");
$classLoader->add(PATH_CORE . "src" . PATH_SEP, "ProcessMaker");
$classLoader->add(PATH_CORE . "src" . PATH_SEP);
//Add vendors to autoloader
$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "luracast" . PATH_SEP . "restler" . PATH_SEP . "vendor", "Luracast");
$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "bshaffer" . PATH_SEP . "oauth2-server-php" . PATH_SEP . "src" . PATH_SEP, "OAuth2");
$classLoader->addClass("Bootstrap", PATH_TRUNK . "gulliver" . PATH_SEP . "system" . PATH_SEP . "class.bootstrap.php");
//$classLoader->addModelClassPath(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP);
//Load classes
G::LoadThirdParty('pear/json','class.json');
G::LoadThirdParty('smarty/libs','Smarty.class');
G::LoadSystem('error');
G::LoadSystem('dbconnection');
G::LoadSystem('dbsession');
G::LoadSystem('dbrecordset');
G::LoadSystem('dbtable');
G::LoadSystem('rbac' );
G::LoadSystem('publisher');
G::LoadSystem('templatePower');
G::LoadSystem('xmlDocument');
G::LoadSystem('xmlform');
G::LoadSystem('xmlformExtension');
G::LoadSystem('form');
G::LoadSystem('menu');
G::LoadSystem("xmlMenu");
G::LoadSystem('dvEditor');
G::LoadSystem('table');
G::LoadSystem('pagedTable');
//require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
//define( 'PATH_GULLIVER_HOME', PATH_TRUNK . 'gulliver' . PATH_SEP );
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
//DATABASE propel classes used in 'Cases' Options
Bootstrap::registerClass('Entity_Base', PATH_HOME . "engine/classes/entities/Base.php");
Bootstrap::registerClass('BaseContent', PATH_HOME . "engine/classes/model/om/BaseContent.php");
Bootstrap::registerClass('Content', PATH_HOME . "engine/classes/model/Content.php");
Bootstrap::registerClass('BaseContentPeer', PATH_HOME . "engine/classes/model/om/BaseContentPeer.php");
Bootstrap::registerClass('ContentPeer', PATH_HOME . "engine/classes/model/ContentPeer.php");
Bootstrap::registerClass('BaseApplication', PATH_HOME . "engine/classes/model/om/BaseApplication.php");
Bootstrap::registerClass('ApplicationPeer', PATH_HOME . "engine/classes/model/ApplicationPeer.php");
Bootstrap::registerClass('Application', PATH_HOME . "engine/classes/model/Application.php");
Bootstrap::registerClass('BaseAppDelegation', PATH_HOME . "engine/classes/model/om/BaseAppDelegation.php");
Bootstrap::registerClass('BaseHoliday', PATH_HOME . "engine/classes/model/om/BaseHoliday.php");
Bootstrap::registerClass('BaseHolidayPeer', PATH_HOME . "engine/classes/model/om/BaseHolidayPeer.php");
Bootstrap::registerClass('BaseTask', PATH_HOME . "engine/classes/model/om/BaseTask.php");
Bootstrap::registerClass('BaseTaskPeer', PATH_HOME . "engine/classes/model/om/BaseTaskPeer.php");
Bootstrap::registerClass('HolidayPeer', PATH_HOME . "engine/classes/model/HolidayPeer.php");
Bootstrap::registerClass('Holiday', PATH_HOME . "engine/classes/model/Holiday.php");
Bootstrap::registerClass('Task', PATH_HOME . "engine/classes/model/Task.php");
Bootstrap::registerClass('TaskPeer', PATH_HOME . "engine/classes/model/TaskPeer.php");
Bootstrap::registerClass('dates', PATH_HOME . "engine/classes/class.dates.php");
Bootstrap::registerClass('calendar', PATH_HOME . "engine/classes/class.calendar.php");
Bootstrap::registerClass('AppDelegation', PATH_HOME . "engine/classes/model/AppDelegation.php");
Bootstrap::registerClass('BaseAppDelegationPeer',PATH_HOME . "engine/classes/model/om/BaseAppDelegationPeer.php");
Bootstrap::registerClass('AppDelegationPeer', PATH_HOME . "engine/classes/model/AppDelegationPeer.php");
Bootstrap::registerClass('BaseAppDelay', PATH_HOME . "engine/classes/model/om/BaseAppDelay.php");
Bootstrap::registerClass('AppDelayPeer', PATH_HOME . "engine/classes/model/AppDelayPeer.php");
Bootstrap::registerClass('AppDelay', PATH_HOME . "engine/classes/model/AppDelay.php");
Bootstrap::registerClass('BaseAdditionalTables',PATH_HOME . "engine/classes/model/om/BaseAdditionalTables.php");
Bootstrap::registerClass('AdditionalTables', PATH_HOME . "engine/classes/model/AdditionalTables.php");
Bootstrap::registerClass('BaseAppCacheView', PATH_HOME . "engine/classes/model/om/BaseAppCacheView.php");
Bootstrap::registerClass('AppCacheView', PATH_HOME . "engine/classes/model/AppCacheView.php");
Bootstrap::registerClass('BaseAppCacheViewPeer',PATH_HOME . "engine/classes/model/om/BaseAppCacheViewPeer.php");
Bootstrap::registerClass('AppCacheViewPeer', PATH_HOME . "engine/classes/model/AppCacheViewPeer.php");
/*----------------------------------********---------------------------------*/
Bootstrap::registerClass('BaseAppTimeoutActionExecuted', PATH_HOME . "engine/classes/model/om/BaseAppTimeoutActionExecuted.php");
Bootstrap::registerClass('AppTimeoutActionExecuted', PATH_HOME . "engine/classes/model/AppTimeoutActionExecuted.php");
Bootstrap::registerClass('BaseAppTimeoutActionExecutedPeer',PATH_HOME . "engine/classes/model/om/BaseAppTimeoutActionExecutedPeer.php");
Bootstrap::registerClass('AppTimeoutActionExecutedPeer', PATH_HOME . "engine/classes/model/AppTimeoutActionExecutedPeer.php");
/*----------------------------------********---------------------------------*/
Bootstrap::registerClass('BaseInputDocument', PATH_HOME . "engine/classes/model/om/BaseInputDocument.php");
Bootstrap::registerClass('InputDocument', PATH_HOME . "engine/classes/model/InputDocument.php");
Bootstrap::registerClass('BaseAppDocument', PATH_HOME . "engine/classes/model/om/BaseAppDocument.php");
Bootstrap::registerClass('AppDocument', PATH_HOME . "engine/classes/model/AppDocument.php");
Bootstrap::registerClass('AppDocumentPeer', PATH_HOME . "engine/classes/model/AppDocumentPeer.php");
Bootstrap::registerClass('BaseAppEvent', PATH_HOME . "engine/classes/model/om/BaseAppEvent.php");
Bootstrap::registerClass('AppEvent', PATH_HOME . "engine/classes/model/AppEvent.php");
Bootstrap::registerClass('AppEventPeer', PATH_HOME . "engine/classes/model/AppEventPeer.php");
Bootstrap::registerClass('BaseAppHistory', PATH_HOME . "engine/classes/model/om/BaseAppHistory.php");
Bootstrap::registerClass('AppHistory', PATH_HOME . "engine/classes/model/AppHistory.php");
Bootstrap::registerClass('AppHistoryPeer', PATH_HOME . "engine/classes/model/AppHistoryPeer.php");
Bootstrap::registerClass('BaseAppFolder', PATH_HOME . "engine/classes/model/om/BaseAppFolder.php");
Bootstrap::registerClass('AppFolder', PATH_HOME . "engine/classes/model/AppFolder.php");
Bootstrap::registerClass('AppFolderPeer', PATH_HOME . "engine/classes/model/AppFolderPeer.php");
Bootstrap::registerClass('BaseAppMessage', PATH_HOME . "engine/classes/model/om/BaseAppMessage.php");
Bootstrap::registerClass('AppMessage', PATH_HOME . "engine/classes/model/AppMessage.php");
Bootstrap::registerClass('BaseAppMessagePeer', PATH_HOME . "engine/classes/model/om/BaseAppMessagePeer.php");
Bootstrap::registerClass('AppMessagePeer', PATH_HOME . "engine/classes/model/AppMessagePeer.php");
Bootstrap::registerClass('BaseAppNotesPeer', PATH_HOME . "engine/classes/model/om/BaseAppNotesPeer.php");
Bootstrap::registerClass('AppNotesPeer', PATH_HOME . "engine/classes/model/AppNotesPeer.php");
Bootstrap::registerClass('BaseAppNotes', PATH_HOME . "engine/classes/model/om/BaseAppNotes.php");
Bootstrap::registerClass('AppNotes', PATH_HOME . "engine/classes/model/AppNotes.php");
Bootstrap::registerClass('BaseAppOwner', PATH_HOME . "engine/classes/model/om/BaseAppOwner.php");
Bootstrap::registerClass('AppOwner', PATH_HOME . "engine/classes/model/AppOwner.php");
Bootstrap::registerClass('AppOwnerPeer', PATH_HOME . "engine/classes/model/AppOwnerPeer.php");
Bootstrap::registerClass('BaseAppSolrQueue', PATH_HOME . "engine/classes/model/om/BaseAppSolrQueue.php");
Bootstrap::registerClass('Entity_AppSolrQueue', PATH_HOME . "engine/classes/entities/AppSolrQueue.php");
Bootstrap::registerClass('AppSolrQueue', PATH_HOME . "engine/classes/model/AppSolrQueue.php");
Bootstrap::registerClass('AppSolrQueuePeer', PATH_HOME . "engine/classes/model/AppSolrQueuePeer.php");
Bootstrap::registerClass('BaseAppThread', PATH_HOME . "engine/classes/model/om/BaseAppThread.php");
Bootstrap::registerClass('AppThread', PATH_HOME . "engine/classes/model/AppThread.php");
Bootstrap::registerClass('AppThreadPeer', PATH_HOME . "engine/classes/model/AppThreadPeer.php");
Bootstrap::registerClass('BaseCaseScheduler', PATH_HOME . "engine/classes/model/om/BaseCaseScheduler.php");
Bootstrap::registerClass('CaseScheduler', PATH_HOME . "engine/classes/model/CaseScheduler.php");
Bootstrap::registerClass('BaseCaseSchedulerPeer',PATH_HOME . "engine/classes/model/om/BaseCaseSchedulerPeer.php");
Bootstrap::registerClass('CaseSchedulerPeer', PATH_HOME . "engine/classes/model/CaseSchedulerPeer.php");
Bootstrap::registerClass('BaseCaseTracker', PATH_HOME . "engine/classes/model/om/BaseCaseTracker.php");
Bootstrap::registerClass('CaseTracker', PATH_HOME . "engine/classes/model/CaseTracker.php");
Bootstrap::registerClass('BaseCaseTrackerPeer', PATH_HOME . "engine/classes/model/om/BaseCaseTrackerPeer.php");
Bootstrap::registerClass('CaseTrackerPeer', PATH_HOME . "engine/classes/model/CaseTrackerPeer.php");
Bootstrap::registerClass('BaseCaseTrackerObject',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObject.php");
Bootstrap::registerClass('CaseTrackerObject', PATH_HOME . "engine/classes/model/CaseTrackerObject.php");
Bootstrap::registerClass('BaseCaseTrackerObjectPeer',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObjectPeer.php");
Bootstrap::registerClass('CaseTrackerObjectPeer', PATH_HOME . "engine/classes/model/CaseTrackerObjectPeer.php");
Bootstrap::registerClass('BaseDbSource', PATH_HOME . "engine/classes/model/om/BaseDbSource.php");
Bootstrap::registerClass('DbSource', PATH_HOME . "engine/classes/model/DbSource.php");
Bootstrap::registerClass('XMLDB', PATH_HOME . "engine/classes/class.xmlDb.php");
Bootstrap::registerClass('dynaFormHandler', PATH_GULLIVER . "class.dynaformhandler.php");
Bootstrap::registerClass('DynaFormField', PATH_HOME . "engine/classes/class.dynaFormField.php");
Bootstrap::registerClass('BaseDynaform', PATH_HOME . "engine/classes/model/om/BaseDynaform.php");
Bootstrap::registerClass('Dynaform', PATH_HOME . "engine/classes/model/Dynaform.php");
Bootstrap::registerClass('DynaformPeer', PATH_HOME . "engine/classes/model/DynaformPeer.php");
Bootstrap::registerClass('BaseEvent', PATH_HOME . "engine/classes/model/om/BaseEvent.php");
Bootstrap::registerClass('Event', PATH_HOME . "engine/classes/model/Event.php");
Bootstrap::registerClass('BaseEventPeer', PATH_HOME . "engine/classes/model/om/BaseEventPeer.php");
Bootstrap::registerClass('EventPeer', PATH_HOME . "engine/classes/model/EventPeer.php");
Bootstrap::registerClass('BaseFields', PATH_HOME . "engine/classes/model/om/BaseFields.php");
Bootstrap::registerClass('Fields', PATH_HOME . "engine/classes/model/Fields.php");
Bootstrap::registerClass('BaseGateway', PATH_HOME . "engine/classes/model/om/BaseGateway.php");
Bootstrap::registerClass('Gateway', PATH_HOME . "engine/classes/model/Gateway.php");
Bootstrap::registerClass('BaseGroupUser', PATH_HOME . "engine/classes/model/om/BaseGroupUser.php");
Bootstrap::registerClass('Groupwf', PATH_HOME . "engine/classes/model/Groupwf.php");
Bootstrap::registerClass('GroupUser', PATH_HOME . "engine/classes/model/GroupUser.php");
Bootstrap::registerClass('BaseGroupUserPeer', PATH_HOME . "engine/classes/model/om/BaseGroupUserPeer.php");
Bootstrap::registerClass('GroupUserPeer', PATH_HOME . "engine/classes/model/GroupUserPeer.php");
Bootstrap::registerClass('BaseGroupwfPeer', PATH_HOME . "engine/classes/model/om/BaseGroupwfPeer.php");
Bootstrap::registerClass('GroupwfPeer', PATH_HOME . "engine/classes/model/GroupwfPeer.php");
Bootstrap::registerClass('BaseInputDocumentPeer',PATH_HOME . 'engine/classes/model/om/BaseInputDocumentPeer.php');
Bootstrap::registerClass('InputDocumentPeer', PATH_HOME . 'engine/classes/model/InputDocumentPeer.php');
Bootstrap::registerClass('BaseIsoCountry', PATH_HOME . "engine/classes/model/om/BaseIsoCountry.php");
Bootstrap::registerClass('IsoCountry', PATH_HOME . "engine/classes/model/IsoCountry.php");
Bootstrap::registerClass('BaseTranslation', PATH_HOME . "engine/classes/model/om/BaseTranslation.php");
Bootstrap::registerClass('Translation', PATH_HOME . "engine/classes/model/Translation.php");
Bootstrap::registerClass('BaseLanguage', PATH_HOME . "engine/classes/model/om/BaseLanguage.php");
Bootstrap::registerClass('BaseLanguagePeer', PATH_HOME . "engine/classes/model/om/BaseLanguagePeer.php");
Bootstrap::registerClass('Language', PATH_HOME . "engine/classes/model/Language.php");
Bootstrap::registerClass('BaseLogCasesScheduler',PATH_HOME . "engine/classes/model/om/BaseLogCasesScheduler.php");
Bootstrap::registerClass('LogCasesScheduler', PATH_HOME . "engine/classes/model/LogCasesScheduler.php");
Bootstrap::registerClass('BaseObjectPermission',PATH_HOME . "engine/classes/model/om/BaseObjectPermission.php");
Bootstrap::registerClass('ObjectPermission', PATH_HOME . "engine/classes/model/ObjectPermission.php");
Bootstrap::registerClass('ObjectPermissionPeer',PATH_HOME . "engine/classes/model/ObjectPermissionPeer.php");
Bootstrap::registerClass('BaseOutputDocument', PATH_HOME . "engine/classes/model/om/BaseOutputDocument.php");
Bootstrap::registerClass('OutputDocument', PATH_HOME . "engine/classes/model/OutputDocument.php");
Bootstrap::registerClass('OutputDocumentPeer', PATH_HOME . "engine/classes/model/OutputDocumentPeer.php");
Bootstrap::registerClass('BaseProcess', PATH_HOME . "engine/classes/model/om/BaseProcess.php");
Bootstrap::registerClass('BaseProcessCategory', PATH_HOME . "engine/classes/model/om/BaseProcessCategory.php");
Bootstrap::registerClass('ProcessCategory', PATH_HOME . "engine/classes/model/ProcessCategory.php");
Bootstrap::registerClass('ProcessCategoryPeer', PATH_HOME . "engine/classes/model/ProcessCategoryPeer.php");
Bootstrap::registerClass('ProcessPeer', PATH_HOME . "engine/classes/model/ProcessPeer.php");
Bootstrap::registerClass('Process', PATH_HOME . "engine/classes/model/Process.php");
Bootstrap::registerClass('BaseProcessUser', PATH_HOME . "engine/classes/model/om/BaseProcessUser.php");
Bootstrap::registerClass('ProcessUser', PATH_HOME . "engine/classes/model/ProcessUser.php");
Bootstrap::registerClass('BaseProcessUserPeer', PATH_HOME . "engine/classes/model/om/BaseProcessUserPeer.php");
Bootstrap::registerClass('ProcessUserPeer', PATH_HOME . "engine/classes/model/ProcessUserPeer.php");
Bootstrap::registerClass('BaseReportTable', PATH_HOME . "engine/classes/model/om/BaseReportTable.php");
Bootstrap::registerClass('ReportTable', PATH_HOME . "engine/classes/model/ReportTable.php");
Bootstrap::registerClass('ReportTablePeer', PATH_HOME . "engine/classes/model/ReportTablePeer.php");
Bootstrap::registerClass('BaseReportVar', PATH_HOME . "engine/classes/model/om/BaseReportVar.php");
Bootstrap::registerClass('ReportVar', PATH_HOME . "engine/classes/model/ReportVar.php");
Bootstrap::registerClass('BaseReportVarPeer', PATH_HOME . "engine/classes/model/om/BaseReportVarPeer.php");
Bootstrap::registerClass('ReportVarPeer', PATH_HOME . "engine/classes/model/ReportVarPeer.php");
Bootstrap::registerClass('BaseRoute', PATH_HOME . "engine/classes/model/om/BaseRoute.php");
Bootstrap::registerClass('Route', PATH_HOME . "engine/classes/model/Route.php");
Bootstrap::registerClass('RoutePeer', PATH_HOME . "engine/classes/model/RoutePeer.php");
Bootstrap::registerClass('BaseStep', PATH_HOME . "engine/classes/model/om/BaseStep.php");
Bootstrap::registerClass('Step', PATH_HOME . "engine/classes/model/Step.php");
Bootstrap::registerClass('StepPeer', PATH_HOME . "engine/classes/model/StepPeer.php");
Bootstrap::registerClass('BaseStepSupervisor', PATH_HOME . "engine/classes/model/om/BaseStepSupervisor.php");
Bootstrap::registerClass('StepSupervisor', PATH_HOME . "engine/classes/model/StepSupervisor.php");
Bootstrap::registerClass('BaseStepSupervisorPeer',PATH_HOME . "engine/classes/model/om/BaseStepSupervisorPeer.php");
Bootstrap::registerClass('StepSupervisorPeer', PATH_HOME . "engine/classes/model/StepSupervisorPeer.php");
Bootstrap::registerClass('BaseStepTrigger', PATH_HOME . "engine/classes/model/om/BaseStepTrigger.php");
Bootstrap::registerClass('StepTrigger', PATH_HOME . "engine/classes/model/StepTrigger.php");
Bootstrap::registerClass('StepTriggerPeer', PATH_HOME . "engine/classes/model/StepTriggerPeer.php");
Bootstrap::registerClass('SolrRequestData', PATH_HOME . "engine/classes/entities/SolrRequestData.php");
Bootstrap::registerClass('SolrUpdateDocument', PATH_HOME . "engine/classes/entities/SolrUpdateDocument.php");
Bootstrap::registerClass('BaseSwimlanesElements',PATH_HOME . "engine/classes/model/om/BaseSwimlanesElements.php");
Bootstrap::registerClass('SwimlanesElements', PATH_HOME . "engine/classes/model/SwimlanesElements.php");
Bootstrap::registerClass('BaseSwimlanesElementsPeer',PATH_HOME ."engine/classes/model/om/BaseSwimlanesElementsPeer.php");
Bootstrap::registerClass('SwimlanesElementsPeer',PATH_HOME . "engine/classes/model/SwimlanesElementsPeer.php");
Bootstrap::registerClass('BaseSubApplication', PATH_HOME . "engine/classes/model/om/BaseSubApplication.php");
Bootstrap::registerClass('SubApplication', PATH_HOME . "engine/classes/model/SubApplication.php");
Bootstrap::registerClass('SubApplicationPeer', PATH_HOME . "engine/classes/model/SubApplicationPeer.php");
Bootstrap::registerClass('BaseSubProcess', PATH_HOME . "engine/classes/model/om/BaseSubProcess.php");
Bootstrap::registerClass('SubProcess', PATH_HOME . "engine/classes/model/SubProcess.php");
Bootstrap::registerClass('BaseSubProcessPeer', PATH_HOME . "engine/classes/model/om/BaseSubProcessPeer.php");
Bootstrap::registerClass('SubProcessPeer', PATH_HOME . "engine/classes/model/SubProcessPeer.php");
Bootstrap::registerClass('BaseTask', PATH_HOME . "engine/classes/model/om/BaseTask.php");
Bootstrap::registerClass('Task', PATH_HOME . "engine/classes/model/Task.php");
Bootstrap::registerClass('BaseTaskUser', PATH_HOME . "engine/classes/model/om/BaseTaskUser.php");
Bootstrap::registerClass('TaskUserPeer', PATH_HOME . "engine/classes/model/TaskUserPeer.php");
Bootstrap::registerClass('TaskUser', PATH_HOME . "engine/classes/model/TaskUser.php");
Bootstrap::registerClass('BaseTriggers', PATH_HOME . "engine/classes/model/om/BaseTriggers.php");
Bootstrap::registerClass('Triggers', PATH_HOME . "engine/classes/model/Triggers.php");
Bootstrap::registerClass('BaseTriggersPeer', PATH_HOME . "engine/classes/model/om/BaseTriggersPeer.php");
Bootstrap::registerClass('TriggersPeer', PATH_HOME . "engine/classes/model/TriggersPeer.php");
Bootstrap::registerClass('BaseUsers', PATH_HOME . "engine/classes/model/om/BaseUsers.php");
Bootstrap::registerClass('IsoCountry', PATH_HOME . "engine/classes/model/IsoCountry.php");
Bootstrap::registerClass('BaseIsoSubdivision', PATH_HOME . "engine/classes/model/om/BaseIsoSubdivision.php");
Bootstrap::registerClass('IsoSubdivision', PATH_HOME . "engine/classes/model/IsoSubdivision.php");
Bootstrap::registerClass('BaseIsoLocation', PATH_HOME . "engine/classes/model/om/BaseIsoLocation.php");
Bootstrap::registerClass('IsoLocation', PATH_HOME . "engine/classes/model/IsoLocation.php");
Bootstrap::registerClass('Users', PATH_HOME . "engine/classes/model/Users.php");
Bootstrap::registerClass('UsersPeer', PATH_HOME . "engine/classes/model/UsersPeer.php");
Bootstrap::registerClass('Xml_Node', PATH_GULLIVER . "class.xmlDocument.php");
Bootstrap::registerClass('wsResponse', PATH_HOME . "engine/classes/class.wsResponse.php");
Bootstrap::registerClass("PMLicensedFeatures", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.licensedFeatures.php");
Bootstrap::registerClass("AddonsManagerPeer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "AddonsManagerPeer.php");
/*----------------------------------********---------------------------------*/
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
/*----------------------------------********---------------------------------*/
$arrayClass = array("Configuration", "EmailServer", "ListInbox", "ListParticipatedHistory");
foreach ($arrayClass as $value) {
Bootstrap::registerClass("Base" . $value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . ".php");
Bootstrap::registerClass($value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . $value . ".php");
Bootstrap::registerClass("Base" . $value . "Peer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . "Peer.php");
Bootstrap::registerClass($value . "Peer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . $value . "Peer.php");
}
G::LoadClass("serverConfiguration");
G::LoadClass("dates"); //Load Criteria
//DB
$dsn = DB_ADAPTER . "://" . DB_USER . ":" . DB_PASS . "@" . DB_HOST . "/" . DB_NAME . '?encoding=utf8';
$dsnRbac = DB_ADAPTER . "://" . DB_RBAC_USER . ":" . DB_RBAC_PASS . "@" . DB_RBAC_HOST . "/" . DB_RBAC_NAME . '?encoding=utf8';
$dsnRp = DB_ADAPTER . "://" . DB_REPORT_USER . ":" . DB_REPORT_PASS . "@" . DB_REPORT_HOST . "/" . DB_REPORT_NAME;
$propelConfig['datasources']['workflow']['connection'] = $dsn;
$propelConfig['datasources']['workflow']['adapter'] = DB_ADAPTER;
$propelConfig['datasources']['rbac']['connection'] = $dsnRbac;
$propelConfig['datasources']['rbac']['adapter'] = DB_ADAPTER;
$propelConfig['datasources']['rp']['connection'] = $dsnRp;
$propelConfig['datasources']['rp']['adapter'] = DB_ADAPTER;
//$propelConfig['datasources']['dbarray']['connection'] = 'dbarray://user:pass@localhost/pm_os';
//$propelConfig['datasources']['dbarray']['adapter'] = 'dbarray';
Propel::initConfiguration($propelConfig);
// enable rbac
Bootstrap::LoadSystem('rbac');
$RBAC = &RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->sSystem = 'PROCESSMAKER';
spl_autoload_register(
function($class) {
static $classes = null;
if ($classes === null) {
$classes = array(
'MyNameSpace\ClassName' => 'classes/class.MyPluginName.php',
);
}
$cn = strtolower($class);
if (isset($classes[$cn])) {
if( ! class_exists($cn, false) && ! interface_exists($cn, false) )
//echo PATH_PLUGINS . PLUGIN_NAME . PATH_SEP . $classes[$cn];
require PATH_PLUGINS . PLUGIN_NAME . PATH_SEP . $classes[$cn];
}
}
);
Других решений пока нет …