1
0
mirror of synced 2025-01-31 07:11:42 +03:00
woocommerce-module/tests/customer/test-wc-retailcrm-customer-address.php
Akolzin Dmitry cc4e8c9c5b update build
2020-02-25 13:45:17 +03:00

40 lines
1.1 KiB
PHP

<?php
/**
* PHP version 5.3
*
* @category Integration
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
class WC_Retailcrm_Customer_Address_Test extends WC_Retailcrm_Test_Case_Helper
{
protected $customer;
public function setUp()
{
parent::setUp();
$this->customer = WC_Helper_Customer::create_customer();
}
public function test_build()
{
$customer_address = new WC_Retailcrm_Customer_Address;
$data = $customer_address->build($this->customer)->get_data();
$this->assertArrayHasKey('index', $data);
$this->assertArrayHasKey('city', $data);
$this->assertArrayHasKey('region', $data);
$this->assertArrayHasKey('text', $data);
$this->assertArrayHasKey('countryIso', $data);
$this->assertNotEmpty($data['index']);
$this->assertNotEmpty($data['city']);
$this->assertNotEmpty($data['region']);
$this->assertNotEmpty($data['text']);
$this->assertNotEmpty($data['countryIso']);
}
}