Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 63... Línea 63...
63
     * Adding this test here as get_areas_user_accesses process is the same, results just depend on the context level.
63
     * Adding this test here as get_areas_user_accesses process is the same, results just depend on the context level.
64
     *
64
     *
65
     * @covers ::export_for_template
65
     * @covers ::export_for_template
66
     * @return void
66
     * @return void
67
     */
67
     */
68
    public function test_search_user_accesses() {
68
    public function test_search_user_accesses(): void {
69
        global $PAGE;
69
        global $PAGE;
Línea 70... Línea 70...
70
 
70
 
71
        $area = new mock_search_area();
71
        $area = new mock_search_area();
72
        $renderer = $PAGE->get_renderer('core_search');
72
        $renderer = $PAGE->get_renderer('core_search');
Línea 112... Línea 112...
112
    /**
112
    /**
113
     * Test we can set and get document icon.
113
     * Test we can set and get document icon.
114
     *
114
     *
115
     * @covers ::set_doc_icon
115
     * @covers ::set_doc_icon
116
     */
116
     */
117
    public function test_get_and_set_doc_icon() {
117
    public function test_get_and_set_doc_icon(): void {
118
        $document = $this->getMockBuilder('\core_search\document')
118
        $document = $this->getMockBuilder('\core_search\document')
119
            ->disableOriginalConstructor()
119
            ->disableOriginalConstructor()
120
            ->getMockForAbstractClass();
120
            ->getMockForAbstractClass();
Línea 121... Línea 121...
121
 
121
 
Línea 149... Línea 149...
149
    public function test_document_author_visibility(
149
    public function test_document_author_visibility(
150
        string $rolename = 'editingteacher',
150
        string $rolename = 'editingteacher',
151
        array $capexceptions = [],
151
        array $capexceptions = [],
152
        bool $expected = true,
152
        bool $expected = true,
153
        bool $owndocument = false
153
        bool $owndocument = false
154
    ) {
154
    ): void {
155
        global $DB, $PAGE;
155
        global $DB, $PAGE;
Línea 156... Línea 156...
156
 
156
 
157
        $area = new mock_search_area();
157
        $area = new mock_search_area();
158
        $renderer = $PAGE->get_renderer('core_search');
158
        $renderer = $PAGE->get_renderer('core_search');