From 13f2dd6be9f771724d95516d7afd0047288e996e Mon Sep 17 00:00:00 2001 From: vedanshujain Date: Mon, 26 Oct 2020 23:48:51 +0530 Subject: [PATCH] Add unit tests towards issue #28100 --- .../class-wc-customer-data-store-test.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/php/includes/data-stores/class-wc-customer-data-store-test.php diff --git a/tests/php/includes/data-stores/class-wc-customer-data-store-test.php b/tests/php/includes/data-stores/class-wc-customer-data-store-test.php new file mode 100644 index 00000000000..aaa3817fa2b --- /dev/null +++ b/tests/php/includes/data-stores/class-wc-customer-data-store-test.php @@ -0,0 +1,26 @@ +get_id(); + $username = $customer->get_username(); + $customer->add_meta_data( 'id', '99999' ); + $customer->add_meta_data( 'username', 'abcde' ); + $customer->save(); + + $customer_datastore = new WC_Customer_Data_Store(); + $customer_datastore->read( $customer ); + $this->assertEquals( $customer_id, $customer->get_id() ); + $this->assertEquals( $username, $customer->get_username() ); + } +}