Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
 
41
 
42
    /**
42
    /**
43
     * An event with no module should return null when trying to retrieve
43
     * An event with no module should return null when trying to retrieve
44
     * the module instance.
44
     * the module instance.
45
     */
45
     */
46
    public function test_get_module_instance_no_module() {
46
    public function test_get_module_instance_no_module(): void {
47
        $this->setAdminUser();
47
        $this->setAdminUser();
48
        $mapper = container::get_event_mapper();
48
        $mapper = container::get_event_mapper();
49
        $legacyevent = create_event([
49
        $legacyevent = create_event([
50
            'modulename' => '',
50
            'modulename' => '',
Línea 58... Línea 58...
58
 
58
 
59
    /**
59
    /**
60
     * The get_module_instance should return the correct module instances
60
     * The get_module_instance should return the correct module instances
61
     * for the given set of events in the cache.
61
     * for the given set of events in the cache.
62
     */
62
     */
63
    public function test_get_module_instance_with_modules() {
63
    public function test_get_module_instance_with_modules(): void {
64
        $this->setAdminUser();
64
        $this->setAdminUser();
65
        $mapper = container::get_event_mapper();
65
        $mapper = container::get_event_mapper();
66
        $generator = $this->getDataGenerator();
66
        $generator = $this->getDataGenerator();
67
        $course = $generator->create_course();
67
        $course = $generator->create_course();
Línea 100... Línea 100...
100
 
100
 
101
    /**
101
    /**
102
     * Trying to load the course module of an event that isn't in
102
     * Trying to load the course module of an event that isn't in
103
     * the cache should return null.
103
     * the cache should return null.
104
     */
104
     */
105
    public function test_module_instance_unknown_event() {
105
    public function test_module_instance_unknown_event(): void {
106
        $this->setAdminUser();
106
        $this->setAdminUser();
107
        $mapper = container::get_event_mapper();
107
        $mapper = container::get_event_mapper();
108
        $generator = $this->getDataGenerator();
108
        $generator = $this->getDataGenerator();
109
        $course = $generator->create_course();
109
        $course = $generator->create_course();