Exemple #1
0
 protected function setUp()
 {
     if (!Type::hasType('money')) {
         Type::addType('money', 'CSBill\\MoneyBundle\\Doctrine\\Types\\MoneyType');
         MoneyType::setCurrency(new Currency('USD'));
     }
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     /** @var Currency $currency */
     $currency = $this->container->get('currency');
     MoneyType::setCurrency($currency);
     MoneyHydrator::setCurrency($currency);
 }