Added unit tests for templates
This commit is contained in:
@@ -88,6 +88,21 @@ class Wiaas_Unit_Test_Case extends WP_UnitTestCase {
|
||||
$package->sync(true);
|
||||
}
|
||||
|
||||
|
||||
function create_new_wiaas_template() {
|
||||
$post_id = wp_insert_post(array(
|
||||
'post_type' => 'product',
|
||||
'post_status' => 'publish',
|
||||
'post_name' => 'product',
|
||||
'post_title' => 'Package',
|
||||
'post_content' => 'Package',
|
||||
'post_excerpt' => 'Package'
|
||||
), true);
|
||||
|
||||
return new WC_Product_Template($post_id);
|
||||
|
||||
}
|
||||
|
||||
function create_new_customer($login = 'customer_test', $organization_name = 'test-customer-organization') {
|
||||
$customer_id = wp_insert_user(array(
|
||||
'user_login' => $login,
|
||||
|
||||
Reference in New Issue
Block a user