Esempio n. 1
0
 public function setUp()
 {
     parent::setUp();
     $this->mockNewsletter = $this->getMock('Ecodev\\Newsletter\\Domain\\Model\\Newsletter', array('getDomain', 'getSenderName', 'getSenderEmail', 'getValidatedContent', 'getInjectOpenSpy', 'getInjectLinksSpy'), array(), '', false);
     $this->mockNewsletter->method('getDomain')->will($this->returnValue('example.com'));
     $this->mockNewsletter->method('getSenderName')->will($this->returnValue('John Connor'));
     $this->mockNewsletter->method('getSenderEmail')->will($this->returnValue('*****@*****.**'));
     $this->mockEmail = $this->getMock('Ecodev\\Newsletter\\Domain\\Model\\Email', array('s'), array(), '', false);
     $this->mockEmail->setRecipientData(array('email' => '*****@*****.**', 'my_custom_field' => 'my custom value', 'boolean_false' => false, 'boolean_true' => true, 'integer_false' => 0, 'integer_true' => 1, 'string_false' => '', 'string_true' => 'foo'));
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['newsletter'] = serialize(array('attach_images' => true));
 }
Esempio n. 2
0
 public function setUp()
 {
     parent::setUp();
     $bounceAccount = new \Ecodev\Newsletter\Domain\Model\BounceAccount();
     $bounceAccount->setEmail('*****@*****.**');
     $this->mockNewsletter = $this->getMock(\Ecodev\Newsletter\Domain\Model\Newsletter::class, ['getUid', 'getPid', 'getBaseUrl', 'getSenderName', 'getSenderEmail', 'getBounceAccount', 'getValidatedContent', 'getInjectOpenSpy', 'getInjectLinksSpy'], [], '', false);
     $this->mockNewsletter->method('getUid')->will($this->returnValue(12345));
     $this->mockNewsletter->method('getBaseUrl')->will($this->returnValue('http://example.com'));
     $this->mockNewsletter->method('getSenderName')->will($this->returnValue('John Connor'));
     $this->mockNewsletter->method('getSenderEmail')->will($this->returnValue('*****@*****.**'));
     $this->mockNewsletter->method('getBounceAccount')->will($this->returnValue($bounceAccount));
     $this->mockEmail = $this->getMock(\Ecodev\Newsletter\Domain\Model\Email::class, ['getPid', 'getRecipientAddress', 'getAuthCode'], [], '', false);
     $this->mockEmail->method('getRecipientAddress')->will($this->returnValue('*****@*****.**'));
     $this->mockEmail->method('getAuthCode')->will($this->returnValue('1621db76eb1e4352719c95f3ba617990'));
     $this->mockEmail->setRecipientData(['email' => '*****@*****.**', 'my_custom_field' => 'my custom value', 'boolean_false' => false, 'boolean_true' => true, 'integer_false' => 0, 'integer_true' => 1, 'string_false' => '', 'string_true' => 'foo']);
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['newsletter'] = serialize(['attach_images' => true]);
 }
Esempio n. 3
0
 /**
  * @test
  */
 public function setRecipientDataForStringSetsRecipientData()
 {
     $this->subject->setRecipientData(array('data1', 'data2'));
     $this->assertEquals(array('data1', 'data2'), $this->subject->getRecipientData());
 }
Esempio n. 4
0
 /**
  * @test
  */
 public function setRecipientDataForStringSetsRecipientData()
 {
     $this->subject->setRecipientData(['data1', 'data2']);
     $this->assertSame(['data1', 'data2'], $this->subject->getRecipientData());
 }