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.
ProjetPHP/tests/test.php

32 lines
796 B

<?php
require_once("../business/Task.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=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()."<br>"; */
# Test du modele Tache
$mt= new TaskModel($con);
$mt->addTask('6','tacheModel','desc.','urgent','001');
//$tasks = $mt->getTaskBy('titre','tache1');
//$tasks = $mt->getAllTask();
/*foreachh($tasks as $i)
echo $i->get_id()."<br>"; */