cypht-org / cypht

Cypht: Lightweight Open Source webmail aggregator [PHP, JS]
http://cypht.org
GNU Lesser General Public License v2.1
949 stars 146 forks source link

Upgrade PHPUnit from 9 to 10 #1044

Closed Shadow243 closed 4 weeks ago

Shadow243 commented 1 month ago

Related Task: https://avan.tech/item106800

marclaporte commented 1 month ago

Please continue working on this, but wait a bit before merging in.

I'd like https://hub.docker.com/r/cypht/cypht to be operational ASAP.

Shadow243 commented 1 month ago

Please continue working on this, but wait a bit before merging in.

I'd like https://hub.docker.com/r/cypht/cypht to be operational ASAP.

This one is ready to be reviewed.

Shadow243 commented 1 month ago

I'm separating tests to prevent the non-execution of some, like here:

 php vendor/bin/phpunit --bootstrap vendor/autoload.php --configuration tests/phpunit/phpunit.xml --testdox --filter=Hm_Test_Modules_Output
PHPUnit 10.5.20 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.28
Configuration: /Users/shadow243/software/www/TIKI/cypht/tests/phpunit/phpunit.xml

No tests executed!
Shadow243 commented 1 month ago

I'm separating tests to prevent the non-execution of some, like here:

 php vendor/bin/phpunit --bootstrap vendor/autoload.php --configuration tests/phpunit/phpunit.xml --testdox --filter=Hm_Test_Modules_Output
PHPUnit 10.5.20 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.28
Configuration: /Users/shadow243/software/www/TIKI/cypht/tests/phpunit/phpunit.xml

No tests executed!

Done.

josaphatim commented 1 month ago

@Shadow243 Look at the picture below. This is the output I'm getting. Can you just fix The configuration file did not pass validation! warning and make sure user unittestuser already exists pass correctly please ? Thanks.

Screenshot 2024-06-03 at 02 59 40

Shadow243 commented 1 month ago

You still have phpunit 9.x you should have 10.5.x instead. Just look at the first line on the same picture.

josaphatim commented 1 month ago

You are right! But I'm still getting almost same thing. Instead I realize that there are now 296 tests instead of 379 and 710 assertions instead of 852.

Screenshot 2024-06-03 at 05 04 21

Shadow243 commented 1 month ago

assertions Please compare with this list and not the number of tests and assertions.

Screenshot 2024-06-03 at 07 33 25

As you can see the same config file is showing 379 with phpunit9 and 296 with phpunit10.

Shadow243 commented 1 month ago

Rename phpunit/modules/core/modules.php to make other tests availlable

Other tests renamed: https://github.com/cypht-org/cypht/pull/1044/commits/5825aa13de45b8b47219739d6b77e48da3f24edc

josaphatim commented 1 month ago

@kroky now looks good to me. Can you check please ?