Skip to content

Commit d7e1e7e

Browse files
committed
improve test coverage
1 parent b61df72 commit d7e1e7e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/Omnipay/Common/CreditCardTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ public function testShouldReturnTrack2()
358358
$this->assertEquals(';4242424242424242=15201269999944401?', $actual);
359359
}
360360

361+
public function testShouldReturnNoTrack()
362+
{
363+
$this->card->setTracks(null);
364+
$actual = $this->card->getTrack2();
365+
$this->assertNull($actual);
366+
}
367+
361368
public function testIssueNumber()
362369
{
363370
$this->card->setIssueNumber('12');

tests/Omnipay/Common/Message/AbstractResponseTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
class AbstractResponseTest extends TestCase
99
{
10+
/** @var AbstractResponse */
11+
protected $response;
12+
1013
public function setUp()
1114
{
1215
$this->response = m::mock('\Omnipay\Common\Message\AbstractResponse')->makePartial();
@@ -32,6 +35,9 @@ public function testDefaultMethods()
3235
$this->assertNull($this->response->getTransactionReference());
3336
$this->assertNull($this->response->getMessage());
3437
$this->assertNull($this->response->getCode());
38+
$this->assertNull($this->response->getRedirectUrl());
39+
$this->assertEquals('GET', $this->response->getRedirectMethod());
40+
$this->assertEquals([], $this->response->getRedirectData());
3541
}
3642

3743
/**

0 commit comments

Comments
 (0)