View Issue Details

IDProjectCategoryView StatusLast Update
0032814mantisbtapi soappublic2023-10-31 16:32
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version2.26.0Fixed in Version2.26.0 
Summary0032814: PHPUnit SOAP API tests trigger syntax error when extension is not loaded
Description

PHP Fatal error: Uncaught Error: Undefined constant "WSDL_CACHE_NONE"

This is due to declaration of SoapBase::$defaultSoapClientOptions referencing the the constant, which does not exist when the extension is not loaded.

Initialization should be moved to setUp() method.

TagsNo tags attached.

Relationships

related to 0032810 closeddregad Ugrade to PHPUnit 8.5 and adapt test suite 

Activities

Related Changesets

MantisBT: master e6827c4a

2023-08-09 12:48

dregad


Details Diff
Fix errors when SOAP extension is not loaded

Initialize defaultSoapClientOptions property in setUp(), to avoid a
syntax error due to undefined constant WSDL_CACHE_NONE.

Remove useless SoapAllTests::setUp() method. TestSuite class does not
have this method so it is never actually called. Extension availability
check is performed by `@requires extension` hints in the test cases'
PHPDoc blocks.

Fixes 0032814
Affected Issues
0032814
mod - tests/soap/AllTests.php Diff File
mod - tests/soap/SoapBase.php Diff File