test question") ;
$question = new Question("Damien Nortier", 24, 12, 3, 1) ;
print("test getContent.. ") ;
if($question->getContent() == "Damien Nortier"){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test getIdChapter.. ") ;
if($question->getIdChapter() == 24){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test getIdAnswerGood.. ") ;
if($question->getIdAnswerGood() == 12){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test setContent.. ") ;
$question->setContent("contenu") ;
if($question->getContent() == "contenu"){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test setIdAnswerGood.. ") ;
$question->setIdAnswerGood(1) ;
if($question->getIdAnswerGood() == 1){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test getDifficulty.. ") ;
if($question->getDifficulty() == 3){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test setDifficulty.. ") ;
$question->setDifficulty(24) ;
if($question->getDifficulty() == 24){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test getNbFails.. ") ;
if($question->getNbFails() == 1){
print("OK") ;
}
else{
print("ERREUR") ;
}
print("test setNbFails.. ") ;
$question->setNbFails(13) ;
if($question->getNbFails() == 13){
print("OK") ;
}
else{
print("ERREUR") ;
}
?>