Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 37... Línea 37...
37
 */
37
 */
38
class content_item_readonly_repository_test extends \advanced_testcase {
38
class content_item_readonly_repository_test extends \advanced_testcase {
39
    /**
39
    /**
40
     * Test the repository method, find_all_for_course().
40
     * Test the repository method, find_all_for_course().
41
     */
41
     */
42
    public function test_find_all_for_course() {
42
    public function test_find_all_for_course(): void {
43
        $this->resetAfterTest();
43
        $this->resetAfterTest();
Línea 44... Línea 44...
44
 
44
 
45
        $course = $this->getDataGenerator()->create_course();
45
        $course = $this->getDataGenerator()->create_course();
46
        $user = $this->getDataGenerator()->create_and_enrol($course, 'editingteacher');
46
        $user = $this->getDataGenerator()->create_and_enrol($course, 'editingteacher');
Línea 55... Línea 55...
55
    }
55
    }
Línea 56... Línea 56...
56
 
56
 
57
    /**
57
    /**
58
     * Test verifying that content items for hidden modules are not returned.
58
     * Test verifying that content items for hidden modules are not returned.
59
     */
59
     */
60
    public function test_find_all_for_course_hidden_module() {
60
    public function test_find_all_for_course_hidden_module(): void {
61
        $this->resetAfterTest();
61
        $this->resetAfterTest();
Línea 62... Línea 62...
62
        global $DB;
62
        global $DB;
63
 
63
 
Línea 74... Línea 74...
74
    }
74
    }
Línea 75... Línea 75...
75
 
75
 
76
    /**
76
    /**
77
     * Test confirming that all content items can be fetched, even those which require certain caps when in a course.
77
     * Test confirming that all content items can be fetched, even those which require certain caps when in a course.
78
     */
78
     */
79
    public function test_find_all() {
79
    public function test_find_all(): void {
Línea 80... Línea 80...
80
        $this->resetAfterTest();
80
        $this->resetAfterTest();
81
 
81
 
82
        global $DB, $CFG;
82
        global $DB, $CFG;