Standardize on uppercase

This commit is contained in:
Kijin Sung 2016-01-11 16:44:10 +09:00
parent 4449d4ad72
commit d51ad8b4e5
16 changed files with 19 additions and 19 deletions

View file

@ -1,7 +1,7 @@
<?php <?php
require_once _XE_PATH_.'classes/file/FileHandler.class.php'; require_once _XE_PATH_.'classes/file/FileHandler.class.php';
require_once _XE_PATH_.'classes/template/TemplateHandler.class.php'; require_once _XE_PATH_.'classes/template/TemplateHandler.class.php';
$_SERVER['SCRIPT_NAME'] = '/xe/tests/unit/classes/template/index.php'; $_SERVER['SCRIPT_NAME'] = '/xe/tests/Unit/classes/template/index.php';
class TemplateHandlerTest extends \Codeception\TestCase\Test class TemplateHandlerTest extends \Codeception\TestCase\Test
{ {
@ -98,12 +98,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// #include // #include
array( array(
'<dummy /><!--#include("sample.html")--><div>This is another dummy</div>', '<dummy /><!--#include("sample.html")--><div>This is another dummy</div>',
'?><dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/unit/classes/template\',\'sample.html\') ?><div>This is another dummy</div>' '?><dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/Unit/classes/template\',\'sample.html\') ?><div>This is another dummy</div>'
), ),
// <include target="file"> // <include target="file">
array( array(
'<dummy /><include target="../sample.html" /><div>This is another dummy</div>', '<dummy /><include target="../sample.html" /><div>This is another dummy</div>',
'?><dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/unit/classes\',\'sample.html\') ?><div>This is another dummy</div>' '?><dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/Unit/classes\',\'sample.html\') ?><div>This is another dummy</div>'
), ),
// <load target="../../modules/page/lang/lang.xml"> // <load target="../../modules/page/lang/lang.xml">
array( array(
@ -113,12 +113,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// <load target="style.css"> // <load target="style.css">
array( array(
'<dummy /><load target="css/style.css" /><dummy />', '<dummy /><load target="css/style.css" /><dummy />',
'?><dummy /><!--#Meta:tests/unit/classes/template/css/style.css--><?php $__tmp=array(\'tests/unit/classes/template/css/style.css\',\'\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?><dummy />' '?><dummy /><!--#Meta:tests/Unit/classes/template/css/style.css--><?php $__tmp=array(\'tests/Unit/classes/template/css/style.css\',\'\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?><dummy />'
), ),
// <unload target="style.css"> // <unload target="style.css">
array( array(
'<dummy /><unload target="css/style.css" /><dummy />', '<dummy /><unload target="css/style.css" /><dummy />',
'?><dummy /><?php Context::unloadFile(\'tests/unit/classes/template/css/style.css\',\'\',\'\'); ?><dummy />' '?><dummy /><?php Context::unloadFile(\'tests/Unit/classes/template/css/style.css\',\'\',\'\'); ?><dummy />'
), ),
// <!--%import("../../modules/page/tpl/filter/insert_config.xml")--> // <!--%import("../../modules/page/tpl/filter/insert_config.xml")-->
array( array(
@ -128,12 +128,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// <!--%import("../script.js",type="body")--> // <!--%import("../script.js",type="body")-->
array( array(
'<dummy /><!--%import("../script.js",type="body")--><dummy />', '<dummy /><!--%import("../script.js",type="body")--><dummy />',
'?><dummy /><!--#Meta:tests/unit/classes/script.js--><?php $__tmp=array(\'tests/unit/classes/script.js\',\'body\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?><dummy />' '?><dummy /><!--#Meta:tests/Unit/classes/script.js--><?php $__tmp=array(\'tests/Unit/classes/script.js\',\'body\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?><dummy />'
), ),
// <!--%unload("../script.js",type="body")--> // <!--%unload("../script.js",type="body")-->
array( array(
'<dummy /><!--%unload("../script.js",type="body")--><dummy />', '<dummy /><!--%unload("../script.js",type="body")--><dummy />',
'?><dummy /><?php Context::unloadFile(\'tests/unit/classes/script.js\',\'\'); ?><dummy />' '?><dummy /><?php Context::unloadFile(\'tests/Unit/classes/script.js\',\'\'); ?><dummy />'
), ),
// comment // comment
array( array(
@ -148,7 +148,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// relative path1 // relative path1
array( array(
'<img src="http://naver.com/naver.gif"><input type="image" src="../local.gif" />', '<img src="http://naver.com/naver.gif"><input type="image" src="../local.gif" />',
'?><img src="http://naver.com/naver.gif"><input type="image" src="/xe/tests/unit/classes/local.gif" />' '?><img src="http://naver.com/naver.gif"><input type="image" src="/xe/tests/Unit/classes/local.gif" />'
), ),
// relative path2 // relative path2
array( array(
@ -213,7 +213,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 584 // issue 584
array( array(
'<img cond="$oBodex->display_extra_images[\'mobile\'] && $arr_extra && $arr_extra->bodex->mobile" src="./images/common/mobile.gif" title="mobile" alt="mobile" />', '<img cond="$oBodex->display_extra_images[\'mobile\'] && $arr_extra && $arr_extra->bodex->mobile" src="./images/common/mobile.gif" title="mobile" alt="mobile" />',
PHP_EOL . 'if($__Context->oBodex->display_extra_images[\'mobile\'] && $__Context->arr_extra && $__Context->arr_extra->bodex->mobile){ ?><img src="/xe/tests/unit/classes/template/images/common/mobile.gif" title="mobile" alt="mobile" /><?php } ?>' PHP_EOL . 'if($__Context->oBodex->display_extra_images[\'mobile\'] && $__Context->arr_extra && $__Context->arr_extra->bodex->mobile){ ?><img src="/xe/tests/Unit/classes/template/images/common/mobile.gif" title="mobile" alt="mobile" /><?php } ?>'
), ),
// issue 831 // issue 831
array( array(
@ -223,7 +223,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 746 // issue 746
array( array(
'<img src="../myxe/xe/img.png" />', '<img src="../myxe/xe/img.png" />',
'?><img src="/xe/tests/unit/classes/myxe/xe/img.png" />' '?><img src="/xe/tests/Unit/classes/myxe/xe/img.png" />'
), ),
// issue 696 // issue 696
array( array(
@ -233,35 +233,35 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// https://github.com/xpressengine/xe-core/issues/1510 // https://github.com/xpressengine/xe-core/issues/1510
array( array(
'<img cond="$foo->bar" src="../common/mobile.gif" />', '<img cond="$foo->bar" src="../common/mobile.gif" />',
PHP_EOL . 'if($__Context->foo->bar){ ?><img src="/xe/tests/unit/classes/common/mobile.gif" /><?php } ?>' PHP_EOL . 'if($__Context->foo->bar){ ?><img src="/xe/tests/Unit/classes/common/mobile.gif" /><?php } ?>'
), ),
// https://github.com/xpressengine/xe-core/issues/1510 // https://github.com/xpressengine/xe-core/issues/1510
array( array(
'<img cond="$foo->bar > 100" alt="a!@#$%^&*()_-=[]{}?/" src="../common/mobile.gif" />', '<img cond="$foo->bar > 100" alt="a!@#$%^&*()_-=[]{}?/" src="../common/mobile.gif" />',
PHP_EOL . 'if($__Context->foo->bar > 100){ ?><img alt="a!@#$%^&*()_-=[]{}?/" src="/xe/tests/unit/classes/common/mobile.gif" /><?php } ?>' PHP_EOL . 'if($__Context->foo->bar > 100){ ?><img alt="a!@#$%^&*()_-=[]{}?/" src="/xe/tests/Unit/classes/common/mobile.gif" /><?php } ?>'
), ),
// https://github.com/xpressengine/xe-core/issues/1510 // https://github.com/xpressengine/xe-core/issues/1510
array( array(
'<img src="../common/mobile.gif" cond="$foo->bar" />', '<img src="../common/mobile.gif" cond="$foo->bar" />',
PHP_EOL . 'if($__Context->foo->bar){ ?><img src="/xe/tests/unit/classes/common/mobile.gif" /><?php } ?>' PHP_EOL . 'if($__Context->foo->bar){ ?><img src="/xe/tests/Unit/classes/common/mobile.gif" /><?php } ?>'
), ),
// https://github.com/xpressengine/xe-core/issues/1510 // https://github.com/xpressengine/xe-core/issues/1510
array( array(
'<img class="tmp_class" cond="!$module_info->title" src="../img/common/blank.gif" />', '<img class="tmp_class" cond="!$module_info->title" src="../img/common/blank.gif" />',
PHP_EOL . 'if(!$__Context->module_info->title){ ?><img class="tmp_class" src="/xe/tests/unit/classes/img/common/blank.gif" /><?php } ?>' PHP_EOL . 'if(!$__Context->module_info->title){ ?><img class="tmp_class" src="/xe/tests/Unit/classes/img/common/blank.gif" /><?php } ?>'
), ),
// https://github.com/xpressengine/xe-core/issues/1510 // https://github.com/xpressengine/xe-core/issues/1510
array( array(
'<img cond="$mi->title" class="tmp_class"|cond="$mi->use" src="../img/common/blank.gif" />', '<img cond="$mi->title" class="tmp_class"|cond="$mi->use" src="../img/common/blank.gif" />',
PHP_EOL . 'if($__Context->mi->title){ ?><img<?php if($__Context->mi->use){ ?> class="tmp_class"<?php } ?> src="/xe/tests/unit/classes/img/common/blank.gif" /><?php } ?>' PHP_EOL . 'if($__Context->mi->title){ ?><img<?php if($__Context->mi->use){ ?> class="tmp_class"<?php } ?> src="/xe/tests/Unit/classes/img/common/blank.gif" /><?php } ?>'
), ),
array( array(
'<input foo="bar" /> <img cond="$foo->bar" alt="alt" src="../common/mobile.gif" />', '<input foo="bar" /> <img cond="$foo->bar" alt="alt" src="../common/mobile.gif" />',
'?><input foo="bar" /> <?php if($__Context->foo->bar){ ?><img alt="alt" src="/xe/tests/unit/classes/common/mobile.gif" /><?php } ?>' '?><input foo="bar" /> <?php if($__Context->foo->bar){ ?><img alt="alt" src="/xe/tests/Unit/classes/common/mobile.gif" /><?php } ?>'
), ),
array( array(
'<input foo="bar" />' . "\n" . '<input foo="bar" /> <img cond="$foo->bar" alt="alt" src="../common/mobile.gif" />', '<input foo="bar" />' . "\n" . '<input foo="bar" /> <img cond="$foo->bar" alt="alt" src="../common/mobile.gif" />',
'?><input foo="bar" />' . PHP_EOL . '<input foo="bar" /> <?php if($__Context->foo->bar){ ?><img alt="alt" src="/xe/tests/unit/classes/common/mobile.gif" /><?php } ?>' '?><input foo="bar" />' . PHP_EOL . '<input foo="bar" /> <?php if($__Context->foo->bar){ ?><img alt="alt" src="/xe/tests/Unit/classes/common/mobile.gif" /><?php } ?>'
), ),
array( array(
'asf <img src="{$foo->bar}" />', 'asf <img src="{$foo->bar}" />',
@ -269,11 +269,11 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
), ),
array( array(
'<img alt="" '.PHP_EOL.' src="../myxe/xe/img.png" />', '<img alt="" '.PHP_EOL.' src="../myxe/xe/img.png" />',
'?><img alt="" '.PHP_EOL.' src="/xe/tests/unit/classes/myxe/xe/img.png" />' '?><img alt="" '.PHP_EOL.' src="/xe/tests/Unit/classes/myxe/xe/img.png" />'
), ),
array( array(
'<input>asdf src="../img/img.gif" asdf</input> <img alt="src" src="../myxe/xe/img.png" /> <input>asdf src="../img/img.gif" asdf</input>', '<input>asdf src="../img/img.gif" asdf</input> <img alt="src" src="../myxe/xe/img.png" /> <input>asdf src="../img/img.gif" asdf</input>',
'?><input>asdf src="../img/img.gif" asdf</input> <img alt="src" src="/xe/tests/unit/classes/myxe/xe/img.png" /> <input>asdf src="../img/img.gif" asdf</input>' '?><input>asdf src="../img/img.gif" asdf</input> <img alt="src" src="/xe/tests/Unit/classes/myxe/xe/img.png" /> <input>asdf src="../img/img.gif" asdf</input>'
), ),
array( array(
'<input>asdf src="../img/img.gif" asdf</input>', '<input>asdf src="../img/img.gif" asdf</input>',