-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
spec/Nikapps/NikPay/PaymentProviders/Saman/SamanTranslatorSpec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace spec\Nikapps\NikPay\PaymentProviders\Saman; | ||
|
||
use PhpSpec\ObjectBehavior; | ||
use Prophecy\Argument; | ||
|
||
class SamanTranslatorSpec extends ObjectBehavior | ||
{ | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType('Nikapps\NikPay\PaymentProviders\Saman\SamanTranslator'); | ||
} | ||
|
||
function it_should_return_error_description() | ||
{ | ||
$this->describe(-3) | ||
->shouldBe('ورودیها حاوی کارکترهای ریرمجاز میباشند.'); | ||
} | ||
|
||
function it_should_return_error_code_when_description_is_not_available() | ||
{ | ||
$this->describe(-2000)->shouldBe(-2000); | ||
} | ||
|
||
function it_should_return_state_description() | ||
{ | ||
$this->describe('Invalid Amount') | ||
->shouldBe('مبلغ سند برگشتی، از مبلغ تراکنش اصلی بیشتر است.'); | ||
} | ||
|
||
function it_should_return_state_code_when_description_is_not_available() | ||
{ | ||
$this->describe('Not Available State Code') | ||
->shouldBe('Not Available State Code'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters