Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 24... Línea 24...
24
 * @copyright  2013 Marina Glancy
24
 * @copyright  2013 Marina Glancy
25
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 */
26
 */
27
class generator_test extends \advanced_testcase {
27
class generator_test extends \advanced_testcase {
Línea 28... Línea 28...
28
 
28
 
29
    public function test_create_instance() {
29
    public function test_create_instance(): void {
30
        global $DB;
30
        global $DB;
31
        $this->resetAfterTest();
31
        $this->resetAfterTest();
Línea 32... Línea 32...
32
        $this->setAdminUser();
32
        $this->setAdminUser();
Línea 44... Línea 44...
44
        $records = $DB->get_records('wiki', array('course' => $course->id), 'id');
44
        $records = $DB->get_records('wiki', array('course' => $course->id), 'id');
45
        $this->assertEquals(2, count($records));
45
        $this->assertEquals(2, count($records));
46
        $this->assertEquals('Another wiki', $records[$wiki->id]->name);
46
        $this->assertEquals('Another wiki', $records[$wiki->id]->name);
47
    }
47
    }
Línea 48... Línea 48...
48
 
48
 
49
    public function test_create_content() {
49
    public function test_create_content(): void {
50
        global $DB;
50
        global $DB;
51
        $this->resetAfterTest();
51
        $this->resetAfterTest();
Línea 52... Línea 52...
52
        $this->setAdminUser();
52
        $this->setAdminUser();
Línea 73... Línea 73...
73
                array_values(\core_tag_tag::get_item_tags_array('mod_wiki', 'wiki_pages', $page3->id)));
73
                array_values(\core_tag_tag::get_item_tags_array('mod_wiki', 'wiki_pages', $page3->id)));
74
        $this->assertEquals(array('Cats', 'dogs'),
74
        $this->assertEquals(array('Cats', 'dogs'),
75
                array_values(\core_tag_tag::get_item_tags_array('mod_wiki', 'wiki_pages', $page4->id)));
75
                array_values(\core_tag_tag::get_item_tags_array('mod_wiki', 'wiki_pages', $page4->id)));
76
    }
76
    }
Línea 77... Línea 77...
77
 
77
 
78
    public function test_create_content_individual() {
78
    public function test_create_content_individual(): void {
79
        global $DB;
79
        global $DB;
80
        $this->resetAfterTest();
80
        $this->resetAfterTest();
Línea 81... Línea 81...
81
        $this->setAdminUser();
81
        $this->setAdminUser();