예제 #1
0
 public function testIndentationIsHonored()
 {
     $this->helper->setIndent(4);
     $this->helper->headTitle('foo');
     $string = $this->helper->toString();
     $this->assertContains('    <title>', $string);
 }
예제 #2
0
 public function testZF2918()
 {
     $this->helper->headTitle('Some Title');
     $this->helper->setPrefix('Prefix: ');
     $this->helper->setPostfix(' :Postfix');
     $this->assertEquals('<title>Prefix: Some Title :Postfix</title>', $this->helper->toString());
 }
예제 #3
0
 public function testCanPrependTitlesUsingDefaultAttachOrder()
 {
     $this->helper->setDefaultAttachOrder('PREPEND');
     $placeholder = $this->helper->headTitle('Foo');
     $placeholder = $this->helper->headTitle('Bar');
     $this->assertContains('BarFoo', $placeholder->toString());
 }
예제 #4
0
 /**
  * @see ZF-8036
  */
 public function testHeadTitleZero()
 {
     $this->helper->headTitle('0');
     $this->assertEquals('<title>0</title>', $this->helper->toString());
 }
예제 #5
0
 * Pull global site settings
 */
$config = new Zend_Config_Ini(CONFIG_PATH . '/settings.ini', 'production');
Zend_Registry::set('config', $config);
/*
 * Set view helpers
 */
$doctypeHelper = new Zend_View_Helper_Doctype();
$doctypeHelper->doctype('XHTML1_TRANSITIONAL');
$metaHelper = new Zend_View_Helper_HeadMeta();
$metaHelper->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8');
$metaHelper->appendHttpEquiv('pragma', 'no-cache');
$metaHelper->appendHttpEquiv('Cache-Control', 'no-cache');
$titleHelper = new Zend_View_Helper_HeadTitle();
$titleHelper->setSeparator(' - ');
$titleHelper->headTitle($config->defaults->title);
/*
 * Set up translators.
 */
$language = $currentUser->language == null ? $config->defaults->language : $currentUser->language;
$translate = new Zend_Translate('csv', LANGUAGE_PATH . '/' . $language . '.csv', $language);
Zend_Registry::set('Zend_Translate', $translate);
/*
 * Set the skin. If the skin doesn't exist then set the default skin.
 */
$skin = $currentUser->skin == null ? $config->defaults->skin : $currentUser->skin;
try {
    require_once APPLICATION_PATH . '/models/Skin.php';
    $skinTest = new Model_Skin($skin);
    unset($skinTest);
} catch (Exception $e) {