mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
parent
e83c6e59e4
commit
532dfd43a1
10 changed files with 342 additions and 8 deletions
34
tests/Glassboxx/ValueObject/OrderTest.php
Normal file
34
tests/Glassboxx/ValueObject/OrderTest.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Opdavies\Glassboxx\Tests\Glassboxx\ValueObject;
|
||||
|
||||
use Opdavies\Glassboxx\Tests\Glassboxx\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,
|
||||
'this-is-the-sku',
|
||||
'123',
|
||||
'GBP',
|
||||
10.00
|
||||
);
|
||||
|
||||
$this->assertSame('GBP', $order->getCurrencyCode());
|
||||
$this->assertSame($customer, $order->getCustomer());
|
||||
$this->assertSame('123', $order->getOrderNumber());
|
||||
$this->assertSame(10.0, $order->getPrice());
|
||||
$this->assertSame('this-is-the-sku', $order->getSku());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue