Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function testHydratorHydratesAsExpected() |
||
27 | { |
||
28 | $hydrator = new MoneyHydrator(); |
||
29 | $data = ['amount' => 500, 'currency' => 'BRL']; |
||
30 | |||
31 | $money = new Money(500, new Currency('BRL')); |
||
32 | $object = $hydrator->hydrate($data, new \stdClass()); |
||
33 | |||
34 | $this->assertEquals($money->getAmount(), $object->getAmount()); |
||
35 | $this->assertEquals($money->getCurrency(), $object->getCurrency()); |
||
36 | } |
||
37 | } |
||
38 |