From 59c7c930d313d3776534cd8720872f324ee80a39 Mon Sep 17 00:00:00 2001 From: creative-andrew Date: Tue, 18 Jun 2024 16:03:21 +0200 Subject: [PATCH] fix: adjust test to remove ucwords --- tests/wpunit/ProductAttributeQueriesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/wpunit/ProductAttributeQueriesTest.php b/tests/wpunit/ProductAttributeQueriesTest.php index 6684c957..de6fb1c4 100644 --- a/tests/wpunit/ProductAttributeQueriesTest.php +++ b/tests/wpunit/ProductAttributeQueriesTest.php @@ -17,7 +17,7 @@ public function expectedProductAttributeData( $product_id, $path ) { $this->expectedField( 'label', $attribute->is_taxonomy() - ? ucwords( get_taxonomy( $attribute->get_name() )->labels->singular_name ) + ? get_taxonomy( $attribute->get_name() )->labels->singular_name : ucwords( preg_replace( '/(-|_)/', ' ', $attribute->get_name() ) ) ), $this->expectedField( 'options', $attribute->get_slugs() ),