diff --git a/tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php b/tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php index b6a552cd5..461c1a7fa 100644 --- a/tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php +++ b/tests/php-unit-tests/unitary-tests/application/DashboardLayoutTest.php @@ -17,6 +17,8 @@ * You should have received a copy of the GNU Affero General Public License */ +namespace Combodo\iTop\Test\UnitTest\Application; + use Combodo\iTop\Test\UnitTest\ItopTestCase; /** diff --git a/tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php b/tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php index adfb86cbf..0a45834d1 100644 --- a/tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php +++ b/tests/php-unit-tests/unitary-tests/application/privUITransactionFileTest.php @@ -17,7 +17,12 @@ * You should have received a copy of the GNU Affero General Public License */ +namespace Combodo\iTop\Test\UnitTest\Application; + use Combodo\iTop\Test\UnitTest\ItopDataTestCase; +use MetaModel; +use privUITransactionFile; +use UserRights; /** * @runTestsInSeparateProcesses diff --git a/tests/php-unit-tests/unitary-tests/application/utilsTest.php b/tests/php-unit-tests/unitary-tests/application/utilsTest.php index 354146b7c..84205537b 100644 --- a/tests/php-unit-tests/unitary-tests/application/utilsTest.php +++ b/tests/php-unit-tests/unitary-tests/application/utilsTest.php @@ -19,7 +19,10 @@ * */ +namespace Combodo\iTop\Test\UnitTest\Application; + use Combodo\iTop\Test\UnitTest\ItopTestCase; +use utils; /** * @covers utils diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php deleted file mode 100644 index 1db98d9f7..000000000 --- a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_config_plus_code.php +++ /dev/null @@ -1,392 +0,0 @@ - 'iTop is temporarily frozen, please wait... (the admin team)', - - // access_mode: Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3 - // default: 3 - 'access_mode' => 3, - - // activity_panel.entry_form_opened_by_default: Whether or not the new entry form will be automatically opened when viewing an object. - // default: false - 'activity_panel.entry_form_opened_by_default' => false, - - // activity_panel.show_author_name_below_entries: Whether or not to show the author friendlyname next to the date on the last entry. - // default: false - 'activity_panel.show_author_name_below_entries' => false, - - 'allowed_login_types' => 'form|external|basic', - - // apc_cache.enabled: If set, the APC cache is allowed (the PHP extension must also be active) - // default: true - 'apc_cache.enabled' => true, - - // apc_cache.query_ttl: Time to live set in APC for the prepared queries (seconds - 0 means no timeout) - // default: 3600 - 'apc_cache.query_ttl' => 3600, - - // app_root_url: Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server's name) - // default: '' - 'app_root_url' => 'http://localhost/itop-dev/', - - // behind_reverse_proxy: If true, then proxies custom header (X-Forwarded-*) are taken into account. Use only if the webserver is not publicly accessible (reachable only by the reverse proxy) - // default: false - 'behind_reverse_proxy' => false, - - // cron_max_execution_time: Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout - // default: 600 - 'cron_max_execution_time' => 600, - - // csv_file_default_charset: Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable). - // default: 'ISO-8859-1' - 'csv_file_default_charset' => 'ISO-8859-1', - - 'csv_import_charsets' => array(), - - // csv_import_history_display: Display the history tab in the import wizard - // default: false - 'csv_import_history_display' => false, - - // date_and_time_format: Format for date and time display (per language) - // default: array ( - // 'default' => - // array ( - // 'date' => 'Y-m-d', - // 'time' => 'H:i:s', - // 'date_time' => '$date $time', - // ), - // ) - 'date_and_time_format' => array( - 'default' => - array( - 'date' => 'Y-m-d', - 'time' => 'H:i:s', - 'date_time' => '$date $time', - ), - ), - - 'db_host' => 'localhost', - - 'db_name' => 'itop_dev', - - 'db_pwd' => '', - - 'db_subname' => '', - - 'db_user' => 'root', - - // deadline_format: The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$ - // default: '$difference$' - 'deadline_format' => '$difference$', - - 'default_language' => 'EN US', - - // email_asynchronous: If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode - // default: false - 'email_asynchronous' => false, - - // email_default_sender_address: Default address provided in the email from header field. - // default: '' - 'email_default_sender_address' => '', - - // email_default_sender_label: Default label provided in the email from header field. - // default: '' - 'email_default_sender_label' => '', - - // email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol) - // default: 'PHPMail' - 'email_transport' => 'PHPMail', - - // email_validation_pattern: Regular expression to validate/detect the format of an eMail address - // default: '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}' - 'email_validation_pattern' => '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}', - - 'encryption_key' => '061c5b88c47ed64664618cf37b91a442b5550704aacecc5f58f96fc98087333b', - - 'encryption_library' => 'OpenSSL', - - 'ext_auth_variable' => '$_SERVER[\'REMOTE_USER\']', - - 'fast_reload_interval' => 60, - - // graphviz_path: Path to the Graphviz "dot" executable for graphing objects lifecycle - // default: '/usr/bin/dot' - 'graphviz_path' => 'C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe', - - // high_cardinality_classes: List of classes with high cardinality (Force manual submit of search) - // default: array ( - // ) - 'high_cardinality_classes' => array(), - - // inline_image_max_display_width: The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width. - // default: '250' - 'inline_image_max_display_width' => '250', - - // inline_image_max_storage_width: The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database. - // default: '1600' - 'inline_image_max_storage_width' => '1600', - - // link_set_attribute_qualifier: Link set from string: attribute qualifier (encloses both the attcode and the value) - // default: '\'' - 'link_set_attribute_qualifier' => '\'', - - // link_set_attribute_separator: Link set from string: attribute separator - // default: ';' - 'link_set_attribute_separator' => ';', - - // link_set_item_separator: Link set from string: line separator - // default: '|' - 'link_set_item_separator' => '|', - - // link_set_value_separator: Link set from string: value separator (between the attcode and the value itself - // default: ':' - 'link_set_value_separator' => ':', - - 'log_global' => true, - - 'log_issue' => true, - - 'log_kpi_duration' => 0, - - 'log_notification' => true, - - 'log_web_service' => true, - - 'max_display_limit' => 30, - - // max_linkset_output: Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit. - // default: 100 - 'max_linkset_output' => 100, - - // mentions.allowed_classes: Classes which can be mentioned through the autocomplete in the caselogs. Key of the array must be a single character that will trigger the autocomplete, value can be either a DM class or a valid OQL (eg. "@" => "Person", "?" => "SELECT FAQ WHERE status = 'published'") - // default: array ( - // '@' => 'SELECT Person WHERE status = \'active\'', - // ) - 'mentions.allowed_classes' => array( - '@' => 'SELECT Person WHERE status = \'active\'', - ), - - 'min_display_limit' => 20, - - // online_help: Hyperlink to the online-help web page - // default: 'http://www.combodo.com/itop-help' - 'online_help' => 'http://www.combodo.com/itop-help', - - // optimize_requests_for_join_count: Optimize request joins to minimize the count (default is true, try to set it to false in case of performance issues) - // default: true - 'optimize_requests_for_join_count' => true, - - 'password_hash_algo' => '2y', - - // php_path: Path to the php executable in CLI mode - // default: 'php' - 'php_path' => 'php', - - // search_manual_submit: Force manual submit of search all requests - // default: false - 'search_manual_submit' => false, - - 'secure_connection_required' => false, - - // session_name: The name of the cookie used to store the PHP session id - // default: 'iTop' - 'session_name' => 'iTop', - - // shortcut_actions: Actions that are available as direct buttons next to the "Actions" menu - // default: 'UI:Menu:Modify,UI:Menu:New' - 'shortcut_actions' => 'UI:Menu:Modify,UI:Menu:New', - - // source_dir: Source directory for the datamodel files. (which gets compiled to env-production). - // default: '' - 'source_dir' => 'datamodels/2.x/', - - 'standard_reload_interval' => 300, - - // synchro_trace: Synchronization details: none, display, save (includes 'display') - // default: 'none' - 'synchro_trace' => 'none', - - // tag_set_item_separator: Tag set from string: tag label separator - // default: '|' - 'tag_set_item_separator' => '|', - - // timezone: Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitly configured in PHP - // default: 'Europe/Paris' - 'timezone' => 'Europe/Paris', - - // tracking_level_linked_set_default: Default tracking level if not explicitly set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936) - // default: 1 - 'tracking_level_linked_set_default' => 0, - - // url_validation_pattern: Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes) - // default: '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?' - 'url_validation_pattern' => '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?', -); - -/** - * - * Modules specific settings - * - */ -$MyModuleSettings = array( - 'authent-cas' => array( - 'cas_debug' => false, - 'cas_host' => '', - 'cas_port' => '', - 'cas_context' => '', - 'cas_version' => '', - ), - 'authent-ldap' => array( - 'host' => 'localhost', - 'port' => 389, - 'default_user' => '', - 'default_pwd' => '', - 'base_dn' => 'dc=yourcompany,dc=com', - 'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', - 'options' => array( - 17 => 3, - 8 => 0, - ), - 'start_tls' => false, - 'debug' => false, - ), - 'itop-attachments' => array( - 'allowed_classes' => array( - 0 => 'Ticket', - ), - 'position' => 'relations', - 'preview_max_width' => 290, - 'icon_preview_max_size' => 500000, - ), - 'itop-backup' => array( - 'mysql_bindir' => '', - 'week_days' => 'monday, tuesday, wednesday, thursday, friday', - 'time' => '23:30', - 'retention_count' => 5, - 'enabled' => true, - 'itop_backup_incident' => '', - ), - 'molkobain-console-tooltips' => array( - 'decoration_class' => 'fas fa-question', - 'enabled' => true, - ), - 'itop-time-tracking' => array( - 'allowed_classes' => array( - 'UserRequest' => - array( - 'calendar-tab' => 'SELECT UserRequest WHERE status != "closed"', - 'stopwatch' => 'SELECT UserRequest WHERE status != "closed"', - 'report-tab' => 'SELECT UserRequest WHERE status IN ("resolved", "closed")', - ), - 'Incident' => - array( - 'calendar-tab' => 'SELECT Incident WHERE status != "closed"', - 'stopwatch' => 'SELECT Incident WHERE status != "closed"', - 'report-tab' => 'SELECT Incident WHERE status IN ("resolved", "closed")', - ), - 'CustomerContract' => - array( - 'calendar-page' => 'SELECT CustomerContract WHERE status = "production"', - 'report-tab' => 'SELECT CustomerContract', - ), - ), - 'colors' => array( - 'default_stopwatch' => - array( - 'text' => '#ffffff', - 'background' => '#a6a6a6', - ), - 'default_calendar' => - array( - 'text' => '#ffffff', - 'background' => '#FFCC80', - ), - 'classes' => - array( - 'UserRequest' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:blue', - ), - 'Incident' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:green', - ), - 'CustomerContract' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:grey', - ), - ), - ), - 'clone_events' => false, - 'default_event_duration' => '00:30:00', - 'day_start_time' => '06:00:00', - 'day_end_time' => '22:00:00', - 'excluded_days' => array( - 0 => 'Saturday', - 1 => 'Sunday', - ), - 'first_day' => 1, - 'business_hours' => array( - 'days_of_week' => - array( - 0 => '1', - 1 => '2', - 2 => '3', - 3 => '4', - 4 => '5', - ), - 'start' => '08:00:00', - 'end' => '18:00:00', - ), - 'minimum_event_duration_display' => '00:30:00', - 'stopwatch_clean_periodicity' => 1, - 'stopwatch_max_time' => 4, - 'delete_max_event_age' => 30, - 'default_report_query' => 'SELECT TimeSpent WHERE contact_id = :contact_id AND start_date >= :start_date AND end_date < :end_date', - 'manager_report_query' => 'SELECT TimeSpent WHERE start_date >= :start_date AND end_date < :end_date', - 'manager_report_silo' => 'SELECT Person', - 'weekly_report_time_spent_attribute' => '', - 'weekly_report_time_spent_default' => '30hrs', - 'report_charts_definition' => array( - 0 => - array( - 'group_by_attribute' => 'contact_id', - 'label' => 'TimeTracking:ReportActivityPerUser', - ), - 1 => - array( - 'group_by_attribute' => 'org_id', - 'label' => 'TimeTracking:ReportActivityPerCustomer', - ), - ), - ), -); - -/** - * - * Data model modules to be loaded. Names are specified as relative paths - * - */ -$MyModules = array( - 'addons' => array( - 'user rights' => 'addons/userrights/userrightsprofile.class.inc.php', - ), -); - - -echo 'tutu'; - -?> \ No newline at end of file diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php deleted file mode 100644 index b6664cc95..000000000 --- a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_KO_function.php +++ /dev/null @@ -1,7 +0,0 @@ - 'iTop is temporarily frozen, please wait... (the admin team)', - - // access_mode: Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3 - // default: 3 - 'access_mode' => 3, - - // activity_panel.entry_form_opened_by_default: Whether or not the new entry form will be automatically opened when viewing an object. - // default: false - 'activity_panel.entry_form_opened_by_default' => false, - - // activity_panel.show_author_name_below_entries: Whether or not to show the author friendlyname next to the date on the last entry. - // default: false - 'activity_panel.show_author_name_below_entries' => false, - - 'allowed_login_types' => 'form|external|basic', - - // apc_cache.enabled: If set, the APC cache is allowed (the PHP extension must also be active) - // default: true - 'apc_cache.enabled' => true, - - // apc_cache.query_ttl: Time to live set in APC for the prepared queries (seconds - 0 means no timeout) - // default: 3600 - 'apc_cache.query_ttl' => 3600, - - // app_root_url: Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server's name) - // default: '' - 'app_root_url' => 'http://localhost/itop-dev/', - - // behind_reverse_proxy: If true, then proxies custom header (X-Forwarded-*) are taken into account. Use only if the webserver is not publicly accessible (reachable only by the reverse proxy) - // default: false - 'behind_reverse_proxy' => false, - - // cron_max_execution_time: Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout - // default: 600 - 'cron_max_execution_time' => 600, - - // csv_file_default_charset: Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable). - // default: 'ISO-8859-1' - 'csv_file_default_charset' => 'ISO-8859-1', - - 'csv_import_charsets' => array ( - ), - - // csv_import_history_display: Display the history tab in the import wizard - // default: false - 'csv_import_history_display' => false, - - // date_and_time_format: Format for date and time display (per language) - // default: array ( - // 'default' => - // array ( - // 'date' => 'Y-m-d', - // 'time' => 'H:i:s', - // 'date_time' => '$date $time', - // ), - // ) - 'date_and_time_format' => array ( - 'default' => - array ( - 'date' => 'Y-m-d', - 'time' => 'H:i:s', - 'date_time' => '$date $time', - ), - ), - - 'db_host' => 'localhost', - - 'db_name' => 'itop_dev', - - 'db_pwd' => '', - - 'db_subname' => '', - - 'db_user' => 'root', - - // deadline_format: The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$ - // default: '$difference$' - 'deadline_format' => '$difference$', - - 'default_language' => 'EN US', - - // email_asynchronous: If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode - // default: false - 'email_asynchronous' => false, - - // email_default_sender_address: Default address provided in the email from header field. - // default: '' - 'email_default_sender_address' => '', - - // email_default_sender_label: Default label provided in the email from header field. - // default: '' - 'email_default_sender_label' => '', - - // email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol) - // default: 'PHPMail' - 'email_transport' => 'PHPMail', - - // email_validation_pattern: Regular expression to validate/detect the format of an eMail address - // default: '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}' - 'email_validation_pattern' => '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}', - - 'encryption_key' => '061c5b88c47ed64664618cf37b91a442b5550704aacecc5f58f96fc98087333b', - - 'encryption_library' => 'OpenSSL', - - 'ext_auth_variable' => '$_SERVER[\'REMOTE_USER\']', - - 'fast_reload_interval' => 60, - - // graphviz_path: Path to the Graphviz "dot" executable for graphing objects lifecycle - // default: '/usr/bin/dot' - 'graphviz_path' => 'C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe', - - // high_cardinality_classes: List of classes with high cardinality (Force manual submit of search) - // default: array ( - // ) - 'high_cardinality_classes' => array ( - ), - - // inline_image_max_display_width: The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width. - // default: '250' - 'inline_image_max_display_width' => '250', - - // inline_image_max_storage_width: The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database. - // default: '1600' - 'inline_image_max_storage_width' => '1600', - - // link_set_attribute_qualifier: Link set from string: attribute qualifier (encloses both the attcode and the value) - // default: '\'' - 'link_set_attribute_qualifier' => '\'', - - // link_set_attribute_separator: Link set from string: attribute separator - // default: ';' - 'link_set_attribute_separator' => ';', - - // link_set_item_separator: Link set from string: line separator - // default: '|' - 'link_set_item_separator' => '|', - - // link_set_value_separator: Link set from string: value separator (between the attcode and the value itself - // default: ':' - 'link_set_value_separator' => ':', - - 'log_global' => true, - - 'log_issue' => true, - - 'log_kpi_duration' => 0, - - 'log_notification' => true, - - 'log_web_service' => true, - - 'max_display_limit' => 30, - - // max_linkset_output: Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit. - // default: 100 - 'max_linkset_output' => 100, - - // mentions.allowed_classes: Classes which can be mentioned through the autocomplete in the caselogs. Key of the array must be a single character that will trigger the autocomplete, value can be either a DM class or a valid OQL (eg. "@" => "Person", "?" => "SELECT FAQ WHERE status = 'published'") - // default: array ( - // '@' => 'SELECT Person WHERE status = \'active\'', - // ) - 'mentions.allowed_classes' => array ( - '@' => 'SELECT Person WHERE status = \'active\'', - ), - - 'min_display_limit' => 20, - - // online_help: Hyperlink to the online-help web page - // default: 'http://www.combodo.com/itop-help' - 'online_help' => 'http://www.combodo.com/itop-help', - - // optimize_requests_for_join_count: Optimize request joins to minimize the count (default is true, try to set it to false in case of performance issues) - // default: true - 'optimize_requests_for_join_count' => true, - - 'password_hash_algo' => '2y', - - // php_path: Path to the php executable in CLI mode - // default: 'php' - 'php_path' => 'php', - - // search_manual_submit: Force manual submit of search all requests - // default: false - 'search_manual_submit' => false, - - 'secure_connection_required' => false, - - // session_name: The name of the cookie used to store the PHP session id - // default: 'iTop' - 'session_name' => 'iTop', - - // shortcut_actions: Actions that are available as direct buttons next to the "Actions" menu - // default: 'UI:Menu:Modify,UI:Menu:New' - 'shortcut_actions' => 'UI:Menu:Modify,UI:Menu:New', - - // source_dir: Source directory for the datamodel files. (which gets compiled to env-production). - // default: '' - 'source_dir' => 'datamodels/2.x/', - - 'standard_reload_interval' => 300, - - // synchro_trace: Synchronization details: none, display, save (includes 'display') - // default: 'none' - 'synchro_trace' => 'none', - - // tag_set_item_separator: Tag set from string: tag label separator - // default: '|' - 'tag_set_item_separator' => '|', - - // timezone: Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitly configured in PHP - // default: 'Europe/Paris' - 'timezone' => 'Europe/Paris', - - // tracking_level_linked_set_default: Default tracking level if not explicitly set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936) - // default: 1 - 'tracking_level_linked_set_default' => 0, - - // url_validation_pattern: Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes) - // default: '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?' - 'url_validation_pattern' => '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?', -); - -/** - * - * Modules specific settings - * - */ -$MyModuleSettings = array( - 'authent-cas' => array ( - 'cas_debug' => false, - 'cas_host' => '', - 'cas_port' => '', - 'cas_context' => '', - 'cas_version' => '', - ), - 'authent-ldap' => array ( - 'host' => 'localhost', - 'port' => 389, - 'default_user' => '', - 'default_pwd' => '', - 'base_dn' => 'dc=yourcompany,dc=com', - 'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', - 'options' => array ( - 17 => 3, - 8 => 0, - ), - 'start_tls' => false, - 'debug' => false, - ), - 'itop-attachments' => array ( - 'allowed_classes' => array ( - 0 => 'Ticket', - ), - 'position' => 'relations', - 'preview_max_width' => 290, - 'icon_preview_max_size' => 500000, - ), - 'itop-backup' => array ( - 'mysql_bindir' => '', - 'week_days' => 'monday, tuesday, wednesday, thursday, friday', - 'time' => '23:30', - 'retention_count' => 5, - 'enabled' => true, - 'itop_backup_incident' => '', - ), - 'molkobain-console-tooltips' => array ( - 'decoration_class' => 'fas fa-question', - 'enabled' => true, - ), - 'itop-time-tracking' => array ( - 'allowed_classes' => array ( - 'UserRequest' => - array ( - 'calendar-tab' => 'SELECT UserRequest WHERE status != "closed"', - 'stopwatch' => 'SELECT UserRequest WHERE status != "closed"', - 'report-tab' => 'SELECT UserRequest WHERE status IN ("resolved", "closed")', - ), - 'Incident' => - array ( - 'calendar-tab' => 'SELECT Incident WHERE status != "closed"', - 'stopwatch' => 'SELECT Incident WHERE status != "closed"', - 'report-tab' => 'SELECT Incident WHERE status IN ("resolved", "closed")', - ), - 'CustomerContract' => - array ( - 'calendar-page' => 'SELECT CustomerContract WHERE status = "production"', - 'report-tab' => 'SELECT CustomerContract', - ), - ), - 'colors' => array ( - 'default_stopwatch' => - array ( - 'text' => '#ffffff', - 'background' => '#a6a6a6', - ), - 'default_calendar' => - array ( - 'text' => '#ffffff', - 'background' => '#FFCC80', - ), - 'classes' => - array ( - 'UserRequest' => - array ( - 'text' => '#ffffff', - 'background' => 'shadeof:blue', - ), - 'Incident' => - array ( - 'text' => '#ffffff', - 'background' => 'shadeof:green', - ), - 'CustomerContract' => - array ( - 'text' => '#ffffff', - 'background' => 'shadeof:grey', - ), - ), - ), - 'clone_events' => false, - 'default_event_duration' => '00:30:00', - 'day_start_time' => '06:00:00', - 'day_end_time' => '22:00:00', - 'excluded_days' => array ( - 0 => 'Saturday', - 1 => 'Sunday', - ), - 'first_day' => 1, - 'business_hours' => array ( - 'days_of_week' => - array ( - 0 => '1', - 1 => '2', - 2 => '3', - 3 => '4', - 4 => '5', - ), - 'start' => '08:00:00', - 'end' => '18:00:00', - ), - 'minimum_event_duration_display' => '00:30:00', - 'stopwatch_clean_periodicity' => 1, - 'stopwatch_max_time' => 4, - 'delete_max_event_age' => 30, - 'default_report_query' => 'SELECT TimeSpent WHERE contact_id = :contact_id AND start_date >= :start_date AND end_date < :end_date', - 'manager_report_query' => 'SELECT TimeSpent WHERE start_date >= :start_date AND end_date < :end_date', - 'manager_report_silo' => 'SELECT Person', - 'weekly_report_time_spent_attribute' => '', - 'weekly_report_time_spent_default' => '30hrs', - 'report_charts_definition' => array ( - 0 => - array ( - 'group_by_attribute' => 'contact_id', - 'label' => 'TimeTracking:ReportActivityPerUser', - ), - 1 => - array ( - 'group_by_attribute' => 'org_id', - 'label' => 'TimeTracking:ReportActivityPerCustomer', - ), - ), - ), -); - -/** - * - * Data model modules to be loaded. Names are specified as relative paths - * - */ -$MyModules = array( - 'addons' => array ( - 'user rights' => 'addons/userrights/userrightsprofile.class.inc.php', - ), -); -?> \ No newline at end of file diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php deleted file mode 100644 index 1d59e53c1..000000000 --- a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/config-itop_VALID_log-level-min_const.php +++ /dev/null @@ -1,394 +0,0 @@ - 'iTop is temporarily frozen, please wait... (the admin team)', - - // access_mode: Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3 - // default: 3 - 'access_mode' => 3, - - // activity_panel.entry_form_opened_by_default: Whether or not the new entry form will be automatically opened when viewing an object. - // default: false - 'activity_panel.entry_form_opened_by_default' => false, - - // activity_panel.show_author_name_below_entries: Whether or not to show the author friendlyname next to the date on the last entry. - // default: false - 'activity_panel.show_author_name_below_entries' => false, - - 'allowed_login_types' => 'form|external|basic', - - // apc_cache.enabled: If set, the APC cache is allowed (the PHP extension must also be active) - // default: true - 'apc_cache.enabled' => true, - - // apc_cache.query_ttl: Time to live set in APC for the prepared queries (seconds - 0 means no timeout) - // default: 3600 - 'apc_cache.query_ttl' => 3600, - - // app_root_url: Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server's name) - // default: '' - 'app_root_url' => 'http://localhost/itop-dev/', - - // behind_reverse_proxy: If true, then proxies custom header (X-Forwarded-*) are taken into account. Use only if the webserver is not publicly accessible (reachable only by the reverse proxy) - // default: false - 'behind_reverse_proxy' => false, - - // cron_max_execution_time: Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout - // default: 600 - 'cron_max_execution_time' => 600, - - // csv_file_default_charset: Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable). - // default: 'ISO-8859-1' - 'csv_file_default_charset' => 'ISO-8859-1', - - 'csv_import_charsets' => array(), - - // csv_import_history_display: Display the history tab in the import wizard - // default: false - 'csv_import_history_display' => false, - - // date_and_time_format: Format for date and time display (per language) - // default: array ( - // 'default' => - // array ( - // 'date' => 'Y-m-d', - // 'time' => 'H:i:s', - // 'date_time' => '$date $time', - // ), - // ) - 'date_and_time_format' => array( - 'default' => - array( - 'date' => 'Y-m-d', - 'time' => 'H:i:s', - 'date_time' => '$date $time', - ), - ), - - 'db_host' => 'localhost', - - 'db_name' => 'itop_dev', - - 'db_pwd' => '', - - 'db_subname' => '', - - 'db_user' => 'root', - - // deadline_format: The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$ - // default: '$difference$' - 'deadline_format' => '$difference$', - - 'default_language' => 'EN US', - - // email_asynchronous: If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode - // default: false - 'email_asynchronous' => false, - - // email_default_sender_address: Default address provided in the email from header field. - // default: '' - 'email_default_sender_address' => '', - - // email_default_sender_label: Default label provided in the email from header field. - // default: '' - 'email_default_sender_label' => '', - - // email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol) - // default: 'PHPMail' - 'email_transport' => 'PHPMail', - - // email_validation_pattern: Regular expression to validate/detect the format of an eMail address - // default: '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}' - 'email_validation_pattern' => '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}', - - 'encryption_key' => '061c5b88c47ed64664618cf37b91a442b5550704aacecc5f58f96fc98087333b', - - 'encryption_library' => 'OpenSSL', - - 'ext_auth_variable' => '$_SERVER[\'REMOTE_USER\']', - - 'fast_reload_interval' => 60, - - // graphviz_path: Path to the Graphviz "dot" executable for graphing objects lifecycle - // default: '/usr/bin/dot' - 'graphviz_path' => 'C:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe', - - // high_cardinality_classes: List of classes with high cardinality (Force manual submit of search) - // default: array ( - // ) - 'high_cardinality_classes' => array(), - - // inline_image_max_display_width: The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width. - // default: '250' - 'inline_image_max_display_width' => '250', - - // inline_image_max_storage_width: The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database. - // default: '1600' - 'inline_image_max_storage_width' => '1600', - - // link_set_attribute_qualifier: Link set from string: attribute qualifier (encloses both the attcode and the value) - // default: '\'' - 'link_set_attribute_qualifier' => '\'', - - // link_set_attribute_separator: Link set from string: attribute separator - // default: ';' - 'link_set_attribute_separator' => ';', - - // link_set_item_separator: Link set from string: line separator - // default: '|' - 'link_set_item_separator' => '|', - - // link_set_value_separator: Link set from string: value separator (between the attcode and the value itself - // default: ':' - 'link_set_value_separator' => ':', - - 'log_global' => true, - - 'log_issue' => true, - - 'log_kpi_duration' => 0, - - 'log_level_min' => array( - '' => LogAPI::LEVEL_WARNING, - 'InlineImage' => LogAPI::LEVEL_TRACE, - 'UserRequest' => LogAPI::LEVEL_TRACE, - ), - - 'log_notification' => true, - - 'log_web_service' => true, - - 'max_display_limit' => 30, - - // max_linkset_output: Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit. - // default: 100 - 'max_linkset_output' => 100, - - // mentions.allowed_classes: Classes which can be mentioned through the autocomplete in the caselogs. Key of the array must be a single character that will trigger the autocomplete, value can be either a DM class or a valid OQL (eg. "@" => "Person", "?" => "SELECT FAQ WHERE status = 'published'") - // default: array ( - // '@' => 'SELECT Person WHERE status = \'active\'', - // ) - 'mentions.allowed_classes' => array( - '@' => 'SELECT Person WHERE status = \'active\'', - ), - - 'min_display_limit' => 20, - - // online_help: Hyperlink to the online-help web page - // default: 'http://www.combodo.com/itop-help' - 'online_help' => 'http://www.combodo.com/itop-help', - - // optimize_requests_for_join_count: Optimize request joins to minimize the count (default is true, try to set it to false in case of performance issues) - // default: true - 'optimize_requests_for_join_count' => true, - - 'password_hash_algo' => '2y', - - // php_path: Path to the php executable in CLI mode - // default: 'php' - 'php_path' => 'php', - - // search_manual_submit: Force manual submit of search all requests - // default: false - 'search_manual_submit' => false, - - 'secure_connection_required' => false, - - // session_name: The name of the cookie used to store the PHP session id - // default: 'iTop' - 'session_name' => 'iTop', - - // shortcut_actions: Actions that are available as direct buttons next to the "Actions" menu - // default: 'UI:Menu:Modify,UI:Menu:New' - 'shortcut_actions' => 'UI:Menu:Modify,UI:Menu:New', - - // source_dir: Source directory for the datamodel files. (which gets compiled to env-production). - // default: '' - 'source_dir' => 'datamodels/2.x/', - - 'standard_reload_interval' => 300, - - // synchro_trace: Synchronization details: none, display, save (includes 'display') - // default: 'none' - 'synchro_trace' => 'none', - - // tag_set_item_separator: Tag set from string: tag label separator - // default: '|' - 'tag_set_item_separator' => '|', - - // timezone: Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitly configured in PHP - // default: 'Europe/Paris' - 'timezone' => 'Europe/Paris', - - // tracking_level_linked_set_default: Default tracking level if not explicitly set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936) - // default: 1 - 'tracking_level_linked_set_default' => 0, - - // url_validation_pattern: Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes) - // default: '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?' - 'url_validation_pattern' => '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?', -); - -/** - * - * Modules specific settings - * - */ -$MyModuleSettings = array( - 'authent-cas' => array( - 'cas_debug' => false, - 'cas_host' => '', - 'cas_port' => '', - 'cas_context' => '', - 'cas_version' => '', - ), - 'authent-ldap' => array( - 'host' => 'localhost', - 'port' => 389, - 'default_user' => '', - 'default_pwd' => '', - 'base_dn' => 'dc=yourcompany,dc=com', - 'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', - 'options' => array( - 17 => 3, - 8 => 0, - ), - 'start_tls' => false, - 'debug' => false, - ), - 'itop-attachments' => array( - 'allowed_classes' => array( - 0 => 'Ticket', - ), - 'position' => 'relations', - 'preview_max_width' => 290, - 'icon_preview_max_size' => 500000, - ), - 'itop-backup' => array( - 'mysql_bindir' => '', - 'week_days' => 'monday, tuesday, wednesday, thursday, friday', - 'time' => '23:30', - 'retention_count' => 5, - 'enabled' => true, - 'itop_backup_incident' => '', - ), - 'molkobain-console-tooltips' => array( - 'decoration_class' => 'fas fa-question', - 'enabled' => true, - ), - 'itop-time-tracking' => array( - 'allowed_classes' => array( - 'UserRequest' => - array( - 'calendar-tab' => 'SELECT UserRequest WHERE status != "closed"', - 'stopwatch' => 'SELECT UserRequest WHERE status != "closed"', - 'report-tab' => 'SELECT UserRequest WHERE status IN ("resolved", "closed")', - ), - 'Incident' => - array( - 'calendar-tab' => 'SELECT Incident WHERE status != "closed"', - 'stopwatch' => 'SELECT Incident WHERE status != "closed"', - 'report-tab' => 'SELECT Incident WHERE status IN ("resolved", "closed")', - ), - 'CustomerContract' => - array( - 'calendar-page' => 'SELECT CustomerContract WHERE status = "production"', - 'report-tab' => 'SELECT CustomerContract', - ), - ), - 'colors' => array( - 'default_stopwatch' => - array( - 'text' => '#ffffff', - 'background' => '#a6a6a6', - ), - 'default_calendar' => - array( - 'text' => '#ffffff', - 'background' => '#FFCC80', - ), - 'classes' => - array( - 'UserRequest' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:blue', - ), - 'Incident' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:green', - ), - 'CustomerContract' => - array( - 'text' => '#ffffff', - 'background' => 'shadeof:grey', - ), - ), - ), - 'clone_events' => false, - 'default_event_duration' => '00:30:00', - 'day_start_time' => '06:00:00', - 'day_end_time' => '22:00:00', - 'excluded_days' => array( - 0 => 'Saturday', - 1 => 'Sunday', - ), - 'first_day' => 1, - 'business_hours' => array( - 'days_of_week' => - array( - 0 => '1', - 1 => '2', - 2 => '3', - 3 => '4', - 4 => '5', - ), - 'start' => '08:00:00', - 'end' => '18:00:00', - ), - 'minimum_event_duration_display' => '00:30:00', - 'stopwatch_clean_periodicity' => 1, - 'stopwatch_max_time' => 4, - 'delete_max_event_age' => 30, - 'default_report_query' => 'SELECT TimeSpent WHERE contact_id = :contact_id AND start_date >= :start_date AND end_date < :end_date', - 'manager_report_query' => 'SELECT TimeSpent WHERE start_date >= :start_date AND end_date < :end_date', - 'manager_report_silo' => 'SELECT Person', - 'weekly_report_time_spent_attribute' => '', - 'weekly_report_time_spent_default' => '30hrs', - 'report_charts_definition' => array( - 0 => - array( - 'group_by_attribute' => 'contact_id', - 'label' => 'TimeTracking:ReportActivityPerUser', - ), - 1 => - array( - 'group_by_attribute' => 'org_id', - 'label' => 'TimeTracking:ReportActivityPerCustomer', - ), - ), - ), -); - -/** - * - * Data model modules to be loaded. Names are specified as relative paths - * - */ -$MyModules = array( - 'addons' => array( - 'user rights' => 'addons/userrights/userrightsprofile.class.inc.php', - ), -); -?> \ No newline at end of file diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php deleted file mode 100644 index 5c64b2ea2..000000000 --- a/tests/php-unit-tests/unitary-tests/core/ConfigValidator/iTopConfigAstValidatorTest.php +++ /dev/null @@ -1,69 +0,0 @@ -RequireOnceItopFile('env-production/itop-config/src/Validator/iTopConfigAstValidator.php'); - $this->RequireOnceItopFile('env-production/itop-config/src/Validator/ConfigNodesVisitor.php'); - } - - public function testValidateFileValid() - { - try { - $this->CallValidatorOnFile('config-itop_VALID.php'); - } - catch (Exception $e) { - $this->fail('An exception was thrown by the validation method on a valid file: '.$e->getMessage()); - } - - $this->assertTrue(true, 'The file is valid and interpreted as such'); - } - - public function testValidateFileValidLogLevelMinConst() - { - $this->markTestSkipped(' disabled test, is failing for now with error "Invalid configuration: LEVEL_WARNING of type Identifier is forbidden in line 152"'); - try { - $this->CallValidatorOnFile('config-itop_VALID_log-level-min_const.php'); - } - catch (Exception $e) { - $this->fail('An exception was thrown by the validation method on a valid file: '.$e->getMessage()); - } - - $this->assertTrue(true, 'The file is valid and interpreted as such'); - } - - public function testValidateFileWithCode() - { - $this->expectExceptionMessage('type Stmt_Function is forbidden'); - $this->CallValidatorOnFile('config-itop_KO_function.php'); - } - - public function testValidateFileValidWithCodeAtTheEnd() - { - $this->expectExceptionMessage('Stmt_Echo is forbidden'); - $this->CallValidatorOnFile('config-itop_KO_config_plus_code.php'); - } - - /** - * @throws \Exception - */ - private function CallValidatorOnFile(string $sConfigFilePath) - { - $sContents = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.$sConfigFilePath); - - $oiTopConfigValidator = new iTopConfigAstValidator(); - $oiTopConfigValidator->Validate($sContents); - } -} \ No newline at end of file diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php index e49ae24e6..36afd75f0 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/authent-local/UserLocalTest.php @@ -5,7 +5,7 @@ * Time: 09:14 */ -namespace coreExtensions; +namespace Combodo\iTop\Test\UnitTest\Module\AuthentLocal; use Combodo\iTop\Test\UnitTest\ItopDataTestCase; diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigPlaceholdersResolverTest.php similarity index 99% rename from tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigPlaceholdersResolverTest.php index b4e51ea06..e8c17c1cb 100644 --- a/tests/php-unit-tests/unitary-tests/core/ConfigPlaceholdersResolverTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigPlaceholdersResolverTest.php @@ -19,7 +19,7 @@ * */ -namespace Combodo\iTop\Test\UnitTest\Core; +namespace Combodo\iTop\Test\UnitTest\Module\iTopConfig; use Combodo\iTop\Test\UnitTest\ItopTestCase; use ConfigPlaceholdersResolver; diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest.php similarity index 98% rename from tests/php-unit-tests/unitary-tests/core/ConfigTest.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest.php index 8ab3febc2..60c72ea48 100644 --- a/tests/php-unit-tests/unitary-tests/core/ConfigTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest.php @@ -19,7 +19,7 @@ * */ -namespace Combodo\iTop\Test\UnitTest\Core; +namespace Combodo\iTop\Test\UnitTest\Module\iTopConfig; use Combodo\iTop\Test\UnitTest\ItopTestCase; use Config; diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest/config-itop-joker.php similarity index 100% rename from tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-joker.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest/config-itop-joker.php diff --git a/tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest/config-itop-var.php similarity index 100% rename from tests/php-unit-tests/unitary-tests/core/ConfigTest/config-itop-var.php rename to tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/ConfigTest/config-itop-var.php diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php index c94292bee..1d14f1ccc 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigAstValidatorTest.php @@ -5,7 +5,7 @@ * Time: 12:31 */ -namespace Combodo\iTop\Config\Test\Validator; +namespace Combodo\iTop\Test\UnitTest\Module\iTopConfig\Validator; use Combodo\iTop\Config\Validator\iTopConfigAstValidator; use Combodo\iTop\Test\UnitTest\ItopTestCase; @@ -43,7 +43,6 @@ class iTopConfigAstValidatorTest extends ItopTestCase } } - public function InvalidDataProvider() { return array( diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php index fc361a503..b15bcb391 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-config/Validator/iTopConfigSyntaxValidatorTest.php @@ -5,7 +5,7 @@ * Time: 12:31 */ -namespace Combodo\iTop\Config\Test\Validator; +namespace Combodo\iTop\Test\UnitTest\Module\iTopConfig\Validator; use Combodo\iTop\Config\Validator\iTopConfigAstValidator; use Combodo\iTop\Config\Validator\iTopConfigSyntaxValidator; diff --git a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php index 486f1eb55..9af54c08d 100644 --- a/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php +++ b/tests/php-unit-tests/unitary-tests/datamodels/2.x/itop-tickets/itopTicketTest.php @@ -24,7 +24,7 @@ * Time: 13:34 */ -namespace Combodo\iTop\Test\UnitTest\iTopTickets; +namespace Combodo\iTop\Test\UnitTest\Module\iTopTickets; use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use Exception; diff --git a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php index 390082d16..9506b5a59 100644 --- a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php @@ -1,6 +1,6 @@