function GetJSForDumpingDbContent($inDbPrefix, $outResultVarName)
{
    return GetJSResultForSendSynchroRequest("/Db/{$inDbPrefix}/Archive", "GET", "", $outResultVarName, "FAILED");
}
Пример #2
0
<?php

$DbId = "Test_gettextcontent";
CreateTestApiCall("http://localhost:8000/Db/{$DbId}", "POST", "", "inResponse", "theRealStatus", $theTest, "var theRealStatus = 0;\n                    if (inResponse.data == \"Ok\")\n                    {\n                       " . GetJSForSendSynchroRequest("/Db/{$DbId}/DocMgr/New/myTitle/2", "POST", "") . "\n                       " . GetJSForSendSynchroRequest("/Db/{$DbId}/DocMgr/List/1/TextContent", "POST", "Content=TextContent") . "\n                       " . GetJSResultForSendSynchroRequest("/Db/{$DbId}/DocMgr/List/1/TextContent", "GET", "", "lDump", "Error: connection failed") . "\n                       lExpectedResult = \"[[\\\"TextContent\\\"]]\";\n                       //console.log(\"Dump ! (dump: .\"+lDump+\". vs .\"+lExpectedResult+\".\");\n                       theRealStatus = (lDump === lExpectedResult);\n                       //console.log(\"theRealStatus:\"+theRealStatus);\n                       inResponse.data = \"Failed to match reference: \"+lDump+\" VS expected: \"+lExpectedResult;\n                    }\n                    else\n                    {\n                       //console.log(\"no dump: .\"+inResponse.data+\".\");\n                    }\n");