mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
Re-organise the src and tests directories
This commit is contained in:
parent
ae766763b2
commit
b238e6655a
26 changed files with 13 additions and 13 deletions
24
tests/ValueObject/CustomerTest.php
Normal file
24
tests/ValueObject/CustomerTest.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Opdavies\Glassboxx\Tests\ValueObject;
|
||||
|
||||
use Opdavies\Glassboxx\Tests\TestCase;
|
||||
use Opdavies\Glassboxx\ValueObject\Customer;
|
||||
|
||||
final class CustomerTest extends TestCase
|
||||
{
|
||||
public function testCreatingACustomer(): void
|
||||
{
|
||||
$customer = new Customer(
|
||||
'Oliver',
|
||||
'Davies',
|
||||
'oliver@oliverdavies.uk'
|
||||
);
|
||||
|
||||
$this->assertSame('Oliver', $customer->getFirstName());
|
||||
$this->assertSame('Davies', $customer->getLastName());
|
||||
$this->assertSame('oliver@oliverdavies.uk', $customer->getEmailAddress());
|
||||
}
|
||||
}
|
30
tests/ValueObject/OrderTest.php
Normal file
30
tests/ValueObject/OrderTest.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?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());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue