Merge branch 'develop' into pr/utf8mb4

Conflicts:
	tests/Install/AutoinstallCept.php
This commit is contained in:
Kijin Sung 2016-01-11 20:03:55 +09:00
commit e572b81b8a
42 changed files with 77 additions and 6133 deletions

View file

@ -5,11 +5,11 @@ modules:
PhpBrowser:
url: 'http://localhost:8000/'
DbDropTablesHelper:
dsn: 'mysql:host=127.0.0.1;dbname=xe_test'
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'root'
password: 'root'
Db:
dsn: 'mysql:host=127.0.0.1;dbname=xe_test'
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'root'
password: 'root'
cleanup: true
@ -18,11 +18,11 @@ env:
modules:
config:
Db:
dsn: 'mysql:host=127.0.0.1;dbname=xe_test'
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'
cleanup: true
DbDropTablesHelper:
dsn: 'mysql:host=127.0.0.1;dbname=xe_test'
dsn: 'mysql:host=localhost;dbname=rhymix'
user: 'travis'
password: 'travis'

View file

@ -28,7 +28,7 @@ $install_config = array(
'db_userid' => $dbinfo['user'],
'db_password' => $dbinfo['password'],
'db_database' => $dbinfo['dbname'],
'db_table_prefix' =>'xe_',
'db_table_prefix' =>'rx',
'db_charset' => 'utf8',
'use_rewrite' =>'N',
'time_zone' =>'0900',

View file

@ -14,7 +14,7 @@ $dbinfo = [
'type' => $db_type,
'user' => $db_config['user'],
'password' => $db_config['password'],
'dbname' => 'xe_install',
'dbname' => 'rhymix',
'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306),
];
foreach($dsn as $piece) {
@ -27,7 +27,7 @@ if(\Filehandler::exists(_XE_PATH_ . 'config/install.config.php')) {
}
// Step 1 : License Agreement
$I->wantTo('Install XE Core');
$I->wantTo('Install RhymiX');
$I->amOnPage('/index.php?l=ko');
$I->setCookie('l', 'ko');
$I->seeElement('//div[@id="progress"]/ul/li[1][@class="active"]');
@ -50,7 +50,7 @@ $I->submitForm('#body', [
'db_userid' => $dbinfo['user'],
'db_password' => $dbinfo['password'],
'db_database' => $dbinfo['dbname'],
'db_table_prefix' => 'xe'
'db_table_prefix' => 'rx'
]);
// Step 4 : Create Admin Account

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
<?php
require_once _XE_PATH_.'classes/file/FileHandler.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
{
@ -98,12 +98,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// #include
array(
'<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">
array(
'<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">
array(
@ -113,12 +113,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// <load target="style.css">
array(
'<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">
array(
'<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")-->
array(
@ -128,12 +128,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// <!--%import("../script.js",type="body")-->
array(
'<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")-->
array(
'<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
array(
@ -148,7 +148,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// relative path1
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="/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
array(
@ -213,7 +213,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 584
array(
'<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
array(
@ -223,7 +223,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 746
array(
'<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
array(
@ -233,35 +233,35 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// https://github.com/xpressengine/xe-core/issues/1510
array(
'<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
array(
'<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
array(
'<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
array(
'<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
array(
'<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(
'<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(
'<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(
'asf <img src="{$foo->bar}" />',
@ -269,11 +269,11 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
),
array(
'<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(
'<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(
'<input>asdf src="../img/img.gif" asdf</input>',

View file

@ -1,300 +0,0 @@
<?php //[STAMP] 3dec2fc1382a9643e3c2a5f6e95c8413
// This class was automatically generated by build task
// You should not change it manually as it will be overwritten on next build
// @codingStandardsIgnoreFile
use Codeception\Module\Asserts;
use Codeception\Module\UnitHelper;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method void haveFriend($name, $actorClass = null)
*
* @SuppressWarnings(PHPMD)
*/
class UnitTester extends \Codeception\Actor
{
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that two variables are equal.
*
* @param $expected
* @param $actual
* @param string $message
*
* @return mixed
* @see \Codeception\Module\Asserts::assertEquals()
*/
public function assertEquals($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that two variables are not equal
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertNotEquals()
*/
public function assertNotEquals($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that two variables are same
*
* @param $expected
* @param $actual
* @param string $message
*
* @return mixed
* @see \Codeception\Module\Asserts::assertSame()
*/
public function assertSame($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that two variables are not same
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertNotSame()
*/
public function assertNotSame($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that actual is greater than expected
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertGreaterThan()
*/
public function assertGreaterThan($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* @deprecated
* @see \Codeception\Module\Asserts::assertGreaterThen()
*/
public function assertGreaterThen($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that actual is greater or equal than expected
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
*/
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* @deprecated
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
*/
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that actual is less than expected
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertLessThan()
*/
public function assertLessThan($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that actual is less or equal than expected
*
* @param $expected
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
*/
public function assertLessThanOrEqual($expected, $actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that haystack contains needle
*
* @param $needle
* @param $haystack
* @param string $message
* @see \Codeception\Module\Asserts::assertContains()
*/
public function assertContains($needle, $haystack, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that haystack doesn't contain needle.
*
* @param $needle
* @param $haystack
* @param string $message
* @see \Codeception\Module\Asserts::assertNotContains()
*/
public function assertNotContains($needle, $haystack, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that variable is empty.
*
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertEmpty()
*/
public function assertEmpty($actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that variable is not empty.
*
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertNotEmpty()
*/
public function assertNotEmpty($actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that variable is NULL
*
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertNull()
*/
public function assertNull($actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that variable is not NULL
*
* @param $actual
* @param string $message
* @see \Codeception\Module\Asserts::assertNotNull()
*/
public function assertNotNull($actual, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that condition is positive.
*
* @param $condition
* @param string $message
* @see \Codeception\Module\Asserts::assertTrue()
*/
public function assertTrue($condition, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that condition is negative.
*
* @param $condition
* @param string $message
* @see \Codeception\Module\Asserts::assertFalse()
*/
public function assertFalse($condition, $message = null) {
return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
}
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Fails the test with message.
*
* @param $message
* @see \Codeception\Module\Asserts::fail()
*/
public function fail($message) {
return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));
}
}