mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Changing default docType to 'html5'
This commit is contained in:
parent
c6f492d947
commit
72497147bd
2 changed files with 4 additions and 4 deletions
|
@ -169,7 +169,7 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function testDocType() {
|
public function testDocType() {
|
||||||
$result = $this->Html->docType();
|
$result = $this->Html->docType();
|
||||||
$expected = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
|
$expected = '<!DOCTYPE html>';
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
$result = $this->Html->docType('html4-strict');
|
$result = $this->Html->docType('html4-strict');
|
||||||
|
@ -662,7 +662,7 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
function testScriptAssetFilter() {
|
function testScriptAssetFilter() {
|
||||||
Configure::write('Asset.filter.js', 'js.php');
|
Configure::write('Asset.filter.js', 'js.php');
|
||||||
|
|
||||||
$result = $this->Html->script('jquery-1.3');
|
$result = $this->Html->script('jquery-1.3');
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'script' => array('type' => 'text/javascript', 'src' => 'cjs/jquery-1.3.js')
|
'script' => array('type' => 'text/javascript', 'src' => 'cjs/jquery-1.3.js')
|
||||||
|
|
|
@ -198,7 +198,7 @@ class HtmlHelper extends AppHelper {
|
||||||
* - html4-strict: HTML4 Strict.
|
* - html4-strict: HTML4 Strict.
|
||||||
* - html4-trans: HTML4 Transitional.
|
* - html4-trans: HTML4 Transitional.
|
||||||
* - html4-frame: HTML4 Frameset.
|
* - html4-frame: HTML4 Frameset.
|
||||||
* - html5: HTML5.
|
* - html5: HTML5. Default value.
|
||||||
* - xhtml-strict: XHTML1 Strict.
|
* - xhtml-strict: XHTML1 Strict.
|
||||||
* - xhtml-trans: XHTML1 Transitional.
|
* - xhtml-trans: XHTML1 Transitional.
|
||||||
* - xhtml-frame: XHTML1 Frameset.
|
* - xhtml-frame: XHTML1 Frameset.
|
||||||
|
@ -208,7 +208,7 @@ class HtmlHelper extends AppHelper {
|
||||||
* @return string Doctype string
|
* @return string Doctype string
|
||||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::docType
|
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::docType
|
||||||
*/
|
*/
|
||||||
public function docType($type = 'xhtml-strict') {
|
public function docType($type = 'html5') {
|
||||||
if (isset($this->_docTypes[$type])) {
|
if (isset($this->_docTypes[$type])) {
|
||||||
return $this->_docTypes[$type];
|
return $this->_docTypes[$type];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue