Adding/Refactoring unit test for ConditionFactory/ConditionManagerAbstract
This commit is contained in:
@@ -54,7 +54,7 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
|
||||
protected $validators = array();
|
||||
|
||||
/** @var FacadeInterface Provide necessary value from Thelia */
|
||||
protected $adapter = null;
|
||||
protected $facade = null;
|
||||
|
||||
/** @var Translator Service Translator */
|
||||
protected $translator = null;
|
||||
@@ -71,13 +71,13 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param FacadeInterface $adapter Service adapter
|
||||
* @param FacadeInterface $facade Service Facade
|
||||
*/
|
||||
public function __construct(FacadeInterface $adapter)
|
||||
public function __construct(FacadeInterface $facade)
|
||||
{
|
||||
$this->adapter = $adapter;
|
||||
$this->translator = $adapter->getTranslator();
|
||||
$this->conditionValidator = $adapter->getConditionEvaluator();
|
||||
$this->facade = $facade;
|
||||
$this->translator = $facade->getTranslator();
|
||||
$this->conditionValidator = $facade->getConditionEvaluator();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,9 +181,9 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
|
||||
* @return bool
|
||||
* @throws \Thelia\Exception\InvalidConditionValueException
|
||||
*/
|
||||
protected function IsCurrencyValid($currencyValue)
|
||||
protected function isCurrencyValid($currencyValue)
|
||||
{
|
||||
$availableCurrencies = $this->adapter->getAvailableCurrencies();
|
||||
$availableCurrencies = $this->facade->getAvailableCurrencies();
|
||||
/** @var Currency $currency */
|
||||
$currencyFound = false;
|
||||
foreach ($availableCurrencies as $currency) {
|
||||
|
||||
Reference in New Issue
Block a user