@@ -212,7 +212,7 @@ public function testSetFragment()
212212 * @see testResolveUrls
213213 * @return array
214214 */
215- public function provideResolveUrls ()
215+ public static function provideResolveUrls ()
216216 {
217217 return array (
218218 array (
@@ -283,6 +283,7 @@ public function provideResolveUrls()
283283 * @covers Net_URL2::resolve
284284 * @return void
285285 */
286+ #[PHPUnit \Framework \Attributes \DataProvider('provideResolveUrls ' )]
286287 public function testResolveUrls ($ baseURL , array $ relativeAbsolutePairs ,
287288 array $ options = array ()
288289 ) {
@@ -468,7 +469,7 @@ public function testDontUseBrackets()
468469 * @link http://tools.ietf.org/html/rfc3986#section-1.1.2
469470 * @see testExampleUri
470471 */
471- public function provideExampleUri ()
472+ public static function provideExampleUri ()
472473 {
473474 return array (
474475 array ('ftp://ftp.is.co.za/rfc/rfc1808.txt ' ),
@@ -492,6 +493,7 @@ public function provideExampleUri()
492493 * @link http://tools.ietf.org/html/rfc3986#section-1.1.2
493494 * @see testComponentRecompositionAndNormalization
494495 */
496+ #[PHPUnit \Framework \Attributes \DataProvider('provideExampleUri ' )]
495497 public function testExampleUri ($ uri )
496498 {
497499 $ url = new Net_URL2 ($ uri );
@@ -507,7 +509,7 @@ public function testExampleUri($uri)
507509 * @see testRemoveDotSegments
508510 * @return array
509511 */
510- public function providePath ()
512+ public static function providePath ()
511513 {
512514 // The numbers behind are in reference to sections
513515 // in RFC 3986 5.2.4. Remove Dot Segments
@@ -542,6 +544,7 @@ public function providePath()
542544 * @covers Net_URL2::removeDotSegments
543545 * @return void
544546 */
547+ #[PHPUnit \Framework \Attributes \DataProvider('providePath ' )]
545548 public function testRemoveDotSegments ($ path , $ assertion )
546549 {
547550 $ this ->assertEquals ($ assertion , Net_URL2::removeDotSegments ($ path ));
@@ -570,7 +573,7 @@ public function testRemoveDotSegmentsLoopLimit()
570573 * @see testGetQueryVariables
571574 * @return array
572575 */
573- public function provideQueryStrings ()
576+ public static function provideQueryStrings ()
574577 {
575578 // If the second (expected) value is set or not null, parse_str() differs.
576579 // Notes on PHP differences with each entry/block
@@ -632,6 +635,7 @@ public function provideQueryStrings()
632635 * @covers Net_URL2::_queryKeyBracketOffset
633636 * @return void
634637 */
638+ #[PHPUnit \Framework \Attributes \DataProvider('provideQueryStrings ' )]
635639 public function testGetQueryVariables ($ query , $ expected = null ,
636640 array $ options = array ()
637641 ) {
@@ -663,7 +667,7 @@ public function testGetQueryVariables($query, $expected = null,
663667 * @return array
664668 * @see testHostAndPort
665669 */
666- public function provideHostAndPort ()
670+ public static function provideHostAndPort ()
667671 {
668672 return array (
669673 array ('[::1] ' , '[::1] ' , false ),
@@ -699,6 +703,7 @@ public function provideHostAndPort()
699703 * @link http://tools.ietf.org/html/rfc3986#section-3.2
700704 * @link http://tools.ietf.org/html/rfc3986#section-3.2.3
701705 */
706+ #[PHPUnit \Framework \Attributes \DataProvider('provideHostAndPort ' )]
702707 public function testHostAndPort ($ authority , $ expectedHost , $ expectedPort )
703708 {
704709 $ uri = "http:// {$ authority }" ;
@@ -762,6 +767,8 @@ public function test19315()
762767 Net_URL2::removeDotSegments ($ nonStringObject );
763768 } catch (PHPUnit_Framework_Error $ error ) {
764769 $ this ->addToAssertionCount (1 );
770+ } catch (Throwable $ error ) {
771+ $ this ->addToAssertionCount (1 );
765772 }
766773
767774 if (!isset ($ error )) {
@@ -816,7 +823,7 @@ public function test19684()
816823 * @see testConstructSelf
817824 * @return array
818825 */
819- public function provideEquivalentUrlLists ()
826+ public static function provideEquivalentUrlLists ()
820827 {
821828 return array (
822829 // String equivalence:
@@ -853,6 +860,7 @@ public function provideEquivalentUrlLists()
853860 *
854861 * @dataProvider provideEquivalentUrlLists
855862 */
863+ #[PHPUnit \Framework \Attributes \DataProvider('provideEquivalentUrlLists ' )]
856864 public function testNormalize ()
857865 {
858866 $ urls = func_get_args ();
@@ -897,7 +905,7 @@ public function testMagicSetGet()
897905 * @return array
898906 * @see testComponentRecompositionAndNormalization
899907 */
900- public function provideComposedAndNormalized ()
908+ public static function provideComposedAndNormalized ()
901909 {
902910 return array (
903911 array ('' ),
@@ -926,6 +934,7 @@ public function provideComposedAndNormalized()
926934 * @link https://pear.php.net/bugs/bug.php?id=20418
927935 * @see testExampleUri
928936 */
937+ #[PHPUnit \Framework \Attributes \DataProvider('provideComposedAndNormalized ' )]
929938 public function testComponentRecompositionAndNormalization ($ uri )
930939 {
931940 $ url = new Net_URL2 ($ uri );
@@ -942,6 +951,7 @@ public function testComponentRecompositionAndNormalization($uri)
942951 * @coversNothing
943952 * @return void
944953 */
954+ #[PHPUnit \Framework \Attributes \DataProvider('provideEquivalentUrlLists ' )]
945955 public function testConstructSelf ()
946956 {
947957 $ urls = func_get_args ();
0 commit comments