User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This pull request (PR) fixes unit tests for the "getPluralSuffixes" function of JText currently failing when executed locally (at least on Linux).
No idea why they don't fail in drone CI.
The failure is caused by file "tests/unit/suites/libraries/joomla/language/data/language/en-GB/en-GB.localise.php" having not been adapted with PR #28763 .
In addition, this PR adds a missing test case for the "more than 1" case.
composer install
../libraries/vendor/phpunit/phpunit/phpunit ./tests/unit/suites/libraries/joomla/language/JLanguageTest.php
git clean -d -x -f
git checkout .
richard@vmubu01:~/lamp/public_html/joomla-cms$ ./libraries/vendor/phpunit/phpunit/phpunit ./tests/unit/suites/libraries/joomla/language/JLanguageTest.php
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.
Warning: The Xdebug extension is not loaded
No code coverage will be generated.
......F.....................................
Time: 113 ms, Memory: 10.00MB
There was 1 failure:
1) JLanguageTest::testGetPluralSuffixes
Line: 286
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 0 => 'ONE'
- 1 => '1'
+ 0 => '1'
)
/home/richard/lamp/public_html/joomla-cms/tests/unit/suites/libraries/joomla/language/JLanguageTest.php:286
FAILURES!
Tests: 44, Assertions: 119, Failures: 1.
richard@vmubu01:~/lamp/public_html/joomla-cms$ ./libraries/vendor/phpunit/phpunit/phpunit ./tests/unit/suites/libraries/joomla/language/JLanguageTest.php
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.
Warning: The Xdebug extension is not loaded
No code coverage will be generated.
............................................
Time: 118 ms, Memory: 8.00MB
OK (44 tests, 120 assertions)
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests |
Title |
|
Title |
|
I have tested this item
Patch works.
For people testing on Windows, make sure PHP is added to your system path variables.
Then use: php ./libraries/vendor/phpunit/phpunit/phpunit ./tests/unit/suites/libraries/joomla/language/JLanguageTest.php
@ricardo1709 please test
I have tested this item
The patch works.
I have tested it on WSL
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-04 23:38:28 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
?
?
|
Merging as this just affects tests
from code review looks good,
but unfortunately cannot run local unittest, do not have php 5 installed, and it somehow not work with 8