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