@@ -68,7 +68,7 @@ protected function setUp()
68
68
'updateSubscription ' ,
69
69
'subscribeCustomerById ' ,
70
70
'unsubscribeCustomerById ' ,
71
- 'isSubscribed '
71
+ 'isSubscribed ' ,
72
72
]
73
73
)->disableOriginalConstructor ()
74
74
->getMock ();
@@ -77,14 +77,14 @@ protected function setUp()
77
77
->setMethods (['create ' ])
78
78
->getMock ();
79
79
$ this ->customerExtensionMock = $ this ->getMockBuilder (CustomerExtensionInterface::class)
80
- ->setMethods ([" getIsSubscribed " , " setIsSubscribed " ])
80
+ ->setMethods ([' getIsSubscribed ' , ' setIsSubscribed ' ])
81
81
->disableOriginalConstructor ()
82
82
->getMockForAbstractClass ();
83
83
$ this ->subscriberResourceMock = $ this ->getMockBuilder (Subscriber::class)
84
84
->disableOriginalConstructor ()
85
85
->getMock ();
86
86
$ this ->customerMock = $ this ->getMockBuilder (CustomerInterface::class)
87
- ->setMethods ([" getExtensionAttributes " ])
87
+ ->setMethods ([' getExtensionAttributes ' ])
88
88
->disableOriginalConstructor ()
89
89
->getMockForAbstractClass ();
90
90
$ this ->subscriberFactory ->expects ($ this ->any ())->method ('create ' )->willReturn ($ this ->subscriber );
@@ -104,6 +104,7 @@ protected function setUp()
104
104
* @param bool $subscriptionOriginalValue
105
105
* @param bool $subscriptionNewValue
106
106
* @dataProvider afterSaveDataProvider
107
+ * @return void
107
108
*/
108
109
public function testAfterSave ($ subscriptionOriginalValue , $ subscriptionNewValue )
109
110
{
@@ -137,9 +138,9 @@ public function testAfterSave($subscriptionOriginalValue, $subscriptionNewValue)
137
138
->willReturn ($ subscriptionNewValue );
138
139
139
140
if ($ subscriptionOriginalValue !== $ subscriptionNewValue ) {
140
- if ($ subscriptionNewValue === true ) {
141
+ if ($ subscriptionNewValue ) {
141
142
$ this ->subscriber ->expects ($ this ->once ())->method ('subscribeCustomerById ' )->with ($ customerId );
142
- } elseif ( $ subscriptionNewValue === false ) {
143
+ } else {
143
144
$ this ->subscriber ->expects ($ this ->once ())->method ('unsubscribeCustomerById ' )->with ($ customerId );
144
145
}
145
146
$ this ->subscriber ->expects ($ this ->once ())->method ('isSubscribed ' )->willReturn ($ subscriptionNewValue );
@@ -196,6 +197,7 @@ public function testAroundDeleteById()
196
197
* @param int|null $subscriberStatusValue
197
198
* @param bool $isSubscribed
198
199
* @dataProvider afterGetByIdDataProvider
200
+ * @return void
199
201
*/
200
202
public function testAfterGetByIdCreatesExtensionAttributesIfItIsNotSet (
201
203
$ subscriberStatusKey ,
0 commit comments