Issue 499: query xml > operation 에 and, or, xor 추가 건의

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9799 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-11-03 18:18:25 +00:00
parent c34090b7fb
commit 9ffb1b39a0
2 changed files with 53 additions and 1 deletions

View file

@ -51,6 +51,42 @@ class ConditionWithArgumentTest extends CubridTest {
$this->assertEquals(' "member_srl" in (\'a\',\'b\',\'c\')', $tag->toString());
}
/**
* Checks and operation
*/
public function testConditionString_And() {
$tag = new ConditionWithoutArgument('"member_srl"', "20", 'and', null);
$this->assertEquals(' "member_srl" & 20', $tag->toString());
}
/**
* Checks or operation
*/
public function testConditionString_Or() {
$tag = new ConditionWithoutArgument('"member_srl"', "20", 'or', null);
$this->assertEquals(' "member_srl" | 20', $tag->toString());
}
/**
* Checks xor operation
*/
public function testConditionString_Xor() {
$tag = new ConditionWithoutArgument('"member_srl"', "20", 'xor', null);
$this->assertEquals(' "member_srl" ^ 20', $tag->toString());
}
/**
* Checks not operation
*/
public function testConditionString_Not() {
$tag = new ConditionWithoutArgument('"member_srl"', "20", 'not', null);
$this->assertEquals(' "member_srl" ~ 20', $tag->toString());
}
}
?>