@@ -71,8 +71,8 @@ protected function setUp()
7171 public function testToOptionArray ()
7272 {
7373 $ 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 ' ],
7676 ];
7777
7878 $ this ->moduleManagerMock ->expects ($ this ->any ())
@@ -95,11 +95,17 @@ public function testToOptionArray()
9595 ->setMethods (['getCode ' , 'getId ' ])
9696 ->getMockForAbstractClass ();
9797 $ 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 ' );
9999 $ groups = [$ groupTest ];
100100
101101 $ this ->searchResultMock ->expects ($ this ->any ())->method ('getItems ' )->willReturn ($ groups );
102102
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+ }
104110 }
105111}
0 commit comments