Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class ParseTransactionPriceTest extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @dataProvider getTransactions |
||
15 | * |
||
16 | * @param string $inputString |
||
17 | * @param float $expected |
||
18 | * @throws \ReflectionException |
||
19 | */ |
||
20 | public function test($inputString, $expected) { |
||
21 | $engine = new Spk; |
||
22 | $property = new \ReflectionProperty($engine, 'currentTransactionData'); |
||
23 | $property->setAccessible(true); |
||
24 | $property->setValue($engine, $inputString); |
||
25 | |||
26 | $method = new \ReflectionMethod($engine, 'parseTransactionPrice'); |
||
27 | $method->setAccessible(true); |
||
28 | $this->assertSame($expected, $method->invoke($engine)); |
||
29 | } |
||
30 | |||
31 | public function getTransactions() |
||
36 | ]; |
||
37 | } |
||
38 | } |