From 6e9e178ccb74936054ac06bc5554c9fe51877af3 Mon Sep 17 00:00:00 2001 From: Paul Bearne Date: Mon, 13 Nov 2023 17:47:00 -0500 Subject: [PATCH] Update wpFindHierarchyLoopTortoiseHare.php --- .../wpFindHierarchyLoopTortoiseHare.php | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php b/tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php index 2889033b98582..e043ed0a7017e 100644 --- a/tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php +++ b/tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php @@ -14,9 +14,12 @@ class Tests_Functions_wpFindHierarchyLoopTortoiseHare extends WP_UnitTestCase { */ public function test_wp_find_hierarchy_loop_tortoise_hare() { - $result = wp_find_hierarchy_loop_tortoise_hare( static function ( $id ) { - return 1; - }, 1 ); + $result = wp_find_hierarchy_loop_tortoise_hare( + static function ( $id ) { + return 1; + }, + 1 + ); $this->assertEquals( 1, $result ); } @@ -25,9 +28,12 @@ public function test_wp_find_hierarchy_loop_tortoise_hare() { */ public function test_wp_find_hierarchy_loop_tortoise_hare_2() { - $result = wp_find_hierarchy_loop_tortoise_hare( static function ( $id ) { - return 2; - }, 1 ); + $result = wp_find_hierarchy_loop_tortoise_hare( + static function ( $id ) { + return 2; + }, + 1 + ); $this->assertEquals( 2, $result ); } /** @@ -35,9 +41,15 @@ public function test_wp_find_hierarchy_loop_tortoise_hare_2() { */ public function test_wp_find_hierarchy_loop_tortoise_hare_return_loop() { - $result = wp_find_hierarchy_loop_tortoise_hare( static function ( $id ) { - return 2; - }, 1, array(), array(), true ); + $result = wp_find_hierarchy_loop_tortoise_hare( + static function ( $id ) { + return 2; + }, + 1, + array(), + array(), + true + ); $expected = array( 1 => true, 2 => true, @@ -50,9 +62,15 @@ public function test_wp_find_hierarchy_loop_tortoise_hare_return_loop() { */ public function test_wp_find_hierarchy_loop_tortoise_hare_return_loop_2() { - $result = wp_find_hierarchy_loop_tortoise_hare( static function ( $id ) { - return 1; - }, 1, array(), array(), true ); + $result = wp_find_hierarchy_loop_tortoise_hare( + static function ( $id ) { + return 1; + }, + 1, + array(), + array(), + true + ); $expected = array( 1 => true ); $this->assertSame( $expected, $result ); }