Source for file Template.php
Documentation is available at Template.php
* Magentron EmailImages Extension
* @package Magentron_EmailImages
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* Test getMail() function
// model for email/template should have been rewritten as Magentron_EmailImages_Model_Newsletter_Template
$template =
Mage::getModel('newsletter/template');
$this->assertEquals('Magentron_EmailImages_Model_Newsletter_Template', get_class($template), 'newsletter/template model');
// at the beginning the protected variable $_mail should be null
$variables = (array)
$template;
$this->assertFalse(IsSet
($variables['\x00*\x00_mail']), 'variable $_mail should be null');
// when called it should return a Magentron_EmailImages_Model_Mail object instance
$mail =
$template->getMail();
$this->assertEquals('Magentron_EmailImages_Model_Mail', get_class($mail), 'returned mail object instance');
// at the end the protected variable $_mail should be equal to the returned value
$variables = (array)
$template;
$this->assertEquals($mail, $variables["\x00*\x00_mail"], 'variable $_mail should be equal to the returned mail object instance');
Documentation generated on Fri, 09 Oct 2015 03:37:10 +0200 by phpDocumentor 1.4.4