Skip to content

Commit

Permalink
tmp: test failing on 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Apr 7, 2024
1 parent 33c6e97 commit 34368c2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/wpunit/NodeByUriTest.php
Expand Up @@ -1419,13 +1419,20 @@ public function testPostFormatByUri() {
*/
public function testDefaultTaxTermByUri() {
$term = get_term_by( 'slug', 'default-term', 'by_uri_tax' );
$term_id = $term->term_id;

$term_id = isset( $term->term_id ) ? $term->term_id : 0;

codecept_debug( $term_id );

$query = $this->getQuery();

$expected_graphql_type = ucfirst( get_taxonomy( 'by_uri_tax' )->graphql_single_name );

$uri = wp_make_link_relative( get_term_link( $term_id ) );
$term_link = get_term_link( $term_id, 'by_uri_tax' );

$uri = is_wp_error( $term_link ) ? '' : wp_make_link_relative( $term_link );

codecept_debug( $uri );

/**
* NodeResolver::parse_request() will generate the following query vars:
Expand Down

0 comments on commit 34368c2

Please sign in to comment.