@@ -210,9 +210,9 @@ public function testSaveNoSuchEntityException()
210210 $ this ->expectExceptionMessage ('No such entity with attribute_code = test attribute code ' );
211211 $ attributeMock = $ this ->createMock (Attribute::class);
212212 $ existingModelMock = $ this ->createMock (Attribute::class);
213- $ attributeMock ->expects ($ this ->once ())->method ('getAttributeId ' )->willReturn ('12 ' );
213+ $ attributeMock ->expects ($ this ->any ())->method ('getAttributeId ' )->willReturn ('12 ' );
214214 $ attributeCode = 'test attribute code ' ;
215- $ attributeMock ->expects ($ this ->once ())->method ('getAttributeCode ' )->willReturn ($ attributeCode );
215+ $ attributeMock ->expects ($ this ->any ())->method ('getAttributeCode ' )->willReturn ($ attributeCode );
216216 $ this ->eavAttributeRepositoryMock ->expects ($ this ->once ())
217217 ->method ('get ' )
218218 ->with (
@@ -234,7 +234,7 @@ public function testSaveInputExceptionRequiredField()
234234 Attribute::class,
235235 ['getFrontendLabels ' , 'getDefaultFrontendLabel ' , 'getAttributeId ' , 'setAttributeId ' ]
236236 );
237- $ attributeMock ->expects ($ this ->once ())->method ('getAttributeId ' )->willReturn (null );
237+ $ attributeMock ->expects ($ this ->any ())->method ('getAttributeId ' )->willReturn (null );
238238 $ attributeMock ->expects ($ this ->once ())->method ('setAttributeId ' )->with (null )->willReturnSelf ();
239239 $ attributeMock ->expects ($ this ->once ())->method ('getFrontendLabels ' )->willReturn (null );
240240 $ attributeMock ->expects ($ this ->once ())->method ('getDefaultFrontendLabel ' )->willReturn (null );
@@ -286,7 +286,7 @@ public function testSaveInputExceptionInvalidFieldValue()
286286 Attribute::class,
287287 ['getFrontendLabels ' , 'getDefaultFrontendLabel ' , 'getAttributeId ' , 'setAttributeId ' ]
288288 );
289- $ attributeMock ->expects ($ this ->once ())->method ('getAttributeId ' )->willReturn (null );
289+ $ attributeMock ->expects ($ this ->any ())->method ('getAttributeId ' )->willReturn (null );
290290 $ attributeMock ->expects ($ this ->once ())->method ('setAttributeId ' )->with (null )->willReturnSelf ();
291291 $ labelMock = $ this ->createMock (FrontendLabel::class);
292292 $ attributeMock ->expects ($ this ->any ())->method ('getFrontendLabels ' )->willReturn ([$ labelMock ]);
0 commit comments