dropboxlink.class.test.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. class TestDropBoxLink extends UnitTestCase {
  3. public function TestDropBoxLink() {
  4. $this->UnitTestCase('Test Drop Box Link');
  5. }
  6. public function __construct() {
  7. $this->UnitTestCase('Gradebook dropbox library - main/gradebook/lib/be/dropboxlink.class.test.php');
  8. // The constructor acts like a global setUp for the class
  9. TestManager::create_test_course('COURSEDROPBOXLINK');
  10. $this->dropbox = new DropboxLink();
  11. $this->dropbox->set_course_code('COURSEDROPBOXLINK');
  12. $this->dropbox->set_name('test');
  13. }
  14. public function testget_type_name() {
  15. $res = $this->dropbox->get_type_name();
  16. $this->assertTrue(is_string($res));
  17. //var_dump($res);
  18. }
  19. public function testget_view_url() {
  20. $stud_id = 1;
  21. $res = $this->dropbox->get_view_url($stud_id);
  22. //$this->assertTrue(is_null($res));
  23. //var_dump($res);
  24. }
  25. public function testis_allowed_to_change_name() {
  26. $res = $this->dropbox->is_allowed_to_change_name();
  27. $this->assertTrue(is_bool($res));
  28. //var_dump($res);
  29. }
  30. public function __destruct() {
  31. // The destructor acts like a global tearDown for the class
  32. TestManager::delete_test_course('COURSEDROPBOXLINK');
  33. }
  34. }
  35. ?>