12
12
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
13
13
use Magento \Framework \View \Element \UiComponent \ContextInterface ;
14
14
15
+ /**
16
+ * Test for Magento\Catalog\Ui\Component\Product\MassAction class.
17
+ */
15
18
class MassActionTest extends \PHPUnit \Framework \TestCase
16
19
{
17
20
/**
@@ -34,6 +37,9 @@ class MassActionTest extends \PHPUnit\Framework\TestCase
34
37
*/
35
38
private $ massAction ;
36
39
40
+ /**
41
+ * @inheritdoc
42
+ */
37
43
protected function setUp ()
38
44
{
39
45
$ this ->objectManager = new ObjectManager ($ this );
@@ -48,11 +54,14 @@ protected function setUp()
48
54
[
49
55
'authorization ' => $ this ->authorizationMock ,
50
56
'context ' => $ this ->contextMock ,
51
- 'data ' => []
57
+ 'data ' => [],
52
58
]
53
59
);
54
60
}
55
61
62
+ /**
63
+ * @return void
64
+ */
56
65
public function testGetComponentName ()
57
66
{
58
67
$ this ->assertTrue ($ this ->massAction ->getComponentName () === MassAction::NAME );
@@ -214,6 +223,7 @@ public function getPrepareDataProvider() : array
214
223
* @param int $callNum
215
224
* @param string $resource
216
225
* @param bool $isAllowed
226
+ * @return void
217
227
* @dataProvider isActionAllowedDataProvider
218
228
*/
219
229
public function testIsActionAllowed (
@@ -231,7 +241,10 @@ public function testIsActionAllowed(
231
241
$ this ->assertEquals ($ expected , $ this ->massAction ->isActionAllowed ($ actionType ));
232
242
}
233
243
234
- public function isActionAllowedDataProvider ()
244
+ /**
245
+ * @return array
246
+ */
247
+ public function isActionAllowedDataProvider (): array
235
248
{
236
249
return [
237
250
'other ' => [true , 'other ' , 0 ,],
@@ -241,7 +254,6 @@ public function isActionAllowedDataProvider()
241
254
'status-not-allowed ' => [false , 'status ' , 1 , 'Magento_Catalog::products ' , false ],
242
255
'attributes-allowed ' => [true , 'attributes ' , 1 , 'Magento_Catalog::update_attributes ' ],
243
256
'attributes-not-allowed ' => [false , 'attributes ' , 1 , 'Magento_Catalog::update_attributes ' , false ],
244
-
245
257
];
246
258
}
247
259
}
0 commit comments