21 lines
454 B
PHP
21 lines
454 B
PHP
<?php
|
|
|
|
namespace KupShop\OrderDiscountBundle\Tests;
|
|
|
|
trait OrderTestDiscountTrait
|
|
{
|
|
/**
|
|
* @return \Doctrine\DBAL\Driver\Statement|int
|
|
*
|
|
* @throws Exception
|
|
*/
|
|
protected function activateDiscount(array $ids)
|
|
{
|
|
return sqlQueryBuilder()
|
|
->update('order_discounts')
|
|
->directValues(['active' => 'Y'])
|
|
->where(\Query\Operator::inIntArray($ids, 'id'))
|
|
->execute();
|
|
}
|
|
}
|