@@ -84,18 +84,18 @@ public function testSaveAddressInformation()
84
84
$ addressInformationMock ->expects ($ this ->once ())
85
85
->method ('getBillingAddress ' )
86
86
->willReturn ($ billingAddressMock );
87
- $ shippingAddressMock ->expects ($ this ->exactly ( 2 ))
87
+ $ shippingAddressMock ->expects ($ this ->once ( ))
88
88
->method ('getExtensionAttributes ' )
89
89
->willReturn (null );
90
90
$ billingAddressMock ->expects ($ this ->once ())
91
91
->method ('getExtensionAttributes ' )
92
92
->willReturn (null );
93
93
$ customerAddressMock = $ this ->createMock (Address::class);
94
- $ this ->addressFactoryMock ->expects ($ this ->exactly ( 2 ))
94
+ $ this ->addressFactoryMock ->expects ($ this ->once ( ))
95
95
->method ('create ' )
96
96
->willReturn ($ customerAddressMock );
97
97
$ validatorMock = $ this ->createMock (ValidatorInterface::class);
98
- $ this ->validatorFactoryMock ->expects ($ this ->exactly ( 2 ))
98
+ $ this ->validatorFactoryMock ->expects ($ this ->once ( ))
99
99
->method ('createValidator ' )
100
100
->with ('customer_address ' , 'save ' )
101
101
->willReturn ($ validatorMock );
@@ -136,8 +136,6 @@ public function testSaveAddressInformationWithInvalidAddress()
136
136
$ addressInformationMock ->expects ($ this ->once ())
137
137
->method ('getShippingAddress ' )
138
138
->willReturn ($ shippingAddressMock );
139
- $ addressInformationMock ->expects ($ this ->never ())
140
- ->method ('getBillingAddress ' );
141
139
$ shippingAddressMock ->method ('getExtensionAttributes ' )->willReturn (null );
142
140
$ customerAddressMock = $ this ->createMock (Address::class);
143
141
$ this ->addressFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ customerAddressMock );
0 commit comments