This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/tests/util/ktutil/testWhereToString.php

27 lines
587 B
PHP

<?php
require_once("../../../config/dmsDefaults.php");
require_once(KT_LIB_DIR . "/util/ktutil.inc");
$aSource = array(
array("active = ?", array(true)),
array("foo = ? AND asdf = ?", array(5, "ff")),
);
$aResults = KTUtil::whereToString($aSource);
$aExpectedResults = array(
"active = ? AND foo = ? AND asdf = ?",
array(true, 5, "ff"),
);
if ($aResults === $aExpectedResults) {
print "Success!\n";
} else {
print "Failure!\n";
print "Received: " . print_r($aResults, true) . "\n";
print "Expected: " . print_r($aExpectedResults, true) . "\n";
}
?>