diff --git a/tests/phpunit/includes/class-hierarchical-sort-test.php b/tests/phpunit/includes/class-hierarchical-sort-test.php index 6be9e5d6c921d..a0d17c9035c20 100644 --- a/tests/phpunit/includes/class-hierarchical-sort-test.php +++ b/tests/phpunit/includes/class-hierarchical-sort-test.php @@ -67,8 +67,7 @@ public function test_return_all_post_ids() { ), ); - $hs = Hierarchical_Sort::get_instance(); - $result = $hs->sort( $input ); + $result = Hierarchical_Sort::run( $input ); $this->assertEquals( array( 12, 3, 6, 5, 4, 7, 8, 9, 11, 10 ), $result['post_ids'] ); $this->assertEquals( array( @@ -112,8 +111,7 @@ public function test_return_orphans() { ), ); - $hs = Hierarchical_Sort::get_instance(); - $result = $hs->sort( $input ); + $result = Hierarchical_Sort::run( $input ); $this->assertEquals( array( 11, 4, 7 ), $result['post_ids'] ); $this->assertEquals( array( @@ -185,8 +183,7 @@ public function test_post_with_empty_post_parent_are_considered_top_level() { ), ); - $hs = Hierarchical_Sort::get_instance(); - $result = $hs->sort( $input ); + $result = Hierarchical_Sort::run( $input ); $this->assertEquals( array( 2, 3, 5, 6, 4, 7, 8, 9, 11, 10 ), $result['post_ids'] ); $this->assertEquals( array(