Skip to content

Commit

Permalink
Update wpFindHierarchyLoopTortoiseHare.php
Browse files Browse the repository at this point in the history
White space
  • Loading branch information
pbearne authored Nov 13, 2023
1 parent 7871b68 commit 870886d
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions tests/phpunit/tests/functions/wpFindHierarchyLoopTortoiseHare.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ 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 ) {

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Opening parenthesis of a multi-line function call must be the last content on the line
return 1;

Check failure on line 18 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 );

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Only one argument is allowed per line in a multi-line function call

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Closing parenthesis of a multi-line function call must be on a line by itself
$this->assertEquals( 1, $result );
}

Expand All @@ -23,16 +25,23 @@ 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 ) {

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Opening parenthesis of a multi-line function call must be the last content on the line
return 2;

Check failure on line 29 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 );

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Only one argument is allowed per line in a multi-line function call

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Closing parenthesis of a multi-line function call must be on a line by itself
$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 );
$expected = array( 1 => true, 2 => true );
$result = wp_find_hierarchy_loop_tortoise_hare( static function ( $id ) {

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

View workflow job for this annotation

GitHub Actions / PHP coding standards

Opening parenthesis of a multi-line function call must be the last content on the line
return 2;

Check failure on line 39 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, array(), array(), true );
$expected = array(
1 => true,
2 => true,
);
$this->assertSame( $expected, $result );
}

Expand All @@ -41,7 +50,9 @@ 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 );
}
Expand Down

0 comments on commit 870886d

Please sign in to comment.