@@ -71,8 +71,8 @@ protected function setUp()
71
71
public function testToOptionArray ()
72
72
{
73
73
$ customerGroups = [
74
- ['label ' => __ ('ALL GROUPS ' ), 'value ' => 32000 ],
75
- ['label ' => __ ('NOT LOGGED IN ' ), 'value ' => 0 ]
74
+ ['label ' => __ ('ALL GROUPS ' ), 'value ' => ' 32000 ' ],
75
+ ['label ' => __ ('NOT LOGGED IN ' ), 'value ' => ' 0 ' ],
76
76
];
77
77
78
78
$ this ->moduleManagerMock ->expects ($ this ->any ())
@@ -95,11 +95,17 @@ public function testToOptionArray()
95
95
->setMethods (['getCode ' , 'getId ' ])
96
96
->getMockForAbstractClass ();
97
97
$ groupTest ->expects ($ this ->any ())->method ('getCode ' )->willReturn (__ ('NOT LOGGED IN ' ));
98
- $ groupTest ->expects ($ this ->any ())->method ('getId ' )->willReturn (0 );
98
+ $ groupTest ->expects ($ this ->any ())->method ('getId ' )->willReturn (' 0 ' );
99
99
$ groups = [$ groupTest ];
100
100
101
101
$ this ->searchResultMock ->expects ($ this ->any ())->method ('getItems ' )->willReturn ($ groups );
102
102
103
- $ this ->assertEquals ($ customerGroups , $ this ->model ->toOptionArray ());
103
+ $ actualCustomerGroups = $ this ->model ->toOptionArray ();
104
+
105
+ $ this ->assertEquals ($ customerGroups , $ actualCustomerGroups );
106
+
107
+ foreach ($ actualCustomerGroups as $ actualCustomerGroup ) {
108
+ $ this ->assertInternalType ('string ' , $ actualCustomerGroup ['value ' ]);
109
+ }
104
110
}
105
111
}
0 commit comments