Refactor rule => condition

adapter => facade
This commit is contained in:
gmorel
2013-11-23 18:35:21 +01:00
parent 59a04f6a09
commit 8ce1030178
11 changed files with 52 additions and 64 deletions

View File

@@ -27,6 +27,7 @@ use Thelia\Condition\ConditionEvaluator;
use Thelia\Condition\ConditionFactory;
use Thelia\Condition\Implementation\MatchForTotalAmountManager;
use Thelia\Condition\Operators;
use Thelia\Coupon\Type\RemoveXAmountManager;
use Thelia\Model\Coupon;
use Thelia\Model\CurrencyQuery;
@@ -192,9 +193,14 @@ Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesua
$stubFacade->expects($this->any())
->method('findOneCouponByCode')
->will($this->returnValue($expected));
$stubContainer->expects($this->any())
$stubContainer->expects($this->at(0))
->method('get')
->will($this->returnValue($stubFacade));
$couponManager = new RemoveXAmountManager();
$stubContainer->expects($this->at(1))
->method('get')
->will($this->returnValue($couponManager));
$stubContainer->expects($this->any())
->method('has')
->will($this->returnValue(true));