File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,22 @@ class AssertMassProductUpdateSuccessMessage extends AbstractConstraint
17
17
/**
18
18
* Text value to be checked.
19
19
*/
20
- const SUCCESS_MESSAGE = 'A total of 1 record(s) were updated. ' ;
20
+ const SUCCESS_MESSAGE = 'A total of %s record(s) were updated. ' ;
21
21
22
22
/**
23
23
* Assert that after mass update successful message appears.
24
24
*
25
25
* @param CatalogProductIndex $productGrid
26
+ * @param array $products
26
27
* @return void
27
28
*/
28
- public function processAssert (CatalogProductIndex $ productGrid )
29
+ public function processAssert (CatalogProductIndex $ productGrid, $ products = [] )
29
30
{
31
+ $ countProducts = count ($ products ) ? count ($ products ) : 1 ;
32
+ $ expectedMessage = sprintf (self ::SUCCESS_MESSAGE , $ countProducts );
30
33
$ actualMessage = $ productGrid ->getMessagesBlock ()->getSuccessMessages ();
31
34
\PHPUnit_Framework_Assert::assertEquals (
32
- self :: SUCCESS_MESSAGE ,
35
+ $ expectedMessage ,
33
36
$ actualMessage ,
34
37
'Wrong success message is displayed. '
35
38
);
You can’t perform that action at this time.
0 commit comments