Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "functional" test spelling #14367

Merged
merged 6 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/test_tests-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ for CONFIG in {"--use-default","--dsn=memcached://memcached","--dsn=redis://redi
--fail-if-skipped-methods \
--no-code-coverage \
--max-children-number 1 \
-d tests/functionnal \
-d tests/functional \
-t cache
done
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e -u -x -o pipefail

ATOUM_ADDITIONNAL_OPTIONS=""
if [[ "$CODE_COVERAGE" = true ]]; then
export COVERAGE_DIR="coverage-functionnal"
export COVERAGE_DIR="coverage-functional"
else
ATOUM_ADDITIONNAL_OPTIONS="--no-code-coverage";
fi
Expand All @@ -18,6 +18,6 @@ vendor/bin/atoum \
--fail-if-skipped-methods \
$ATOUM_ADDITIONNAL_OPTIONS \
--max-children-number 1 \
-d tests/functionnal
-d tests/functional

unset COVERAGE_DIR
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ jobs:
if: env.skip != 'true'
run: |
docker-compose exec -T app .github/actions/test_tests-units.sh
- name: "Functionnal tests"
- name: "Functional tests"
if: env.skip != 'true'
run: |
docker-compose exec -T app .github/actions/test_tests-functionnal.sh
docker-compose exec -T app .github/actions/test_tests-functional.sh
- name: "Cache tests"
if: env.skip != 'true'
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
- name: "Unit tests"
run: |
docker-compose exec -T app .github/actions/test_tests-units.sh
- name: "Functionnal tests"
- name: "Functional tests"
run: |
docker-compose exec -T app .github/actions/test_tests-functionnal.sh
docker-compose exec -T app .github/actions/test_tests-functional.sh
- name: "LDAP tests"
run: |
.github/actions/init_initialize-ldap-fixtures.sh
Expand All @@ -79,7 +79,7 @@ jobs:
- name: "Codecov"
uses: "codecov/codecov-action@v3.1.1"
with:
files: ./tests/coverage-unit/clover.xml,./tests/coverage-functionnal/clover.xml,./tests/coverage-ldap/clover.xml,./tests/coverage-imap/clover.xml
files: ./tests/coverage-unit/clover.xml,./tests/coverage-functional/clover.xml,./tests/coverage-ldap/clover.xml,./tests/coverage-imap/clover.xml
override_branch: ${{ matrix.branch }}
- name: "Cleanup containers"
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ module.exports = {
"indentation": 4,
"max-line-length": null,

// DISABLED pure naming rules, no functionnal impact
// DISABLED pure naming rules, no functional impact
"scss/at-function-pattern": null, // DISABLE Expected function name to be kebab-case
"scss/dollar-variable-pattern": null, // DISABLE: Expected variable to be kebab-case
"selector-class-pattern": null, // DISABLE: Expected class selector to be kebab-case
"selector-id-pattern": null, // DISABLE: Expected id selector to be kebab-case

// DISABLED pure coding style rules, no functionnal impact
// DISABLED pure coding style rules, no functional impact
"color-function-notation": null, // DISABLE: Expected modern color-function notation
"declaration-block-no-redundant-longhand-properties": null, // DISABLE Expected shorthand property "flex-flow"
"selector-not-notation": "simple", //DISABLE Expected complex :not() pseudo-class notation
"scss/at-rule-conditional-no-parentheses": null,
"scss/no-global-function-names": null, // scssphp do not support usage of SASS modules

// ALTERED/DISABLED code quality rules, may have a functionnal impact, override should be removed
// ALTERED/DISABLED code quality rules, may have a functional impact, override should be removed
"font-family-no-missing-generic-family-keyword": [
true,
{
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
},
"scripts": {
"testdb": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/database",
"testfunc": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/functionnal/",
"testfunc": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/functional/",
"testunits": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage -d tests/units",
"testweb": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/web",
"testldap": "atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/LDAP",
Expand Down
2 changes: 1 addition & 1 deletion src/DropdownTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ public static function canBeTranslated(CommonGLPI $item)


/**
* Is dropdown item translation functionnality active
* Is dropdown item translation functionality active
*
* @return true if active, false if not
**/
Expand Down
2 changes: 1 addition & 1 deletion src/KnowbaseItemTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public static function getTranslatedValue(KnowbaseItem $item, $field = "name")


/**
* Is kb item translation functionnality active
* Is kb item translation functionality active
*
* @return true if active, false if not
**/
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/HookManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected function registerFile(string $hook, string $file): void
}

/**
* Add a functionnal hook
* Add a functional hook
*
* @param string $hook
* @param string $file
Expand All @@ -111,7 +111,7 @@ public function registerFunctionalHook(
): void {
global $PLUGIN_HOOKS;

// Check if the given hook is a valid functionnal hook
// Check if the given hook is a valid functional hook
$allowed_file_hooks = Hooks::getFunctionalHooks();
if (!in_array($hook, $allowed_file_hooks)) {
trigger_error("Invalid functional hook: '$hook'", E_USER_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static function getFileHooks(): array
}

/**
* Get functionnals hooks
* Get functionals hooks
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ReminderTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static function getTranslatedValue(Reminder $item, $field = "name")


/**
* Is kb item translation functionnality active
* Is reminder translation functionality active
*
* @return boolean
**/
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Running the test suite on developpement env

There are multiple directories for tests:
- `tests/units` for unit tests;
- `tests/functionnal` for functionnal tests;
- `tests/functional` for functional tests;
- `tests/imap` for Mail collector tests;
- `tests/LDAP` for LDAP connection tests;
- `tests/web` for API tests.
Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
include_once __DIR__ . '/APIBaseClass.php';
include_once __DIR__ . '/FrontBaseClass.php';
include_once __DIR__ . '/InventoryTestCase.php';
include_once __DIR__ . '/functionnal/CommonITILRecurrent.php';
include_once __DIR__ . '/functionnal/Glpi/ContentTemplates/Parameters/AbstractParameters.php';
include_once __DIR__ . '/functional/CommonITILRecurrent.php';
include_once __DIR__ . '/functional/Glpi/ContentTemplates/Parameters/AbstractParameters.php';
include_once __DIR__ . '/units/AbstractRightsDropdown.php';

// check folder exists instead of class_exists('\GuzzleHttp\Client'), to prevent global includes
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function testDoNotComputeTakeintoaccount()
$this->integer($ITILFollowUp->add([
'date' => $_SESSION['glpi_currenttime'],
'users_id' => \Session::getLoginUserID(),
'content' => "Functionnal test",
'content' => "Functional test",
'items_id' => $ticketID,
'itemtype' => \Ticket::class,
]));
Expand All @@ -262,7 +262,7 @@ public function testDoNotComputeTakeintoaccount()
$this->integer($ITILFollowUp->add([
'date' => $_SESSION['glpi_currenttime'],
'users_id' => \Session::getLoginUserID(),
'content' => "Functionnal test",
'content' => "Functional test",
'_do_not_compute_takeintoaccount' => true,
'items_id' => $ticketID,
'itemtype' => \Ticket::class,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected function getSenderProvider(): Generator
}

/**
* Functionnals tests for the getSender method
* Functionals tests for the getSender method
*
* @dataprovider getSenderProvider
*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,7 @@ protected function testMyselfSearchCriteriaProvider(): array
}

/**
* Functionnal test for the 'myself' search criteria.
* Functional test for the 'myself' search criteria.
* We use the output type "Search::NAMES_OUTPUT" during the test as it make
* it easy to parse the results.
*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4414,7 +4414,7 @@ protected function testUpdateLoad1NTableDataProvider(): \Generator
}

/**
* Functionnal tests for update1NTableData and load1NTableData
* Functional tests for update1NTableData and load1NTableData
*
* @dataProvider testUpdateLoad1NTableDataProvider
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TESTS_SUITES=(
"install"
"update"
"units"
"functionnal"
"functional"
"cache"
"ldap"
"imap"
Expand Down Expand Up @@ -139,7 +139,7 @@ Available tests suites:
- install
- update
- units
- functionnal
- functional
- cache
- ldap
- imap
Expand Down Expand Up @@ -239,8 +239,8 @@ do
docker-compose exec -T app .github/actions/test_tests-units.sh \
|| LAST_EXIT_CODE=$?
;;
"functionnal")
docker-compose exec -T app .github/actions/test_tests-functionnal.sh \
"functional")
docker-compose exec -T app .github/actions/test_tests-functional.sh \
|| LAST_EXIT_CODE=$?
;;
"cache")
Expand Down
2 changes: 1 addition & 1 deletion tools/dup_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#

units_dir=./tests/units
func_dir=./tests/functionnal
func_dir=./tests/functional

find "$units_dir" -type f -name "*.php" | while read i;do
filename="$(basename "${i}")"
Expand Down