예제 #1
0
파일: Unit.php 프로젝트: phalcon/cphalcon
 /**
  * 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);
 }
예제 #2
0
파일: Tag.php 프로젝트: mattvb91/cphalcon
 public static function setDocType($docType)
 {
     parent::setDocType($docType);
 }
예제 #3
0
파일: Tag.php 프로젝트: lisong/cphalcon
 public static function setDocType($doctype)
 {
     return parent::setDocType($doctype);
 }
예제 #4
0
 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);
 }
예제 #5
0
 /**
  * Executed before each test
  *
  * @param IntegrationTester $I
  */
 public function _before(IntegrationTester $I)
 {
     Tag::resetInput();
     Tag::setDocType(Tag::HTML5);
 }