Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Oct 31, 2022
1 parent 20522d3 commit d3032f6
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/phpunit/test-tools/Utils_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,4 @@ public function test_get_primary_category__default_category__yoast_activated() {

$this->assertEquals( $term_name, 'Uncategorized' );
}

public function test_get_primary_category__custom_category__yoast_activated() {
\WP_Mock::userFunction( 'yoast_get_primary_term_id', array(
'times' => 1,
'args' => array( 'category', null ),
'return' => 123,
) );

\WP_Mock::userFunction( 'get_term', array(
'times' => 1,
'args' => array( 123 ),
'return' => (object) array(
'term_id' => 123,
'name' => 'Art',
),
) );

$term_name = get_primary_category();

$this->assertEquals( $term_name, 'Art' );
}
}

0 comments on commit d3032f6

Please sign in to comment.