/** * @magentoDataFixture Magento/Newsletter/_files/subscribers.php * @magentoAppArea frontend */ public function testUnsubscribeSubscribeByCustomerId() { // Unsubscribe and verify $this->assertSame($this->_model, $this->_model->unsubscribeCustomerById(1)); $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $this->_model->getSubscriberStatus()); // Subscribe and verify $this->assertSame($this->_model, $this->_model->subscribeCustomerById(1)); $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->_model->getSubscriberStatus()); }