Added a new file dropboxlink.class.test.php CT#191

skala
Arthur Portugal 15 years ago
parent 29c31c40ba
commit c2a705f4c4
  1. 43
      tests/main/gradebook/lib/be/dropboxlink.class.test.php

@ -0,0 +1,43 @@
<?php
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/gradebookitem.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/abstractlink.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/evallink.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/evaluation.class.php';
class TestDropBoxLink extends UnitTestCase {
public function TestDropBoxLink() {
$this->UnitTestCase('Test Drop Box Link');
}
public function __construct() {
// The constructor acts like a global setUp for the class
require_once api_get_path(SYS_TEST_PATH).'setup.inc.php';
$this->dropbox = new DropboxLink();
}
public function testget_type_name() {
$res = $this->dropbox->get_type_name();
$this->assertTrue(is_string($res));
//var_dump($res);
}
public function testget_view_url() {
$stud_id = 1;
$res = $this->dropbox->get_view_url($stud_id);
$this->assertTrue(is_null($res));
//var_dump($res);
}
public function testis_allowed_to_change_name() {
$res = $this->dropbox->is_allowed_to_change_name();
$this->assertTrue(is_bool($res));
//var_dump($res);
}
public function __destruct() {
// The destructor acts like a global tearDown for the class
require_once api_get_path(SYS_TEST_PATH).'teardown.inc.php';
}
}
?>
Loading…
Cancel
Save