@@ -117,22 +117,22 @@ public function testAfterChangeParent()
117
117
$ storeId = 0 ;
118
118
119
119
$ 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 ' )
121
121
->willReturn ($ storeId );
122
- $ this ->categoryMock ->expects ($ this ->any ( ))->method ('setStoreId ' )
122
+ $ this ->categoryMock ->expects ($ this ->exactly ( 2 ))->method ('setStoreId ' )
123
123
->willReturnOnConsecutiveCalls ($ storeId );
124
124
125
125
$ this ->categoryMock ->expects ($ this ->once ())->method ('getData ' )
126
126
->willReturnOnConsecutiveCalls ('1/3/5 ' , '1/3/5 ' );
127
127
$ this ->categoryMock ->expects ($ this ->once ())->method ('getOrigData ' )
128
128
->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 ' )
131
131
->with ($ this ->categoryMock , true )
132
132
->willReturnOnConsecutiveCalls ([$ this ->categoryMock ], [$ this ->categoryMock ], [], []);
133
133
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 ' )
136
136
->with ($ this ->categoryMock , 'url_path ' )->willReturnSelf ();
137
137
$ this ->categoryMock ->expects ($ this ->once ())->method ('getId ' )->willReturnSelf ();
138
138
@@ -145,9 +145,9 @@ public function testAfterChangeParent()
145
145
$ this ->categoryMock ->expects ($ this ->once ())->method ('setUrlKey ' )->with ('url-key ' )
146
146
->willReturnSelf ();
147
147
148
- $ this ->categoryUrlPathGeneratorMock ->expects ($ this ->any ( ))->method ('getUrlPath ' )
148
+ $ this ->categoryUrlPathGeneratorMock ->expects ($ this ->exactly ( 2 ))->method ('getUrlPath ' )
149
149
->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 );
151
151
152
152
$ this ->assertSame (
153
153
$ this ->subjectMock ,
0 commit comments