示例#1
0
}
////////////////////////////
//Classes UNIT TESTS
////////////////////////////
printf("/////////////////////////////////\n");
printf("STARTING Classes UNIT TESTS\n");
printf("/////////////////////////////////\n");
//construct empty class
$class = new Classes();
//add a class
$class->addClass("Calculus I", "Math");
unset($class);
//get class from db
$class2 = new Classes("Calculus I");
//get subject for class
$my_subject = $class2->getSubject();
printf("Calculus I subject is: %s\n", $my_subject);
//get A to Z class list
$orderedArray = $class2->getAZClassList();
printf("Ordered Classes: \n");
foreach ($orderedArray as $class_val) {
    printf("%s\n", $class_val);
}
//get A to Z class list for specific subject
$orderedArray = $class2->getClassBySubject("Math");
printf("Ordered Classes by Subject - Math: \n");
foreach ($orderedArray as $class_val) {
    printf("%s\n", $class_val);
}
////////////////////////////
//Document UNIT TESTS