PHP Classes

File: tests/test_packet_cleanup.php

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   tests/test_packet_cleanup.php   Download  
File: tests/test_packet_cleanup.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 479 bytes
 

Contents

Class file image Download
<?php

require_once __DIR__ . '/../vendor/autoload.php';

use
BinktermPHP\BinkdProcessor;
use
BinktermPHP\Database;

echo
"Testing packet cleanup functionality...\n";

try {
   
$processor = new BinkdProcessor();
   
$deletedCount = $processor->cleanupOldPackets();
   
    echo
"Cleanup completed successfully!\n";
    echo
"Records deleted: $deletedCount\n";
   
} catch (
Exception $e) {
    echo
"Error: " . $e->getMessage() . "\n";
    exit(
1);
}

echo
"Test completed.\n";