dropboxlink.class.test.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/gradebookitem.class.php';
  3. require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/abstractlink.class.php';
  4. require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/evallink.class.php';
  5. require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/evaluation.class.php';
  6. class TestDropBoxLink extends UnitTestCase {
  7. public function TestDropBoxLink() {
  8. $this->UnitTestCase('Test Drop Box Link');
  9. }
  10. public function __construct() {
  11. // The constructor acts like a global setUp for the class
  12. require_once api_get_path(SYS_TEST_PATH).'setup.inc.php';
  13. $this->dropbox = new DropboxLink();
  14. }
  15. public function testget_type_name() {
  16. $res = $this->dropbox->get_type_name();
  17. $this->assertTrue(is_string($res));
  18. //var_dump($res);
  19. }
  20. public function testget_view_url() {
  21. $stud_id = 1;
  22. $res = $this->dropbox->get_view_url($stud_id);
  23. $this->assertTrue(is_null($res));
  24. //var_dump($res);
  25. }
  26. public function testis_allowed_to_change_name() {
  27. $res = $this->dropbox->is_allowed_to_change_name();
  28. $this->assertTrue(is_bool($res));
  29. //var_dump($res);
  30. }
  31. public function __destruct() {
  32. // The destructor acts like a global tearDown for the class
  33. require_once api_get_path(SYS_TEST_PATH).'teardown.inc.php';
  34. }
  35. }
  36. ?>