This commit is contained in:
lizandrogd
2026-01-21 08:47:04 -05:00
parent fe45578995
commit b4bcb35e96
5 changed files with 15 additions and 17 deletions
+7 -11
View File
@@ -369,23 +369,19 @@ class APITestSuite {
return "API get_chart_data correcta";
});
// Test get_recent_conversations.php
$this->apiTest("API get_recent_conversations existe", function() {
if (!file_exists(__DIR__ . '/../api/get_recent_conversations.php')) {
throw new Exception("get_recent_conversations.php no existe");
// Test get_recent_messages.php
$this->apiTest("API get_recent_messages existe", function() {
if (!file_exists(__DIR__ . '/../api/get_recent_messages.php')) {
throw new Exception("get_recent_messages.php no existe");
}
$content = file_get_contents(__DIR__ . '/../api/get_recent_conversations.php');
$content = file_get_contents(__DIR__ . '/../api/get_recent_messages.php');
if (strpos($content, 'requireAuthentication()') === false) {
throw new Exception("get_recent_conversations no requiere autenticación");
}
if (strpos($content, 'conversations') === false && strpos($content, 'conversations') === false) {
if (strpos($content, 'conversations') === false) {
throw new Exception("No consulta mensajes");
}
return "API get_recent_conversations correcta";
return "API get_recent_messages correcta";
});
// Test de integridad de datos