2do test";
# Test de la Gateway Tache
# nouvelle tache
$t = new Task(5,'tacheNotErr','desc.','urgent','001');
# connection
include("credentials.php");
$con = new Connection('mysql:host=localhost;dbname=phpproject',$user,$pass);
# gateway
$tgt = new TaskGateway($con);
//$tgt->insert($t);
//$tgt->delete('10');
# test find
/*$tasks=$tgt->find('idList','001');
foreach($tasks as $i)
echo $i->get_id()."
"; */
# Test du modele Tache
$mt= new TaskModel($con);
//$mt->addTask('3','testIsDone','desc.','urgent','001');
//$mt->modifTask('3','isDone','1');
//$tasks = $mt->getTaskBy('titre','tache1');
$tasks = $mt->getAllTask();
foreach($tasks as $i)
echo $i->get_id()."
";
$mt->addList('002','todo2','nifranco');
$mt->modifList('2','nom','22do');
//mt->supList('2');
/* -------------
TEST ANNA
----------------*/
require('../dal/UserGateway.php');
require('../model/UserModel.php');
// Test Gateway User
// $gat = new UserGateway($con);
// $gat->create('Nicolas', 'tranquilloubilou');
// $gat->updateLogin('Nicolas', 'RicharlisonR9');
// $gat->updateMdp('RicharlisonR9', 'hexachampion');
// $tab = $gat->find('RicharlisonR9', 'login');
// $gat->delete('RicharlisonR9');
// Test Modèle User
// $mdl = new UserModel($con);
// $mdl->ajouter('Anna', 'unmdptrescomplique');
// $mdl->modifLogin('Anna', 'Aeryn');
// $mdl->modifMdp('Aeryn', 'wtfmec');
// $mdl->supprimer('Aeryn');
?>