From 918e20a836126ba00e55f2a9e4e1278bec6df15f Mon Sep 17 00:00:00 2001 From: Karthik Thayyil Date: Mon, 11 Dec 2023 14:58:03 +0000 Subject: [PATCH] fix ordering issue --- tests/phpunit/tests/blocks/getBlockTemplates.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/blocks/getBlockTemplates.php b/tests/phpunit/tests/blocks/getBlockTemplates.php index 2a8e1b464f936..1734b07065317 100644 --- a/tests/phpunit/tests/blocks/getBlockTemplates.php +++ b/tests/phpunit/tests/blocks/getBlockTemplates.php @@ -245,6 +245,8 @@ static function ( $template ) use ( $theme_dir ) { ); $template_paths = _get_block_templates_paths( $theme_dir ); + sort( $expected_template_paths ); + sort( $template_paths ); $this->assertSame( $expected_template_paths, $template_paths ); } @@ -256,6 +258,8 @@ public function test_get_block_templates_paths_dir_doesnt_exists() { $expected_template_paths = array(); // should return empty array for invalid path. $template_paths = _get_block_templates_paths( $theme_dir ); + sort( $expected_template_paths ); + sort( $template_paths ); $this->assertSame( $expected_template_paths, $template_paths ); } }