View Issue Details

IDProjectCategoryView StatusLast Update
0035259mantisbtcode cleanuppublic2025-02-09 06:14
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version2.28.0Fixed in Version2.28.0 
Summary0035259: Add namespaces to PHPUnit test suite
Description

With namespaces, we can benefit from Composer's PSR-4 autoloader, and thus avoid having to include classes whenever they are needed.

TagsNo tags attached.

Relationships

related to 0035258 resolveddregad Use of PHPUnit::toString() sometimes causes errors in tests 

Activities

dregad

dregad

2025-02-09 06:13

developer   ~0069838

This prevents execution of the test suite when PHPUnit is executed globally or with a PHAR file, see discussion in PR 2082.

An error occurred inside PHPUnit.

Message:  Class "Mantis\tests\Mantis\MantisCoreBase" not found
Location: C:\Projects\mantisbt\tests\Mantis\ConfigParserTest.php:43

Related Changesets

MantisBT: master 5b4f46b2

2025-01-31 10:47

dregad


Details Diff
Add namespaces to PHPUnit test suite

Fixes 0035259, 0035258
Merge PR https://github.com/mantisbt/mantisbt/pull/2082
Affected Issues
0035258, 0035259
mod - composer.json Diff File
mod - composer.lock Diff File
mod - tests/Mantis/ConfigParserTest.php Diff File
mod - tests/Mantis/Helper/ArrayTransposeTest.php Diff File
mod - tests/Mantis/Helper/GetLinkAttributesTest.php Diff File
mod - tests/Mantis/MantisCoreBase.php Diff File
mod - tests/Mantis/MantisEnumTest.php Diff File
mod - tests/Mantis/MentionParsingTest.php Diff File
mod - tests/Mantis/PluginTest.php Diff File
mod - tests/Mantis/PrepareTest.php Diff File
mod - tests/Mantis/StringTest.php Diff File
mod - tests/Mantis/UserApiTest.php Diff File
mod - tests/TestConfig.php Diff File
mod - tests/core/Faker.php Diff File
add - tests/core/MantisTestCase.php Diff File
mod - tests/core/RequestBuilder.php Diff File
mod - tests/rest/RestBase.php Diff File
mod - tests/rest/RestFiltersTest.php Diff File
mod - tests/rest/RestImpersonateUserTest.php Diff File
mod - tests/rest/RestIssueRelationshipsTest.php Diff File
mod - tests/rest/RestIssueTest.php Diff File
mod - tests/rest/RestIssueUpdateVersion.php Diff File
mod - tests/rest/RestProjectTest.php Diff File
mod - tests/rest/RestProjectVersionTest.php Diff File
mod - tests/rest/RestUserTest.php Diff File
mod - tests/soap/AttachmentTest.php Diff File
mod - tests/soap/CategoryTest.php Diff File
mod - tests/soap/CompressionTest.php Diff File
mod - tests/soap/EnumTest.php Diff File
mod - tests/soap/FilterTest.php Diff File
mod - tests/soap/IssueAddTest.php Diff File
mod - tests/soap/IssueHistoryTest.php Diff File
mod - tests/soap/IssueMonitorTest.php Diff File
mod - tests/soap/IssueNoteTest.php Diff File
mod - tests/soap/IssueUpdateTest.php Diff File
mod - tests/soap/LoginTest.php Diff File
mod - tests/soap/MentionTest.php Diff File
mod - tests/soap/ProjectTest.php Diff File
mod - tests/soap/RelationshipTest.php Diff File
mod - tests/soap/SoapBase.php Diff File
mod - tests/soap/TagTest.php Diff File
mod - tests/soap/UserTest.php Diff File
mod - tests/soap/VersionTest.php Diff File

MantisBT: master 5911fe56

2025-01-31 19:33

dregad


Details Diff
Add namespaces to PHPUnit MarkdownTest

The tests for MantisCoreFormatting were omitted from the PR.

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

MantisBT: master df5edf84

2025-02-09 05:50

dregad


Details Diff
Add composer autoloader to bootstrap.php.sample file

Fixes 0035259
Affected Issues
0035259
mod - tests/bootstrap.php.sample Diff File

MantisBT: master bf5168a0

2025-02-09 06:09

dregad


Details Diff
Improve PHPUnit documentation in Dev Guide

Fixes 0035259
Affected Issues
0035259
mod - docbook/Developers_Guide/en-US/Contributors.xml Diff File