15
15
class ScheduledTest extends TestCase
16
16
{
17
17
/**
18
+ * @param string $indexer
18
19
* @param bool $rowValue
19
20
* @param string $class
20
21
* @param string $text
21
22
* @dataProvider typeProvider
22
23
*/
23
- public function testRender ($ rowValue , $ class , $ text )
24
+ public function testRender ($ indexer , $ rowValue , $ class , $ text )
24
25
{
25
26
$ html = '<span class=" ' . $ class . '"><span> ' . $ text . '</span></span> ' ;
26
27
$ row = new DataObject ();
@@ -32,6 +33,7 @@ public function testRender($rowValue, $class, $text)
32
33
$ model = new Scheduled ($ context );
33
34
$ column ->setGetter ('getValue ' );
34
35
$ row ->setValue ($ rowValue );
36
+ $ row ->setIndexerId ($ indexer );
35
37
$ model ->setColumn ($ column );
36
38
37
39
$ result = $ model ->render ($ row );
@@ -44,9 +46,12 @@ public function testRender($rowValue, $class, $text)
44
46
public function typeProvider ()
45
47
{
46
48
return [
47
- [true , 'grid-severity-notice ' , __ ('Update by Schedule ' )],
48
- [false , 'grid-severity-major ' , __ ('Update on Save ' )],
49
- ['' , 'grid-severity-major ' , __ ('Update on Save ' )],
49
+ ['customer_grid ' , true , 'grid-severity-major ' , __ ('Update by Schedule ' )],
50
+ ['customer_grid ' , false , 'grid-severity-notice ' , __ ('Update on Save ' )],
51
+ ['customer_grid ' , '' , 'grid-severity-notice ' , __ ('Update on Save ' )],
52
+ ['catalog_product_price ' , true , 'grid-severity-notice ' , __ ('Update by Schedule ' )],
53
+ ['catalog_product_price ' , false , 'grid-severity-major ' , __ ('Update on Save ' )],
54
+ ['catalog_product_price ' , '' , 'grid-severity-major ' , __ ('Update on Save ' )],
50
55
];
51
56
}
52
57
}
0 commit comments