View Issue Details

IDProjectCategoryView StatusLast Update
0033098mantisbttoolspublic2024-04-09 06:36
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.27.0Fixed in Version2.27.0 
Summary0033098: Ugrade to PHPUnit 9.6 and adapt test suite
Description

We currently use PHPUnit 8.5, which supports PHP 7.2 and later so we can continue using it for now, but is is no longer maintained since February 3, 2023.

Our minimum PHP version is now 7.4 (see 0032808), so we should upgrade PHPUnit to 9.6.

There are some breaking changes that need to be reviewed to determine whether our test scripts need to be adapted..
https://phpunit.de/announcements/phpunit-9.html

TagsNo tags attached.

Relationships

related to 0032810 closeddregad Ugrade to PHPUnit 8.5 and adapt test suite 
parent of 0032808 resolveddregad Increase minimum PHP requirement to 7.4 

Activities

dregad

dregad

2023-11-04 07:19

developer   ~0068290

Tests seem to run fine, with some warnings

PHPUnit 9.6.13 by Sebastian Bergmann and contributors.

...............................................................  63 / 379 ( 16%)
..........WW................................................... 126 / 379 ( 33%)
..............................................W.W.............. 189 / 379 ( 49%)
.........................W..................................... 252 / 379 ( 66%)
...W.WWWWWWWW........W......................................... 315 / 379 ( 83%)
............................................................... 378 / 379 ( 99%)
.                                                               379 / 379 (100%)

Time: 00:34.843, Memory: 56.00 MB

There were 15 warnings:

1) MantisHelperTest::testArrayTransposeInvalid with data set "Simple array" (array(1, 2))
Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.

2) MantisHelperTest::testArrayTransposeInvalid with data set "Mixed, "non-square" array" (array(array(1, 2), 123))
Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.

3) AttachmentTest::testIssueAttachmentNotFound
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

4) AttachmentTest::testProjectAttachmentNotFound
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

5) FilterTest::testFilterGetIssuesReturnsIssueMonitors
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() instead.

6) LoginTest::testLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

7) LoginTest::testGetIssueGetLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

8) LoginTest::testProjectGetUsersLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

9) LoginTest::testGetEnumStatusLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

10) LoginTest::testProjectGetIssuesLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

11) LoginTest::testFilterGetIssuesLoginFailed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

12) LoginTest::testLoginWithNullPasswordIsRejected
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

13) LoginTest::testLoginWithEmptyPasswordIsRejected
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

14) LoginTest::testLoginWithIncorrectPasswordIsRejected
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

15) RelationshipTest::testDeleteRelation
assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectNotHasProperty() instead.

WARNINGS!
Tests: 379, Assertions: 1623, Warnings: 15.

dregad

dregad

2023-11-04 07:22

developer   ~0068291

PR (work-in-progress) https://github.com/mantisbt/mantisbt/pull/1936

dregad

dregad

2024-02-26 02:22

developer   ~0068606

Bump to 9.6.17 - PR https://github.com/mantisbt/mantisbt/pull/1973

dregad

dregad

2024-03-24 05:05

developer   ~0068694

Bump to 9.6.18 - PR https://github.com/mantisbt/mantisbt/pull/1980

Related Changesets

MantisBT: master 658e3a64

2024-02-22 05:22

dregad


Details Diff
Upgrade to PHPUnit 9.6

- Update minimum version in composer.json
- Minor adjustments to the test suite, fixing deprecation warnings.

Fixes 0033098, PR https://github.com/mantisbt/mantisbt/pull/1936
Affected Issues
0033098
mod - composer.json Diff File
mod - composer.lock Diff File
mod - core/helper_api.php Diff File
mod - tests/Mantis/ConfigParserTest.php Diff File
mod - tests/Mantis/HelperTest.php Diff File
mv - tests/Mantis/EnumTest.php → tests/Mantis/MantisEnumTest.php Diff File
mod - tests/Mantis/PluginTest.php Diff File
mod - tests/Mantis/PrepareTest.php Diff File
mod - tests/Mantis/StringTest.php Diff File
mv - tests/Mantis/UserTest.php → tests/Mantis/UserApiTest.php Diff File
mod - tests/rest/RestImpersonateUserTest.php Diff File
mod - tests/rest/RestUserTest.php Diff File
mod - tests/soap/AttachmentTest.php Diff File
mod - tests/soap/FilterTest.php Diff File
mod - tests/soap/LoginTest.php Diff File
mod - tests/soap/RelationshipTest.php Diff File

MantisBT: master cc2b4297

2024-02-26 02:20

dependabot[bot]

Committer: community


Details Diff
Bump phpunit/phpunit from 9.6.16 to 9.6.17 (0001973)

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.16 to 9.6.17.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.17/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.16...9.6.17)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
dependency-type: direct:development
update-type: version-update:semver-patch
...

Fixes 0033098, PR https://github.com/mantisbt/mantisbt/pull/1973

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Affected Issues
0033098
mod - composer.lock Diff File

MantisBT: master 6ddc26bd

2024-03-16 20:28

dregad


Details Diff
PHPUnit: class not matching filename is deprecated

Fixes 0033098
Affected Issues
0033098
mod - plugins/MantisCoreFormatting/tests/MarkdownTest.php Diff File

MantisBT: master 2fa53ca7

2024-03-24 05:04

dependabot[bot]

Committer: community


Details Diff
Bump phpunit/phpunit from 9.6.17 to 9.6.18

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.17 to 9.6.18.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.18/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.17...9.6.18)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
dependency-type: direct:development
update-type: version-update:semver-patch
...

Fixes 0033098

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Affected Issues
0033098
mod - composer.lock Diff File

MantisBT: master 756874c6

2024-04-09 06:35

dependabot[bot]

Committer: community


Details Diff
Bump phpunit/phpunit from 9.6.18 to 9.6.19 (#1990)

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.18 to 9.6.19.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.19/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.18...9.6.19)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
dependency-type: direct:development
update-type: version-update:semver-patch
...

Fixes 0033098, PR https://github.com/mantisbt/mantisbt/pull/1990

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Affected Issues
0033098
mod - composer.lock Diff File