public function setUp() { parent::setUp(); $this->linkRepository = $this->objectManager->get('Ecodev\\Newsletter\\Domain\\Repository\\LinkRepository'); $this->emailRepository = $this->objectManager->get('Ecodev\\Newsletter\\Domain\\Repository\\EmailRepository'); // When testing we need to help the core by filling HTTP_HOST variable to be able to build correct URL $_SERVER['HTTP_HOST'] = 'example.com'; $_SERVER['SCRIPT_NAME'] = '/index.php'; }
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)); }
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]); }
public function setUp() { parent::setUp(); $this->newsletterRepository = $this->objectManager->get('Ecodev\\Newsletter\\Domain\\Repository\\NewsletterRepository'); }
public function setUp() { parent::setUp(); $this->bounceAccountRepository = $this->objectManager->get(\Ecodev\Newsletter\Domain\Repository\BounceAccountRepository::class); }
public function setUp() { parent::setUp(); $this->recipientListRepository = $this->objectManager->get(\Ecodev\Newsletter\Domain\Repository\RecipientListRepository::class); }