| 1 |
<?php |
| 2 |
namespace Payplug\Resource; |
| 3 |
|
| 4 |
/** |
| 5 |
* @group unit |
| 6 |
* @group ci |
| 7 |
* @group recommended |
| 8 |
*/ |
| 9 |
class PaymentCustomerTest extends \PHPUnit_Framework_TestCase |
| 10 |
{ |
| 11 |
public function testCreateCustomerFromAttributes() |
| 12 |
{ |
| 13 |
$customer = PaymentCustomer::fromAttributes(array( |
| 14 |
'email' => '[email protected]', |
| 15 |
'first_name' => 'John', |
| 16 |
'last_name' => 'Doe', |
| 17 |
'address1' => 'rue abc', |
| 18 |
'address2' => 'cba', |
| 19 |
'postcode' => '12345', |
| 20 |
'country' => 'FR' |
| 21 |
)); |
| 22 |
|
| 23 |
$this->assertEquals('[email protected]', $customer->email); |
| 24 |
$this->assertEquals('John', $customer->first_name); |
| 25 |
$this->assertEquals('Doe', $customer->last_name); |
| 26 |
$this->assertEquals('rue abc', $customer->address1); |
| 27 |
$this->assertEquals('cba', $customer->address2); |
| 28 |
$this->assertEquals('12345', $customer->postcode); |
| 29 |
$this->assertEquals('FR', $customer->country); |
| 30 |
} |
| 31 |
} |
| 32 |
|