Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds get expiring test
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent 3e6358b commit 4178cb8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/VaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,23 @@ public function it_can_peek_into_the_vault_and_retrieve_a_full_credit_card_from_
$this->assertEquals('2012', $receipt->ResolveData->expdate);
$this->assertEquals($this->visa, $receipt->ResolveData->pan);
}

/** @test */
public function it_can_retrieve_all_expiring_credit_cards_from_the_moneris_vault()
{
$expiry = date('ym', strtotime('today + 10 days'));

$card = CreditCard::create($this->visa, $expiry);
$this->vault->add($card);
$card = CreditCard::create($this->mastercard, $expiry);
$this->vault->add($card);
$card = CreditCard::create($this->amex, $expiry);
$this->vault->add($card);

$response = $this->vault->expiring();
$receipt = $response->receipt();

$this->assertTrue($response->successful);
$this->assertGreaterThan(0, count($receipt->ResolveData));
}
}

0 comments on commit 4178cb8

Please sign in to comment.