2018-04-27 11:19:02 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class WC_Retailcrm_Test_Case_Helper extends WC_Unit_Test_Case
|
|
|
|
{
|
2018-05-28 12:56:19 +03:00
|
|
|
protected function setOptions($apiVersion = 'v5')
|
2018-04-27 11:19:02 +03:00
|
|
|
{
|
|
|
|
$options = array(
|
|
|
|
'api_url' => 'https://example.retailcrm.ru',
|
|
|
|
'api_key' => 'dhsHJGYdjkHHJKJSGjhasjhgajsgJGHsg',
|
2018-05-28 12:56:19 +03:00
|
|
|
'api_version' => $apiVersion,
|
2018-04-27 11:19:02 +03:00
|
|
|
'p_draft' => 'no',
|
|
|
|
'p_pending' => 'no',
|
|
|
|
'p_private' => 'no',
|
|
|
|
'p_publish' => 'no',
|
|
|
|
'order_methods' => '',
|
2018-07-19 12:16:30 +03:00
|
|
|
'flat_rate_shipping' => 'delivery',
|
|
|
|
'free_shipping' => 'delivery2',
|
|
|
|
'local_pickup' => 'delivery3',
|
2018-04-27 11:19:02 +03:00
|
|
|
'bacs' => 'payment1',
|
|
|
|
'cheque' => 'payment2',
|
|
|
|
'cod' => 'payment3',
|
|
|
|
'paypal' => 'payment4',
|
|
|
|
'ppec_paypal' => 'payment5',
|
|
|
|
'pending' => 'status1',
|
|
|
|
'processing' => 'status2',
|
|
|
|
'on-hold' => 'status3',
|
|
|
|
'completed' => 'status4',
|
|
|
|
'cancelled' => 'status5',
|
|
|
|
'refunded' => 'status6',
|
|
|
|
'failed' => 'status7',
|
|
|
|
'sync' => 'no',
|
2018-05-28 12:56:19 +03:00
|
|
|
'ua' => 'yes',
|
|
|
|
'ua_code' => 'UA-XXXXXXX-XX',
|
|
|
|
'ua_custom' => '1',
|
2018-04-27 11:19:02 +03:00
|
|
|
'upload-button' => ''
|
|
|
|
);
|
|
|
|
|
|
|
|
update_option(WC_Retailcrm_Base::$option_key, $options);
|
|
|
|
|
|
|
|
return $options;
|
|
|
|
}
|
|
|
|
}
|