Skip to content

Commit 741b8f2

Browse files
faraz-glsreenia806
authored andcommitted
AC-8753: Coupon quantity generation checks
* Static test fixes
1 parent 03dc06d commit 741b8f2

File tree

1 file changed

+12
-1
lines changed
  • app/code/Magento/SalesRule/Test/Unit/Controller/Adminhtml/Promo/Quote

1 file changed

+12
-1
lines changed

app/code/Magento/SalesRule/Test/Unit/Controller/Adminhtml/Promo/Quote/GenerateTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
use Magento\Framework\App\Response\Http as HttpResponse;
3232

3333
/**
34+
* Class for testing coupon generation
35+
*
3436
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
37+
* @SuppressWarnings(PHPMD.TooManyFields)
3538
*/
3639
class GenerateTest extends TestCase
3740
{
@@ -41,12 +44,18 @@ class GenerateTest extends TestCase
4144
/** @const XML_COUPON_QUANTITY_TEST_VALUE */
4245
private const XML_COUPON_QUANTITY_TEST_VALUE = 250000;
4346

47+
/**
48+
* @var array
49+
*/
4450
private array $requestMockData = [
4551
'qty' => 2,
4652
'length' => 10,
4753
'rule_id' => 1
4854
];
4955

56+
/**
57+
* @var array
58+
*/
5059
private array $requestMockDataWithInvalidCouponQuantity = [
5160
'qty' => 250001,
5261
'length' => 10,
@@ -414,7 +423,9 @@ public function testExecuteWithInvalidCouponQuantity()
414423
$helperData->expects($this->once())
415424
->method('jsonEncode')
416425
->with([
417-
'messages' => __('Coupon qty should be less than or equal to the coupon qty in the store configuration.')
426+
'messages' => __(
427+
'Coupon qty should be less than or equal to the coupon qty in the store configuration.'
428+
)
418429
]);
419430
$layout = $this->getMockBuilder(Layout::class)
420431
->disableOriginalConstructor()

0 commit comments

Comments
 (0)