File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -709,6 +709,9 @@ public function testNestedSingleRootFragmentWithOuterWhitespaceIsPreserved()
709709 public function testInternalWrapperHelperNameIsNotHyphenated ()
710710 {
711711 $ reflection = new \ReflectionProperty (\voku \helper \AbstractDomParser::class, 'domHtmlWrapperHelper ' );
712+ if (\PHP_VERSION_ID < 80100 ) {
713+ $ reflection ->setAccessible (true );
714+ }
712715
713716 static ::assertSame ('simplevokuwrapper ' , $ reflection ->getValue ());
714717 static ::assertStringNotContainsString ('- ' , $ reflection ->getValue ());
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ public function testBrokenReplaceHelperIsResetBetweenDocuments()
100100 {
101101 $ property = new \ReflectionProperty (AbstractDomParser::class, 'domBrokenReplaceHelper ' );
102102 $ keysProperty = new \ReflectionProperty (AbstractDomParser::class, 'dynamicDomBrokenReplaceHelperKeys ' );
103+ if (\PHP_VERSION_ID < 80100 ) {
104+ $ property ->setAccessible (true );
105+ $ keysProperty ->setAccessible (true );
106+ }
103107
104108 $ dom = new HtmlDomParser ();
105109 // The broken-replacement map is static, so seed it explicitly to
@@ -119,6 +123,9 @@ public function testBrokenReplaceHelperIsResetBetweenDocuments()
119123 public function testHasMultipleTopLevelNodesRestoresLibxmlState ()
120124 {
121125 $ method = new \ReflectionMethod (HtmlDomParser::class, 'hasMultipleTopLevelNodes ' );
126+ if (\PHP_VERSION_ID < 80100 ) {
127+ $ method ->setAccessible (true );
128+ }
122129
123130 $ dom = new HtmlDomParser ();
124131 $ originalInternalErrors = \libxml_use_internal_errors (false );
Original file line number Diff line number Diff line change @@ -760,6 +760,9 @@ public function testLookupValueHelpersAndRemovedNodeState()
760760
761761 $ corrupted = new SimpleHtmlDom (new \DOMElement ('free ' ));
762762 $ nodeProperty = new \ReflectionProperty (\voku \helper \AbstractSimpleHtmlDom::class, 'node ' );
763+ if (\PHP_VERSION_ID < 80100 ) {
764+ $ nodeProperty ->setAccessible (true );
765+ }
763766 $ nodeProperty ->setValue ($ corrupted , new \stdClass ());
764767 static ::assertTrue ($ corrupted ->isRemoved ());
765768
You can’t perform that action at this time.
0 commit comments