File tree Expand file tree Collapse file tree 3 files changed +994
-1112
lines changed
Customer/Test/Unit/Model/StoreSwitcher
ProductAlert/Test/Unit/Model Expand file tree Collapse file tree 3 files changed +994
-1112
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public function testProcessShouldNotLoginCustomerIfNotRegisteredInTargetStore():
118118
119119 public function testProcessShouldThrowExceptionIfCustomerDoesNotExist (): void
120120 {
121- $ this ->expectErrorMessage ('Something went wrong. ' );
121+ $ this ->expectExceptionMessage ('Something went wrong. ' );
122122 $ data = ['customer_id ' => 1 ];
123123 $ this ->session ->expects ($ this ->never ())
124124 ->method ('setCustomerDataAsLoggedIn ' );
@@ -127,7 +127,7 @@ public function testProcessShouldThrowExceptionIfCustomerDoesNotExist(): void
127127
128128 public function testProcessShouldThrowExceptionIfAnErrorOccur (): void
129129 {
130- $ this ->expectErrorMessage ('Something went wrong. ' );
130+ $ this ->expectExceptionMessage ('Something went wrong. ' );
131131 $ data = ['customer_id ' => 2 ];
132132 $ this ->session ->expects ($ this ->never ())
133133 ->method ('setCustomerDataAsLoggedIn ' );
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function testGetWebsitesThrowsException(): void
8585 {
8686 $ message = 'get website exception ' ;
8787 $ this ->expectException (\Exception::class);
88- $ this ->expectErrorMessage ($ message );
88+ $ this ->expectExceptionMessage ($ message );
8989
9090 $ this ->scopeConfigMock ->method ('isSetFlag ' )->willReturn (false );
9191 $ this ->storeManagerMock ->method ('getWebsites ' )
@@ -103,7 +103,7 @@ public function testProcessPriceThrowsException(): void
103103 {
104104 $ message = 'create collection exception ' ;
105105 $ this ->expectException (\Exception::class);
106- $ this ->expectErrorMessage ($ message );
106+ $ this ->expectExceptionMessage ($ message );
107107
108108 $ groupMock = $ this ->createMock (\Magento \Store \Model \Group::class);
109109 $ storeMock = $ this ->createMock (Store::class);
@@ -131,7 +131,7 @@ public function testProcessStockThrowsException(): void
131131 {
132132 $ message = 'create collection exception ' ;
133133 $ this ->expectException (\Exception::class);
134- $ this ->expectErrorMessage ($ message );
134+ $ this ->expectExceptionMessage ($ message );
135135
136136 $ groupMock = $ this ->createMock (\Magento \Store \Model \Group::class);
137137 $ storeMock = $ this ->createMock (Store::class);
You can’t perform that action at this time.
0 commit comments