<?php
require_once("../includes/config.inc.php");
require_once("../includes/FileDataAccess.inc.php");

$fda = new FileDataAccess(getDBLink());

echo("<h3>TEST insertFile()</h3>");
$file = array();
$file['fileId'] = 1;
$file['fileName'] = "test.png";
$file['fileDescription'] = "test description";
$file['fileExtension'] = "png";
$file['fileSize'] = "1000";

$file = $fda->insertFile($file);
var_dump($file);

echo("<h3>TEST getFileList()</h3>");
$fileList = $fda->getFileList();
var_dump($fileList);




echo("<h3>TEST getFileById()</h3>");
$file = $fda->getFileById($file['fileId']);
var_dump($file);





echo("<h3>TEST updateFile()</h3>");
$file['fileName'] = "Updated File Name";
$file = $fda->updateFile($file);
var_dump($file);