You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.7 KiB
73 lines
1.7 KiB
<?php
|
|
require_once("../business/Task.php");
|
|
require_once("../business/ListTask.php");
|
|
require_once("../dal/TaskGateway.php");
|
|
require_once("../model/TaskModel.php");
|
|
echo "<h1>2do test</h1>";
|
|
|
|
# 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=dbanboudoul', 'anboudoul', 'achanger');
|
|
|
|
# gateway
|
|
// $tgt = new TaskGateway($con);
|
|
//$tgt->insert($t);
|
|
//$tgt->delete('10');
|
|
//$taches = $tgt->findUserList('nifranco');
|
|
// foreach($taches as $t){
|
|
// echo $t->get_id()." ".$t->get_idList()."<br>";
|
|
// }
|
|
|
|
# test find
|
|
/*$tasks=$tgt->find('idList','001');
|
|
foreach($tasks as $i)
|
|
echo $i->get_id()."<br>"; */
|
|
|
|
# Test LOAD PRIVATE TASKS
|
|
$mt= new TaskModel($con);
|
|
$lists = $mt->loadPublicLists();
|
|
|
|
foreach($lists as $l){
|
|
echo 'List: '.$l->get_id()."<br>";
|
|
echo "Tasks: <br>";
|
|
foreach($l->get_taches() as $t){
|
|
echo $t->get_id()."<br>";
|
|
}
|
|
}
|
|
|
|
// $mt->addList('002','todo2','nifranco');
|
|
// $mt->modifList('2','nom','22do');
|
|
//mt->supList('2');
|
|
|
|
/* -------------
|
|
TEST ANNA
|
|
----------------*/
|
|
|
|
require('../dal/UserGateway.php');
|
|
require('../model/UserModel.php');
|
|
require('../controller/UserCtrl.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');
|
|
|
|
?>
|
|
|