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.
34 lines
1.1 KiB
34 lines
1.1 KiB
<?php
|
|
require("../Website/class/Answer.php") ;
|
|
print("<div align=\"center\"><font size=\"26\"><b>test answer</b></font></div></br>") ;
|
|
$answer = new Answer(2, "Damien", 5) ;
|
|
print("test getId.. ") ;
|
|
if($answer->getId() == 2){
|
|
print("<b><font color=\"green\">OK</font></b></br>") ;
|
|
}
|
|
else{
|
|
print("<b><font color=\"red\">ERREUR</font></b></br>") ;
|
|
}
|
|
print("test getContent.. ") ;
|
|
if($answer->getContent() == "Damien"){
|
|
print("<b><font color=\"green\">OK</font></b></br>") ;
|
|
}
|
|
else{
|
|
print("<b><font color=\"red\">ERREUR</font></b></br>") ;
|
|
}
|
|
print("test setContent.. ") ;
|
|
$answer->setContent("Nortier") ;
|
|
if($answer->getContent() == "Nortier"){
|
|
print("<b><font color=\"green\">OK</font></b></br>") ;
|
|
}
|
|
else{
|
|
print("<b><font color=\"red\">ERREUR</font></b></br>") ;
|
|
}
|
|
print("test getidQuestion.. ") ;
|
|
if($answer->getidQuestion() == 5){
|
|
print("<b><font color=\"green\">OK</font></b></br>") ;
|
|
}
|
|
else{
|
|
print("<b><font color=\"red\">ERREUR</font></b></br>") ;
|
|
}
|
|
?>
|