/**
  * Checks "in" operation
  */
 public function testConditionString_In_VarcharArray()
 {
     $member_srl_argument = new ConditionArgument('"member_srl"', array('a', 'b', 'c'), 'in');
     $member_srl_argument->createConditionValue();
     $member_srl_argument->setColumnType('varchar');
     $tag = new ConditionWithArgument('"member_srl"', $member_srl_argument, 'in');
     $this->assertEquals(' "member_srl" in (\'a\',\'b\',\'c\')', $tag->toString());
 }
Esempio n. 2
0
 function testZeroValue()
 {
     $args->site_srl = 0;
     $site_srl_argument = new ConditionArgument('site_srl', $args->site_srl, 'equal');
     $site_srl_argument->checkNotNull();
     $site_srl_argument->createConditionValue();
     if (!$site_srl_argument->isValid()) {
         return $site_srl_argument->getErrorMessage();
     }
     $site_srl_argument->setColumnType('number');
     $condition = new ConditionWithArgument('"sites"."site_srl"', $site_srl_argument, "equal");
     $this->assertEquals(' "sites"."site_srl" = 0', $condition->toString());
 }