diff --git a/tests/TransactionTest.php b/tests/TransactionTest.php index 97a0703..e5aff68 100644 --- a/tests/TransactionTest.php +++ b/tests/TransactionTest.php @@ -20,6 +20,8 @@ class TransactionTest extends TestCase protected $params; /** + * The Transaction instance. + * * @var \CraigPaul\Moneris\Transaction */ protected $transaction; @@ -37,7 +39,7 @@ public function setUp() $this->gateway = Moneris::create($this->id, $this->token, $this->params)->connect(); $this->params = [ 'type' => 'purchase', - 'order_id' => '1234-567890', + 'order_id' => uniqid('1234-56789', true), 'amount' => '1.00', 'pan' => $this->visa, 'expdate' => '2012', @@ -84,4 +86,13 @@ public function it_can_determine_that_an_improper_set_of_parameters_has_been_pro $this->assertFalse($transaction->valid()); $this->assertTrue($transaction->invalid()); } + + /** @test */ + public function it_can_transform_itself_to_an_xml_structure() + { + $xml = $this->transaction->toXml(); + $xml = simplexml_load_string($xml); + + $this->assertNotEquals(false, $xml); + } } \ No newline at end of file