From e6f25b04d8f5d5fa8e85ec49fcc763bdf1952a08 Mon Sep 17 00:00:00 2001 From: Manos Psychogyiopoulos Date: Wed, 10 Apr 2019 12:47:06 +0300 Subject: [PATCH] Add limit param tests --- tests/unit-tests/product/data-store.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit-tests/product/data-store.php b/tests/unit-tests/product/data-store.php index e0925d40914..cc347e7e019 100644 --- a/tests/unit-tests/product/data-store.php +++ b/tests/unit-tests/product/data-store.php @@ -804,5 +804,8 @@ class WC_Tests_Product_Data_Store extends WC_Unit_Test_Case { $this->assertContains( $product2->get_id(), $results ); $this->assertNotContains( $product3->get_id(), $results ); $this->assertNotContains( $product4->get_id(), $results ); + + $results = $data_store->search_products( 'green', '', true, true, 1 ); + $this->assertEquals( 1, sizeof( array_diff( $results, array( 0 ) ) ) ); } }