@@ 151-160 (lines=10) @@ | ||
148 | /** |
|
149 | * @depends testView |
|
150 | */ |
|
151 | public function testUnsubscribe() |
|
152 | { |
|
153 | $this->client->request( |
|
154 | 'GET', |
|
155 | $this->getUrl('oro_magento_newsletter_subscriber_unsubscribe', ['id' => $this->getMainEntityId()]) |
|
156 | ); |
|
157 | ||
158 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
159 | $this->assertTrue($result['successful']); |
|
160 | } |
|
161 | ||
162 | /** |
|
163 | * @depends testUnsubscribe |
|
@@ 165-174 (lines=10) @@ | ||
162 | /** |
|
163 | * @depends testUnsubscribe |
|
164 | */ |
|
165 | public function testSubscribe() |
|
166 | { |
|
167 | $this->client->request( |
|
168 | 'GET', |
|
169 | $this->getUrl('oro_magento_newsletter_subscriber_subscribe', ['id' => $this->getMainEntityId()]) |
|
170 | ); |
|
171 | ||
172 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
173 | $this->assertTrue($result['successful']); |
|
174 | } |
|
175 | ||
176 | public function testUnsubscribeByCustomer() |
|
177 | { |
|
@@ 176-188 (lines=13) @@ | ||
173 | $this->assertTrue($result['successful']); |
|
174 | } |
|
175 | ||
176 | public function testUnsubscribeByCustomer() |
|
177 | { |
|
178 | $this->client->request( |
|
179 | 'GET', |
|
180 | $this->getUrl( |
|
181 | 'oro_magento_newsletter_subscriber_unsubscribe_customer', |
|
182 | ['id' => $this->subscriber->getCustomer()->getId()] |
|
183 | ) |
|
184 | ); |
|
185 | ||
186 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
187 | $this->assertTrue($result['successful']); |
|
188 | } |
|
189 | ||
190 | public function testSubscribeByCustomer() |
|
191 | { |
|
@@ 190-202 (lines=13) @@ | ||
187 | $this->assertTrue($result['successful']); |
|
188 | } |
|
189 | ||
190 | public function testSubscribeByCustomer() |
|
191 | { |
|
192 | $subscriber = $this->getReference('newsletter_subscriber3'); |
|
193 | $this->client->request( |
|
194 | 'GET', |
|
195 | $this->getUrl( |
|
196 | 'oro_magento_newsletter_subscriber_subscribe_customer', |
|
197 | ['id' => $subscriber->getCustomer()->getId()] |
|
198 | ) |
|
199 | ); |
|
200 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
201 | $this->assertTrue($result['successful']); |
|
202 | } |
|
203 | } |
|
204 |