示例#1
0
 public function testGetSubscriptionObject()
 {
     $object = $this->_block->getSubscriptionObject();
     $this->assertInstanceOf('Magento\\Newsletter\\Model\\Subscriber', $object);
     $object2 = $this->_block->getSubscriptionObject();
     $this->assertSame($object, $object2);
 }
示例#2
0
 /**
  * @param bool $isNewsletterEnabled Determines if the newsletter is enabled
  * @param bool $expectedValue The expected value - Whether the newsletter is enabled or not
  *
  * @dataProvider isNewsletterEnabledProvider
  */
 public function testIsNewsletterEnabled($isNewsletterEnabled, $expectedValue)
 {
     $this->_formRegister->expects($this->once())->method('isNewsletterEnabled')->will($this->returnValue($isNewsletterEnabled));
     $this->assertEquals($expectedValue, $this->_block->isNewsletterEnabled());
 }