Skip to content

Commit 670b1bf

Browse files
committed
tests: create ignored menuItems at start of testLocationWhereArgs
1 parent 40b0d76 commit 670b1bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/wpunit/MenuItemConnectionQueriesTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ public function testLocationWhereArgs() {
429429
$menu_location = 'my-menu-items-location';
430430
register_nav_menu( $menu_location, 'My MenuItems' );
431431

432+
// // These should be filtered out.
432433
$ignored_location = 'ignored-menu-items-location';
434+
$ignored = $this->create_menu_items( 'ignored-menu-for-test', $ignored_location, 3 );
433435
register_nav_menu( $ignored_location, 'Ignored MenuItems' );
434436

435437
WPGraphQL::clear_schema();
@@ -450,9 +452,6 @@ public function testLocationWhereArgs() {
450452
// Test with menu assigned.
451453
$created = $this->create_menu_items( 'menu-for-location-test', $menu_location, 1 );
452454

453-
// // These should be filtered out.
454-
$ignored = $this->create_menu_items( 'ignored-menu-for-test', $ignored_location, 3 );
455-
456455
$actual = $this->graphql( compact( 'query', 'variables' ) );
457456

458457
// The returned menu items have the expected number.

0 commit comments

Comments
 (0)