| Total Complexity | 2 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PromptPayTest extends PHPUnit_Framework_TestCase { |
||
| 10 | |||
| 11 | private $PromptPay; |
||
| 12 | |||
| 13 | public function __construct() { |
||
| 14 | $this->PromptPay = new vansales\PromptPay(); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function testformatAmount() { |
||
| 18 | |||
| 19 | $amount = 90.2511; |
||
| 20 | $result = $this->PromptPay->formatAmount($amount); |
||
| 21 | $expected = '90.25'; |
||
| 22 | $this->assertEquals($expected, $result); |
||
| 23 | |||
| 24 | $amount = 90.2561; |
||
| 25 | $result = $this->PromptPay->formatAmount($amount); |
||
| 26 | $expected = '90.26'; |
||
| 27 | $this->assertEquals($expected, $result); |
||
| 28 | } |
||
| 30 | } |