mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 01:39:58 +09:00
Updated unit tests - added input XML queries directly in the tests folder, instead of including them from core (for opage and syndication modules, which were removed).
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9786 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3928e8ec37
commit
ad7dda9b75
19 changed files with 646 additions and 113 deletions
|
|
@ -8,8 +8,7 @@ class ArgumentTest extends CubridTest {
|
|||
|
||||
public function testErrorMessageIsSent_NotNullCheck(){
|
||||
global $lang;
|
||||
include(_XE_PATH_.'common/lang/en.lang.php');
|
||||
|
||||
include(_TEST_PATH_ . "classes/xml/xmlquery/argument/data/en.lang.php");
|
||||
$page_argument = new Argument('page', $args->page);
|
||||
$page_argument->checkNotNull();
|
||||
$this->assertFalse($page_argument->isValid());
|
||||
|
|
@ -18,7 +17,7 @@ class ArgumentTest extends CubridTest {
|
|||
|
||||
public function testErrorMessageIsSent_MinLengthCheck(){
|
||||
global $lang;
|
||||
include(_XE_PATH_.'common/lang/en.lang.php');
|
||||
include(_TEST_PATH_ . "classes/xml/xmlquery/argument/data/en.lang.php");
|
||||
|
||||
$args->page = '123';
|
||||
$page_argument = new Argument('page', $args->page);
|
||||
|
|
@ -29,7 +28,7 @@ class ArgumentTest extends CubridTest {
|
|||
|
||||
public function testErrorMessageIsSent_MaxLengthCheck(){
|
||||
global $lang;
|
||||
include(_XE_PATH_.'common/lang/en.lang.php');
|
||||
include(_TEST_PATH_ . "classes/xml/xmlquery/argument/data/en.lang.php");
|
||||
|
||||
$args->page = '123';
|
||||
$page_argument = new Argument('page', $args->page);
|
||||
|
|
@ -215,7 +214,7 @@ class ArgumentTest extends CubridTest {
|
|||
$member_srl_argument = new ConditionArgument('"mid"', 'forum', 'like_prefix');
|
||||
$member_srl_argument->createConditionValue();
|
||||
|
||||
$this->assertEquals('forum%', $member_srl_argument->getValue());
|
||||
$this->assertEquals('\'forum%\'', $member_srl_argument->getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -225,7 +224,7 @@ class ArgumentTest extends CubridTest {
|
|||
$member_srl_argument = new ConditionArgument('"mid"', 'forum', 'like_tail');
|
||||
$member_srl_argument->createConditionValue();
|
||||
|
||||
$this->assertEquals('%forum', $member_srl_argument->getValue());
|
||||
$this->assertEquals('\'%forum\'', $member_srl_argument->getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -235,7 +234,7 @@ class ArgumentTest extends CubridTest {
|
|||
$member_srl_argument = new ConditionArgument('"mid"', 'forum', 'like');
|
||||
$member_srl_argument->createConditionValue();
|
||||
|
||||
$this->assertEquals('%forum%', $member_srl_argument->getValue());
|
||||
$this->assertEquals('\'%forum%\'', $member_srl_argument->getValue());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue