| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 35 | public function theEntityCanBeSavedAndLoadedWithCorrectValues() |
||
| 36 | { |
||
| 37 | $entity = new $this->entityFqn; |
||
| 38 | $entity->getMoneyEmbeddable() |
||
| 39 | ->setMoney(new Money( |
||
| 40 | 100, |
||
| 41 | new Currency(MoneyEmbeddableInterface::DEFAULT_CURRENCY_CODE) |
||
| 42 | )); |
||
| 43 | $this->getEntitySaver()->save($entity); |
||
| 44 | |||
| 45 | $loaded = $this->getEntityManager()->getRepository($this->entityFqn)->findAll()[0]; |
||
| 46 | $expected = '100'; |
||
| 47 | $actual = $loaded->getMoneyEmbeddable()->getMoney()->getAmount(); |
||
| 48 | $this->assertSame($expected, $actual); |
||
| 49 | } |
||
| 51 |