mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Started unit tests for condition and argument classes.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8577 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7112d518c8
commit
76019a4b2b
15 changed files with 537 additions and 108 deletions
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Test class for QueryArgument.
|
||||
*/
|
||||
class QueryArgumentTest extends CubridTest {
|
||||
|
||||
var $xmlPath = "data/";
|
||||
|
||||
function QueryArgumentClass(){
|
||||
$this->xmlPath = str_replace('QueryArgumentTest.php', '', str_replace('\\', '/', __FILE__)) . $this->xmlPath;
|
||||
}
|
||||
|
||||
function testNotNullConditionArgument(){
|
||||
$xml_file = $this->xmlPath . "condition1.xml";
|
||||
$xml_obj = Helper::getXmlObject($xml_file);
|
||||
$tag = new QueryArgument($xml_obj->condition);
|
||||
|
||||
$this->assertEquals("member_srl", $tag->getArgumentName());
|
||||
$this->assertEquals("member_srl", $tag->getColumnName());
|
||||
$this->assertEquals(true, $tag->isConditionArgument());
|
||||
|
||||
$actual = $tag->toString();
|
||||
$expected = ' $member_srl_argument = new ConditionArgument(\'member_srl\', $args->member_srl, \'equal\');
|
||||
$member_srl_argument->checkNotNull();
|
||||
$member_srl_argument->createConditionValue();
|
||||
if(!$member_srl_argument->isValid()) return $member_srl_argument->getErrorMessage();';
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" />
|
||||
|
|
@ -0,0 +1 @@
|
|||
<index var="sort_index" default="list_order" order="order_type" />
|
||||
Loading…
Add table
Add a link
Reference in a new issue