9 require_once
'PU_testcase_dcp_document.php';
24 foreach ($basics as $socTitle) {
26 $d1->setTitle($socTitle);
28 if (
$err !=
"")
return false;
46 $this->assertEmpty(
$err, sprintf(
"Simple query error %s",
$sql));
48 $this->assertEquals($expectedCount, count($result) , sprintf(
"Count must be %d (found %d) error %s", $expectedCount, count($result) ,
$sql));
67 $err = $e->getMessage();
69 $this->assertNotEmpty(
$err, sprintf(
"No error found in simple query %s",
$sql));
70 foreach ($expectedErrors as $errors) {
71 $this->assertContains($errors,
$err, sprintf(
"Not correct error for %s",
$sql));
84 $result =
"undefined";
85 $sql =
"select id from docread where false;";
88 $this->assertTrue(($result === $expectedResult) , sprintf(
"No the good return : %s, expect : %s", print_r($result,
true) , print_r($expectedResult,
true)));
105 $this->assertNotEmpty(
$err, sprintf(
"No error found in simple query %s",
$sql));
106 foreach ($expectedErrors as $errors) {
107 $this->assertContains($errors,
$err, sprintf(
"Not correct error for %s",
$sql));
118 "q" =>
"select * from users where id=%d",
120 self::getAction()->
user->id
132 "singleresult" =>
false,
133 "singlecolumn" =>
false,
137 "singleresult" =>
false,
138 "singlecolumn" =>
true,
142 "singleresult" =>
true,
143 "singlecolumn" =>
false,
147 "singleresult" =>
true,
148 "singlecolumn" =>
true,
161 "q" =>
"select * from users where id=%s",
testExecuteSimpleQuery($query, array $arg, $expectedCount)
testTolerantErrorSimpleQuery($query, array $arg, array $expectedErrors)
testReturnNothingSimpleQuery($singleResult, $singleColumn, $expectedResult)
testErrorSimpleQuery($query, array $arg, array $expectedErrors)
dataReturnNothingSimpleQuery()
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
if(($docid!==0)&&(!is_numeric($docid))) $query
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
if($file) if($subject==""&&$file) if($subject=="") $err