mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-08 19:25:02 +00:00
31 lines
779 B
PHP
31 lines
779 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Opdavies\Glassboxx\Tests\ValueObject;
|
|
|
|
use Opdavies\Glassboxx\Tests\TestCase;
|
|
use Opdavies\Glassboxx\ValueObject\Customer;
|
|
use Opdavies\Glassboxx\ValueObject\CustomerInterface;
|
|
use Opdavies\Glassboxx\ValueObject\Order;
|
|
|
|
class OrderTest extends TestCase
|
|
{
|
|
public function testCreatingAnOrder(): void
|
|
{
|
|
$customer = $this->getMockBuilder(CustomerInterface::class)
|
|
->disableOriginalConstructor()
|
|
->getMock();
|
|
|
|
$order = new Order(
|
|
$customer,
|
|
'123',
|
|
'GBP'
|
|
);
|
|
|
|
$this->assertSame('GBP', $order->getCurrencyCode());
|
|
$this->assertSame($customer, $order->getCustomer());
|
|
$this->assertSame('123', $order->getOrderNumber());
|
|
}
|
|
}
|