Skip to content

Fixed issue #2075: Code coverage misses static array assignment lines#829

Merged
derickr merged 1 commit intoxdebug:xdebug_3_1from
derickr:issue2075-missing-cc
Mar 25, 2022
Merged

Fixed issue #2075: Code coverage misses static array assignment lines#829
derickr merged 1 commit intoxdebug:xdebug_3_1from
derickr:issue2075-missing-cc

Conversation

@derickr
Copy link
Copy Markdown
Contributor

@derickr derickr commented Mar 25, 2022

No description provided.

@derickr derickr force-pushed the issue2075-missing-cc branch from 8864f68 to d04fae3 Compare March 25, 2022 15:56
@derickr derickr merged commit 9e11ef8 into xdebug:xdebug_3_1 Mar 25, 2022
@derickr derickr deleted the issue2075-missing-cc branch March 25, 2022 16:12
Hubbitus pushed a commit to Hubbitus/HuPHP that referenced this pull request Mar 6, 2026
- Added 17 tests with 30 assertions for HuErrorSettings class
- Tests cover constructor, all getters, setters, and merge functionality
- Note: Xdebug shows 0% coverage due to known limitation with array
  initialization in constructors (issues #2075, #1922)
- Functional coverage is complete - all methods and properties tested

Test coverage:
- testConstructorCreatesInstance
- testConstructorCallsInitDefaults
- testConstructorSetsDefaultFormats
- testConstructorSetsDefaultFormatValues
- testConstructorSetsAutoDate
- testConstructorSetsDateFormat
- testCanModifySettings
- testCanSetCustomFormats
- testSetSettingMethod
- testMergeSettingsArray
- testGetProperty
- testSetSettingReturnsSelf
- testGetDefaultWebFormat
- testGetDefaultConsoleFormat
- testGetDefaultFileFormat
- testIsAutoDateEnabled
- testGetDateFormat

Known Xdebug limitation:
- https://bugs.xdebug.org/view.php?id=2075
- xdebug/xdebug#829
- Array initialization in constructors not counted as executable code

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant