Passed
Push — master ( a69358...1a5e7c )
by Monthon
01:25
created

ScbQrTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A testformatAmount() 0 11 1
1
<?php
2
3
require __DIR__ . '/../vendor/autoload.php';
4
require_once __DIR__ . '/../src/ScbQr.php';
5
6
/**
7
 * @property vansales\ScbQr ScbQr
8
 */
9
class ScbQrTest extends PHPUnit_Framework_TestCase {
10
11
  private $ScbQr;
12
13
  public function __construct() {
14
    $this->ScbQr = new vansales\ScbQr();
15
  }
16
17
  public function testformatAmount() {
18
19
    $amount = 90.2511;
20
    $result = $this->PromptPay->formatAmount($amount);
0 ignored issues
show
Bug Best Practice introduced by
The property PromptPay does not exist on ScbQrTest. Did you maybe forget to declare it?
Loading history...
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
  }
29
30
}