Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 46... Línea 46...
46
    /**
46
    /**
47
     * Test wiki_view.
47
     * Test wiki_view.
48
     *
48
     *
49
     * @return void
49
     * @return void
50
     */
50
     */
51
    public function test_wiki_view() {
51
    public function test_wiki_view(): void {
52
        global $CFG;
52
        global $CFG;
Línea 53... Línea 53...
53
 
53
 
54
        $CFG->enablecompletion = COMPLETION_ENABLED;
54
        $CFG->enablecompletion = COMPLETION_ENABLED;
Línea 90... Línea 90...
90
    /**
90
    /**
91
     * Test wiki_page_view.
91
     * Test wiki_page_view.
92
     *
92
     *
93
     * @return void
93
     * @return void
94
     */
94
     */
95
    public function test_wiki_page_view() {
95
    public function test_wiki_page_view(): void {
96
        global $CFG;
96
        global $CFG;
Línea 97... Línea 97...
97
 
97
 
98
        $CFG->enablecompletion = COMPLETION_ENABLED;
98
        $CFG->enablecompletion = COMPLETION_ENABLED;
Línea 135... Línea 135...
135
    /**
135
    /**
136
     * Test wiki_user_can_edit without groups.
136
     * Test wiki_user_can_edit without groups.
137
     *
137
     *
138
     * @return void
138
     * @return void
139
     */
139
     */
140
    public function test_wiki_user_can_edit() {
140
    public function test_wiki_user_can_edit(): void {
141
        global $DB;
141
        global $DB;
Línea 142... Línea 142...
142
 
142
 
143
        $this->resetAfterTest();
143
        $this->resetAfterTest();
Línea 201... Línea 201...
201
    /**
201
    /**
202
     * Test wiki_user_can_edit using collaborative wikis with groups.
202
     * Test wiki_user_can_edit using collaborative wikis with groups.
203
     *
203
     *
204
     * @return void
204
     * @return void
205
     */
205
     */
206
    public function test_wiki_user_can_edit_with_groups_collaborative() {
206
    public function test_wiki_user_can_edit_with_groups_collaborative(): void {
207
        global $DB;
207
        global $DB;
Línea 208... Línea 208...
208
 
208
 
209
        $this->resetAfterTest();
209
        $this->resetAfterTest();
Línea 296... Línea 296...
296
    /**
296
    /**
297
     * Test wiki_user_can_edit using individual wikis with groups.
297
     * Test wiki_user_can_edit using individual wikis with groups.
298
     *
298
     *
299
     * @return void
299
     * @return void
300
     */
300
     */
301
    public function test_wiki_user_can_edit_with_groups_individual() {
301
    public function test_wiki_user_can_edit_with_groups_individual(): void {
302
        global $DB;
302
        global $DB;
Línea 303... Línea 303...
303
 
303
 
304
        $this->resetAfterTest();
304
        $this->resetAfterTest();
Línea 397... Línea 397...
397
    /**
397
    /**
398
     * Test wiki_get_visible_subwikis without groups.
398
     * Test wiki_get_visible_subwikis without groups.
399
     *
399
     *
400
     * @return void
400
     * @return void
401
     */
401
     */
402
    public function test_wiki_get_visible_subwikis_without_groups() {
402
    public function test_wiki_get_visible_subwikis_without_groups(): void {
403
        global $DB;
403
        global $DB;
Línea 404... Línea 404...
404
 
404
 
405
        $this->resetAfterTest();
405
        $this->resetAfterTest();
Línea 475... Línea 475...
475
    /**
475
    /**
476
     * Test wiki_get_visible_subwikis using collaborative wikis with groups.
476
     * Test wiki_get_visible_subwikis using collaborative wikis with groups.
477
     *
477
     *
478
     * @return void
478
     * @return void
479
     */
479
     */
480
    public function test_wiki_get_visible_subwikis_with_groups_collaborative() {
480
    public function test_wiki_get_visible_subwikis_with_groups_collaborative(): void {
481
        global $DB;
481
        global $DB;
Línea 482... Línea 482...
482
 
482
 
483
        $this->resetAfterTest();
483
        $this->resetAfterTest();
Línea 559... Línea 559...
559
    /**
559
    /**
560
     * Test wiki_get_visible_subwikis using individual wikis with groups.
560
     * Test wiki_get_visible_subwikis using individual wikis with groups.
561
     *
561
     *
562
     * @return void
562
     * @return void
563
     */
563
     */
564
    public function test_wiki_get_visible_subwikis_with_groups_individual() {
564
    public function test_wiki_get_visible_subwikis_with_groups_individual(): void {
565
        global $DB;
565
        global $DB;
Línea 566... Línea 566...
566
 
566
 
567
        $this->resetAfterTest();
567
        $this->resetAfterTest();
Línea 654... Línea 654...
654
        $expectedsubwikis = array($swsepindg1s1, $swsepindg1s2, $swsepindg2s2, $swsepindg2s3, $swsepindteacher);
654
        $expectedsubwikis = array($swsepindg1s1, $swsepindg1s2, $swsepindg2s2, $swsepindg2s3, $swsepindteacher);
655
        $result = wiki_get_visible_subwikis($wikisepind);
655
        $result = wiki_get_visible_subwikis($wikisepind);
656
        $this->assertEqualsCanonicalizing($expectedsubwikis, $result);
656
        $this->assertEqualsCanonicalizing($expectedsubwikis, $result);
657
    }
657
    }
Línea 658... Línea 658...
658
 
658
 
659
    public function test_mod_wiki_get_tagged_pages() {
659
    public function test_mod_wiki_get_tagged_pages(): void {
Línea 660... Línea 660...
660
        global $DB;
660
        global $DB;
661
 
661
 
Línea 738... Línea 738...
738
        $this->assertDoesNotMatchRegularExpression('/'.$page22->title.'/', $res->content);
738
        $this->assertDoesNotMatchRegularExpression('/'.$page22->title.'/', $res->content);
739
        $this->assertDoesNotMatchRegularExpression('/'.$page23->title.'/', $res->content);
739
        $this->assertDoesNotMatchRegularExpression('/'.$page23->title.'/', $res->content);
740
        $this->assertEmpty($res->nextpageurl);
740
        $this->assertEmpty($res->nextpageurl);
741
    }
741
    }
Línea 742... Línea 742...
742
 
742
 
743
    public function test_wiki_core_calendar_provide_event_action() {
743
    public function test_wiki_core_calendar_provide_event_action(): void {
744
        $this->resetAfterTest();
744
        $this->resetAfterTest();
Línea 745... Línea 745...
745
        $this->setAdminUser();
745
        $this->setAdminUser();
746
 
746
 
Línea 764... Línea 764...
764
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
764
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
765
        $this->assertEquals(1, $actionevent->get_item_count());
765
        $this->assertEquals(1, $actionevent->get_item_count());
766
        $this->assertTrue($actionevent->is_actionable());
766
        $this->assertTrue($actionevent->is_actionable());
767
    }
767
    }
Línea 768... Línea 768...
768
 
768
 
769
    public function test_wiki_core_calendar_provide_event_action_for_non_user() {
769
    public function test_wiki_core_calendar_provide_event_action_for_non_user(): void {
Línea 770... Línea 770...
770
        global $CFG;
770
        global $CFG;
771
 
771
 
Línea 792... Línea 792...
792
 
792
 
793
        // Confirm the event is not shown at all.
793
        // Confirm the event is not shown at all.
794
        $this->assertNull($actionevent);
794
        $this->assertNull($actionevent);
Línea 795... Línea 795...
795
    }
795
    }
796
 
796
 
Línea 797... Línea 797...
797
    public function test_wiki_core_calendar_provide_event_action_for_user() {
797
    public function test_wiki_core_calendar_provide_event_action_for_user(): void {
798
        global $CFG;
798
        global $CFG;
Línea 825... Línea 825...
825
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
825
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
826
        $this->assertEquals(1, $actionevent->get_item_count());
826
        $this->assertEquals(1, $actionevent->get_item_count());
827
        $this->assertTrue($actionevent->is_actionable());
827
        $this->assertTrue($actionevent->is_actionable());
828
    }
828
    }
Línea 829... Línea 829...
829
 
829
 
830
    public function test_wiki_core_calendar_provide_event_action_already_completed() {
830
    public function test_wiki_core_calendar_provide_event_action_already_completed(): void {
Línea 831... Línea 831...
831
        global $CFG;
831
        global $CFG;
832
 
832
 
Línea 859... Línea 859...
859
 
859
 
860
        // Ensure result was null.
860
        // Ensure result was null.
861
        $this->assertNull($actionevent);
861
        $this->assertNull($actionevent);
Línea 862... Línea 862...
862
    }
862
    }
863
 
863
 
Línea 864... Línea 864...
864
    public function test_wiki_core_calendar_provide_event_action_already_completed_for_user() {
864
    public function test_wiki_core_calendar_provide_event_action_already_completed_for_user(): void {
865
        global $CFG;
865
        global $CFG;