Project

General

Profile

Actions

action #109810

closed

coordination #109569: [epic][qe-core] Unify PHP Testing

[qe-core] PHP tests unification

Added by pherranz about 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Refactor/Code Improvements
Target version:
Start date:
2022-04-11
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Problem description

Right now, all the PHP tests are set in the main_common.pm module, for the functional versions and in mau-webserver.pm for the maintenance ones. Also, there are dedicated modules duplicated depending on the distro version (php7_mysql.pm and php8_mysql.pm) for example.

Proposed solution

The idea is to extract all the PHP tests to a brand new created testsuite called php_tests for example, and make them completely generic to avoid code duplication. This way, instead of having two diferent modules with the same code and having the schedule to decide which of them execute, we will have a single file (php_mysql for example) and inside it the version of PHP to use will be decided. Something like this is already being done in the module php_pcre.pm:

if (is_leap('<15.0') || is_sle('<15')) {
    $php = 'php5';
}
elsif (is_leap("<15.4") || is_sle("<15-SP4")) {
    $php = 'php7';
}
else {
    $php = 'php8';
}

Further improvement

As it's intended to make more intense tests due to the inclusion of Laravel, much more modules can be added to this testsuite in order to check for all the framework requirements.

Actions

Also available in: Atom PDF