Skip to content

Commit

Permalink
Merge pull request #67 from lfolco/fixture-objects
Browse files Browse the repository at this point in the history
return objects from fixture (#66)
  • Loading branch information
schmengler authored Feb 10, 2021
2 parents 43dae87 + 4f18be5 commit 61751c2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Catalog/ProductFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function __construct(ProductInterface $product)
$this->product = $product;
}

public function getProduct(): ProductInterface
{
return $this->product;
}

public function getId(): int
{
return (int) $this->product->getId();
Expand Down
5 changes: 5 additions & 0 deletions src/Customer/CustomerFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public function __construct(CustomerInterface $customer)
$this->customer = $customer;
}

public function getCustomer(): CustomerInterface
{
return $this->customer;
}

public function getDefaultShippingAddressId(): int
{
return (int) $this->customer->getDefaultShipping();
Expand Down
5 changes: 5 additions & 0 deletions src/Sales/CreditmemoFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function __construct(CreditmemoInterface $creditmemo)
$this->creditmemo = $creditmemo;
}

public function getCreditmemo(): CreditmemoInterface
{
return $this->creditmemo;
}

public function getId(): int
{
return (int) $this->creditmemo->getEntityId();
Expand Down
5 changes: 5 additions & 0 deletions src/Sales/InvoiceFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function __construct(InvoiceInterface $shipment)
$this->invoice = $shipment;
}

public function getInvoice(): InvoiceInterface
{
return $this->invoice;
}

public function getId(): int
{
return (int) $this->invoice->getEntityId();
Expand Down
5 changes: 5 additions & 0 deletions src/Sales/OrderFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function __construct(Order $order)
$this->order = $order;
}

public function getOrder(): Order
{
return $this->order;
}

public function getId(): int
{
return (int) $this->order->getEntityId();
Expand Down
5 changes: 5 additions & 0 deletions src/Sales/ShipmentFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function __construct(ShipmentInterface $shipment)
$this->shipment = $shipment;
}

public function getShipment(): ShipmentInterface
{
return $this->shipment;
}

public function getId(): int
{
return (int) $this->shipment->getEntityId();
Expand Down

0 comments on commit 61751c2

Please sign in to comment.