/** * Runs the test for a Tag::$function with $options * * @param string $function * @param mixed $options * @param string $expected * @param boolean $xhtml * @param string $set */ public function testFieldParameter($function, $options, $expected, $xhtml, $set = '') { Tag::resetInput(); if ($xhtml) { Tag::setDocType(Tag::XHTML10_STRICT); $expected .= ' />'; } else { Tag::setDocType(Tag::HTML5); $expected .= '>'; } if ($set) { Tag::displayTo('x_name', 'x_value'); } $actual = Tag::$function($options); if ($set) { Tag::$set('x_name', ''); } $this->assertEquals($expected, $actual); }
public static function setDocType($docType) { parent::setDocType($docType); }
public static function setDocType($doctype) { return parent::setDocType($doctype); }
public function testIssue1662() { $di = new Phalcon\DI\FactoryDefault(); \Phalcon\Tag::setDI($di); \Phalcon\Tag::setDocType(Phalcon\Tag::HTML5); $html = \Phalcon\Tag::getDocType(); $this->assertEquals($html, '<!DOCTYPE html>' . PHP_EOL); }
/** * Executed before each test * * @param IntegrationTester $I */ public function _before(IntegrationTester $I) { Tag::resetInput(); Tag::setDocType(Tag::HTML5); }