@@ -84,18 +84,18 @@ public function testSaveAddressInformation()
8484 $ addressInformationMock ->expects ($ this ->once ())
8585 ->method ('getBillingAddress ' )
8686 ->willReturn ($ billingAddressMock );
87- $ shippingAddressMock ->expects ($ this ->exactly ( 2 ))
87+ $ shippingAddressMock ->expects ($ this ->once ( ))
8888 ->method ('getExtensionAttributes ' )
8989 ->willReturn (null );
9090 $ billingAddressMock ->expects ($ this ->once ())
9191 ->method ('getExtensionAttributes ' )
9292 ->willReturn (null );
9393 $ customerAddressMock = $ this ->createMock (Address::class);
94- $ this ->addressFactoryMock ->expects ($ this ->exactly ( 2 ))
94+ $ this ->addressFactoryMock ->expects ($ this ->once ( ))
9595 ->method ('create ' )
9696 ->willReturn ($ customerAddressMock );
9797 $ validatorMock = $ this ->createMock (ValidatorInterface::class);
98- $ this ->validatorFactoryMock ->expects ($ this ->exactly ( 2 ))
98+ $ this ->validatorFactoryMock ->expects ($ this ->once ( ))
9999 ->method ('createValidator ' )
100100 ->with ('customer_address ' , 'save ' )
101101 ->willReturn ($ validatorMock );
@@ -136,8 +136,6 @@ public function testSaveAddressInformationWithInvalidAddress()
136136 $ addressInformationMock ->expects ($ this ->once ())
137137 ->method ('getShippingAddress ' )
138138 ->willReturn ($ shippingAddressMock );
139- $ addressInformationMock ->expects ($ this ->never ())
140- ->method ('getBillingAddress ' );
141139 $ shippingAddressMock ->method ('getExtensionAttributes ' )->willReturn (null );
142140 $ customerAddressMock = $ this ->createMock (Address::class);
143141 $ this ->addressFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ customerAddressMock );
0 commit comments