<?php
namespace tests\unit\domain\pay\entity;
use app\domain\pay\entity\PayTransaction;
use tests\unit\traits\TestAccessProtected;
class PayBuilder
{
use TestAccessProtected;
private $id = 1;
private $paymentSystem = PayTransaction::PAYMENT_SYSTEM_PAYPAL;
private $amount = 100;
public static function instance()
{
return new self();
}
public function withId($id)
{
$this->id = $id;
return $this;
}
public function withPaymentSystem($paymentSystem)
{
$this->paymentSystem = $paymentSystem;
return $this;
}
public function withAmount($amount)
{
$this->amount = $amount;
return $this;
}
public function build()
{
$employee = new PayTransaction(
$this->id,
$this->paymentSystem,
$this->amount,
'USD'
);
return $employee;
}
}