| # | Test | Result | Detail |
|---|---|---|---|
| 1 | getInstance() returns PDO | โ PASS | PDO |
| 2 | Singleton โ same PDO instance | โ PASS | |
| 3 | testConnection() success | โ PASS | Database connection successful |
| 4 | testConnection() database | โ PASS | chaincoz_360UAT |
| 5 | query() SELECT 1 | โ PASS | {"num":1} |
| 6 | query() with params | โ PASS | {"val":"chain360"} |
| 7 | inTransaction() false before begin | โ PASS | |
| 8 | inTransaction() true after begin | โ PASS | |
| 9 | inTransaction() false after commit | โ PASS | |
| 10 | rollBack() โ capital B, no error | โ PASS | |
| 11 | lastInsertId() callable | โ PASS | returned: '0' |
| 12 | getStats() โ no error key | โ PASS | |
| 13 | getStats() โ has tables key | โ PASS | {"database":"chaincoz_360UAT","tables":{"users":115,"assets":120,"workflows":25,"workflow_instances":39,"asset_allocations":106}} |
| 14 | getStats() โ users count | โ PASS | users=115 |
| 15 | getStats() โ no employees key | โ PASS | employees table should not be queried |
| 16 | __wakeup() throws Exception | โ PASS |
โ ๏ธ Delete test_database.php before deploying to production.