test wc_processing_order_count, wc_orders_count
This commit is contained in:
parent
839b5a4aa5
commit
f41e101b3f
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace WooCommerce\Tests\Customer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -51,6 +51,31 @@ class Functions extends \WC_Unit_Test_Case {
|
|||
$this->assertEquals( _x( 'Pending Payment', 'Order status', 'woocommerce' ), wc_get_order_status_name( 'pending' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test wc_processing_order_count()
|
||||
*
|
||||
* @todo needs improvement when we have an orders helper
|
||||
* @since 2.4
|
||||
*/
|
||||
public function test_wc_processing_order_count() {
|
||||
$this->assertEquals( 0, wc_processing_order_count() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test wc_orders_count()
|
||||
*
|
||||
* @todo needs improvement when we have an orders helper
|
||||
* @since 2.4
|
||||
*/
|
||||
public function test_wc_orders_count() {
|
||||
foreach ( wc_get_order_statuses() as $status ) {
|
||||
$this->assertEquals( 0, wc_orders_count( $status ) );
|
||||
}
|
||||
|
||||
// Invalid status returns 0
|
||||
$this->assertEquals( 0, wc_orders_count( 'unkown-status' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test wc_ship_to_billing_address_only()
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue