Skip to content

Commit

Permalink
Update wpFindHierarchyLoopTortoiseHare.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pbearne authored Nov 13, 2023
1 parent 870886d commit 6e9e178
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check failure on line 17 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
static function ( $id ) {
return 1;

Check failure on line 19 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Line indented incorrectly; expected at least 4 tabs, found 3
},

Check failure on line 20 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
1

Check failure on line 21 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
);
$this->assertEquals( 1, $result );
}

Expand All @@ -25,19 +28,28 @@ 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(

Check failure on line 31 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
static function ( $id ) {
return 2;
},
1

Check failure on line 35 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
);
$this->assertEquals( 2, $result );
}
/**
* @ticket 59854
*/
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(

Check failure on line 44 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
static function ( $id ) {
return 2;
},
1,
array(),
array(),
true

Check failure on line 51 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
);
$expected = array(

Check failure on line 53 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
1 => true,
2 => true,
Expand All @@ -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(

Check failure on line 65 in tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
static function ( $id ) {
return 1;
},
1,
array(),
array(),
true
);
$expected = array( 1 => true );
$this->assertSame( $expected, $result );
}
Expand Down

0 comments on commit 6e9e178

Please sign in to comment.