Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update unit tests to latest changes
  • Loading branch information
oandregal committed Dec 26, 2024
commit ec420bb22e38ce744a44a18f2e2a1173738081fa
9 changes: 3 additions & 6 deletions tests/phpunit/includes/class-hierarchical-sort-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Loading