Repository navigation
WebControls rest second path audit (#1497) - #1683
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1497 (WebControls: HTML elements, tables, media, and the rest). This is the item's second path audit, run on current master. It covers the 169 files of #1642, #1647, #1665, #1673, and #1675. It changes only tests.
Test fixes
Each fix is its own commit.
TJsonLdTest::testRenderCombinationsOfSourceAndNoncenever ran. It was declared inside theTJsonLdTestThrowingControlfixture class, after itsrender(), so PHPUnit did not collect it. It now sits inTJsonLdTest. A scan oftests/unitfinds no othertest*method outside a test case, apart from the intended fixtures inPradoBaseTest.TRelativeTimeTest::testAttributeCombinationsOfDateTimeToolTipAndEnhancementnever leftDateTimeunset.setDateTime('')stores the current time, so the unset half rendered a setDateTime. That half now builds a control without one.TCronWakeSocketTestfailed on some Windows runners. Windows uses the udp transport. The tests bound the default ports 52800 to 52802. Windows reserves random port ranges at boot, so a runner could refuse 52800 with "forbidden by its access permissions", which failed six tests. The tests now probe for a base port whose three ports bind. The test that checks the default port number keeps it. With 52800 held, the old tests fail the same six ways locally over udp, and the new ones pass.New tests
Reachable paths in methods with 16 or fewer paths:
TWebControlItemScopeTVideo,TMediaSource,TTextTrackTVideonow hits all its pathsTMetaTagCharsetTOpenGraphog:propertiesTStyleSheetTClientScriptTCanvasgetClientEnhanced()false withoutOnDraw, without a page, and without JavaScriptTSvgTSvgDocumentgetTitle()andremoveTitles()over text-only, title-only, and description-only childrenTDotsetColor()with-and a hex value;nudge()at the channel ceiling with a null styleTAuthViewTemplatecanAny()without permissionsTBaseTermMarkLimit;getMarkCounts()over other elements;markText()without a matchTDataSizeunitFromMagnitude()without marketing sizes, and past its last unitTLoginNameTComponent, withDisplayGuestTMetersetHigh(null)TReferenceListHeaderLevel0; back links without references; a negative reference letter indexTSafetyCoversetOverlayTemplate(null)without an overlayTXmlTransformTDataSizenow covers every line and branch. ItsunitFromMagnitude()guards were listed as unreachable in #1673. They are reachable through the protected method.Remaining missed paths
Each remaining missed path in a method with 16 or fewer paths is one of these:
getElementsByTagName('*')always yields the root<svg>first,TFontsets a flag with every name and size, and a setInFormRenderalways has a form.try/finally, which Xdebug does not record.TStyle::__callfallthroughs andTDot::setColor(''), but their paths do not show.The
defaultand ICU fallbacks that #1673 lists inTTime,TRelativeTime, andTXmlTransformare unchanged. Group B, the tables, has no reachable gap.Checks