/** * tearDown method * * @return void */ public function tearDown() { parent::tearDown(); unset($this->Number); I18n::locale($this->locale); Number::defaultCurrency(false); }
/** * Initialization hook method. * * Use this method to add common initialization code like loading components. * * e.g. `$this->loadComponent('Security');` * * @return void */ public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler'); $this->loadComponent('Flash'); $this->loadComponent('Auth', ['loginRedirect' => ['controller' => 'Annonces', 'action' => 'index'], 'logoutRedirect' => ['controller' => 'Users', 'action' => 'login'], 'authenticate' => ['Form' => ['fields' => ['username' => 'username', 'password' => 'password']]]]); Number::defaultCurrency('EUR'); }
/** * Getter/setter for default currency * * @param string|bool $currency Default currency string to be used by currency() * if $currency argument is not provided. If boolean false is passed, it will clear the * currently stored value * @return string Currency */ public function defaultCurrency($currency) { return $this->_engine->defaultCurrency($currency); }