@@ -117,22 +117,22 @@ public function testAfterChangeParent()
117117 $ storeId = 0 ;
118118
119119 $ this ->storeManagerMock ->expects ($ this ->once ())->method ('hasSingleStore ' )->willReturn (false );
120- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('getStoreId ' )
120+ $ this ->categoryMock ->expects ($ this ->exactly ( 3 ))->method ('getStoreId ' )
121121 ->willReturn ($ storeId );
122- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('setStoreId ' )
122+ $ this ->categoryMock ->expects ($ this ->exactly ( 2 ))->method ('setStoreId ' )
123123 ->willReturnOnConsecutiveCalls ($ storeId );
124124
125125 $ this ->categoryMock ->expects ($ this ->once ())->method ('getData ' )
126126 ->willReturnOnConsecutiveCalls ('1/3/5 ' , '1/3/5 ' );
127127 $ this ->categoryMock ->expects ($ this ->once ())->method ('getOrigData ' )
128128 ->willReturnOnConsecutiveCalls ('1/2/5 ' , '1/2/5 ' );
129- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('unsUrlPath ' )->willReturnSelf ();
130- $ this ->childrenCategoriesProviderMock ->expects ($ this ->any ( ))->method ('getChildren ' )
129+ $ this ->categoryMock ->expects ($ this ->exactly ( 4 ))->method ('unsUrlPath ' )->willReturnSelf ();
130+ $ this ->childrenCategoriesProviderMock ->expects ($ this ->exactly ( 2 ))->method ('getChildren ' )
131131 ->with ($ this ->categoryMock , true )
132132 ->willReturnOnConsecutiveCalls ([$ this ->categoryMock ], [$ this ->categoryMock ], [], []);
133133
134- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('getResource ' )->willReturn ($ this ->subjectMock );
135- $ this ->subjectMock ->expects ($ this ->any ( ))->method ('saveAttribute ' )
134+ $ this ->categoryMock ->expects ($ this ->exactly ( 4 ))->method ('getResource ' )->willReturn ($ this ->subjectMock );
135+ $ this ->subjectMock ->expects ($ this ->exactly ( 4 ))->method ('saveAttribute ' )
136136 ->with ($ this ->categoryMock , 'url_path ' )->willReturnSelf ();
137137 $ this ->categoryMock ->expects ($ this ->once ())->method ('getId ' )->willReturnSelf ();
138138
@@ -145,9 +145,9 @@ public function testAfterChangeParent()
145145 $ this ->categoryMock ->expects ($ this ->once ())->method ('setUrlKey ' )->with ('url-key ' )
146146 ->willReturnSelf ();
147147
148- $ this ->categoryUrlPathGeneratorMock ->expects ($ this ->any ( ))->method ('getUrlPath ' )
148+ $ this ->categoryUrlPathGeneratorMock ->expects ($ this ->exactly ( 2 ))->method ('getUrlPath ' )
149149 ->with ($ this ->categoryMock )->willReturn ($ urlPath );
150- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('setUrlPath ' )->with ($ urlPath );
150+ $ this ->categoryMock ->expects ($ this ->exactly ( 2 ))->method ('setUrlPath ' )->with ($ urlPath );
151151
152152 $ this ->assertSame (
153153 $ this ->subjectMock ,
0 commit comments