Skip to content

Commit 9292a37

Browse files
committed
MC-29102: [2.4.x] [Magento Cloud] Customer receives newsletter unsubscription email after registering for new account
1 parent 97dfc74 commit 9292a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function testAfterSave(?int $originalStatus, ?bool $newValue, ?bool $expe
134134
}
135135
$this->subscriberFactory->method('create')->willReturn($subscriber);
136136

137-
$customerExtension = $this->getMockForAbstractClass(CustomerExtensionInterface::class);
137+
$customerExtension = $this->createPartialMock(CustomerExtensionInterface::class, ['getIsSubscribed']);
138138
$customerExtension->method('getIsSubscribed')->willReturn($newValue);
139139
/** @var CustomerInterface|MockObject $customer */
140140
$customer = $this->createMock(CustomerInterface::class);
@@ -152,7 +152,7 @@ public function testAfterSave(?int $originalStatus, ?bool $newValue, ?bool $expe
152152
$this->subscriptionManager->expects($this->never())->method('subscribeCustomer');
153153
$this->subscriptionManager->expects($this->never())->method('unsubscribeCustomer');
154154
}
155-
$resultExtension = $this->getMockForAbstractClass(CustomerExtensionInterface::class);
155+
$resultExtension = $this->createPartialMock(CustomerExtensionInterface::class, ['setIsSubscribed']);
156156
$resultExtension->expects($this->once())->method('setIsSubscribed')->with($resultIsSubscribed);
157157
/** @var CustomerInterface|MockObject $result */
158158
$result = $this->createMock(CustomerInterface::class);

0 commit comments

Comments
 (0)