You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add unit tests for json index methods in Package_PHP_Web #177
This issue is specifically to add the first unit tests for the Package_PHP_Web class, which currently have no test coverage, focusing on the writeJsonIndex and processJsonIndex methods.
A follow-up issue should be created to address unit tests for the remaining methods.
I declared these methods as private, which makes it a bit tricky to hook into them using the existing approach of extending classes (i.e. Test*.php classes in phpdotnet/phd).
Would it be okay to extract this JSON index behavior into a dedicated class and just test it directly? Or would you prefer that I find a way to maintain the current strategy of test subject extension?
Activity
lhsazevedo commentedon Nov 3, 2024
@haszi Please assign me
lhsazevedo commentedon Jan 10, 2025
Context: #160 (review)
lhsazevedo commentedon Jan 10, 2025
Hi @haszi
I declared these methods as private, which makes it a bit tricky to hook into them using the existing approach of extending classes (i.e. Test*.php classes in phpdotnet/phd).
Would it be okay to extract this JSON index behavior into a dedicated class and just test it directly? Or would you prefer that I find a way to maintain the current strategy of test subject extension?
lhsazevedo commentedon Jan 23, 2025
ping @haszi @Girgias
Girgias commentedon Jan 30, 2025
Sorry, I think extracting the index into a dedicated class makes sense.
Fix phpGH-177: Extract JSON index logic into dedicated JsonIndex class