Skip to content

Commit c1794cd

Browse files
authored
Merge pull request #88 from academe/master
Test solutionId for PR #87
2 parents a508b56 + 235a0d5 commit c1794cd

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ php:
55
- 5.5
66
- 5.6
77
- 7.0
8+
- 7.1
89
- hhvm
910

1011
matrix:

tests/Message/AIMAbstractRequestTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
<?php
22

3-
43
namespace Message;
54

6-
75
use Omnipay\AuthorizeNet\Message\AIMAbstractRequest;
6+
use Omnipay\Tests\TestCase;
7+
use Mockery;
88

9-
class AIMAbstractRequestTest extends \PHPUnit_Framework_TestCase
9+
class AIMAbstractRequestTest extends TestCase
1010
{
1111
/** @var AIMAbstractRequest */
1212
private $request;
1313

1414
public function setUp()
1515
{
16-
$this->request = $this->getMockForAbstractClass(
17-
'\Omnipay\AuthorizeNet\Message\AIMAbstractRequest',
18-
array(
19-
$this->getMock('\Guzzle\Http\ClientInterface'),
20-
$this->getMock('\Symfony\Component\HttpFoundation\Request')
21-
)
22-
);
16+
$this->request = Mockery::mock('\Omnipay\AuthorizeNet\Message\AIMAbstractRequest')->makePartial();
17+
$this->request->initialize();
2318
}
2419

2520
public function testShouldReturnTransactionReference()

tests/Message/AIMAuthorizeRequestTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public function setUp()
2020
'amount' => '12.00',
2121
'customerId' => 'cust-id',
2222
'card' => $card,
23-
'duplicateWindow' => 0
23+
'duplicateWindow' => 0,
24+
'solutionId' => 'SOL12345ID',
2425
)
2526
);
2627
}
@@ -33,6 +34,7 @@ public function testGetData()
3334
$this->assertEquals('10.0.0.1', $data->transactionRequest->customerIP);
3435
$this->assertEquals('cust-id', $data->transactionRequest->customer->id);
3536
$this->assertEquals('[email protected]', $data->transactionRequest->customer->email);
37+
$this->assertEquals('SOL12345ID', $data->transactionRequest->solution->id);
3638

3739
// Issue #38 Make sure the transactionRequest properties are correctly ordered.
3840
// This feels messy, but works.
@@ -43,6 +45,7 @@ public function testGetData()
4345
"transactionType",
4446
"amount",
4547
"payment",
48+
"solution",
4649
"order",
4750
"customer",
4851
"billTo",

0 commit comments

Comments
 (0)