<?php $DbId = "Test_createdb"; CreateTestApiCall("http://localhost:8000/Db/{$DbId}", "POST", "", "inResponse", "theRealStatus", $theTest, "var theRealStatus = 0;\n if (inResponse.data == \"Ok\")\n {\n " . GetJSForSendSynchroRequest("/Db/{$DbId}/UserMgr/New/myName/myLogin/myPassword", "POST", "") . "\n " . GetJSForSendSynchroRequest("/Db/{$DbId}/DocMgr/New/myTitle/2", "POST", "") . "\n " . GetJSForDumpingDbContent($DbId, "lDump") . "\n lExpectedResult = \"#Dump of Users:[[\\\"1\\\",\\\"myName\\\",\\\"myLogin\\\",\\\"myPassword\\\",\\\"\\\",\\\"0\\\"]]#Dump of Docs:[[\\\"1\\\",\\\"myTitle\\\",\\\"1\\\",\\\"2\\\",null,null]]#Dump of Links:[]\";\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");
<?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");