download.lib.test.php 669 B

1234567891011121314151617181920212223
  1. <?php
  2. require_once api_get_path(SYS_CODE_PATH).'course_info/download.lib.php';
  3. class TestCreateBackupIsAdmin extends UnitTestCase {
  4. public function __construct() {
  5. $this->UnitTestCase('Course download library - main/course_info/download.lib.test.php');
  6. }
  7. public function Testcreate_backup_is_admin()
  8. {
  9. $_GET = array('archive' => 'index.html');
  10. $resTrue = create_backup_is_admin(true);
  11. $this->assertTrue(is_bool($resTrue));
  12. $resFalse = create_backup_is_admin(false);
  13. $this->assertFalse($resFalse);
  14. $this->assertEqual($resTrue , $resFalse);
  15. //var_dump($resTrue, $resFalse);
  16. }
  17. }
  18. ?>