Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 52... Línea 52...
52
     * @param bool $withlang Setup with langs
52
     * @param bool $withlang Setup with langs
53
     * @param string $userloggedin The type of user ('admin' or 'guest') if creating setup with logged in user,
53
     * @param string $userloggedin The type of user ('admin' or 'guest') if creating setup with logged in user,
54
     *                             otherwise consider the user as non-logged in
54
     *                             otherwise consider the user as non-logged in
55
     * @param array $expecteditems An array of nodes expected with content in them.
55
     * @param array $expecteditems An array of nodes expected with content in them.
56
     */
56
     */
57
    public function test_primary_export(bool $withcustom, bool $withlang, string $userloggedin, array $expecteditems) {
57
    public function test_primary_export(bool $withcustom, bool $withlang, string $userloggedin, array $expecteditems): void {
58
        global $PAGE, $CFG;
58
        global $PAGE, $CFG;
59
        if ($withcustom) {
59
        if ($withcustom) {
60
            $CFG->custommenuitems = "Course search|/course/search.php
60
            $CFG->custommenuitems = "Course search|/course/search.php
61
                Google|https://google.com.au/
61
                Google|https://google.com.au/
62
                Netflix|https://netflix.com/au";
62
                Netflix|https://netflix.com/au";
Línea 150... Línea 150...
150
     *
150
     *
151
     * @dataProvider custom_menu_provider
151
     * @dataProvider custom_menu_provider
152
     * @param string $config
152
     * @param string $config
153
     * @param array $expected
153
     * @param array $expected
154
     */
154
     */
155
    public function test_get_custom_menu(string $config, array $expected) {
155
    public function test_get_custom_menu(string $config, array $expected): void {
156
        $actual = $this->get_custom_menu($config);
156
        $actual = $this->get_custom_menu($config);
157
        $this->assertEquals($expected, $actual);
157
        $this->assertEquals($expected, $actual);
158
    }
158
    }
Línea 159... Línea 159...
159
 
159
 
Línea 319... Línea 319...
319
     * @covers \core\navigation\output\primary::flag_active_nodes
319
     * @covers \core\navigation\output\primary::flag_active_nodes
320
     * @return void
320
     * @return void
321
     * @throws \ReflectionException
321
     * @throws \ReflectionException
322
     * @throws \moodle_exception
322
     * @throws \moodle_exception
323
     */
323
     */
324
    public function test_merge_primary_and_custom() {
324
    public function test_merge_primary_and_custom(): void {
325
        global $PAGE;
325
        global $PAGE;
Línea 326... Línea 326...
326
 
326
 
Línea 327... Línea 327...
327
        $menu = $this->merge_and_render_menus();
327
        $menu = $this->merge_and_render_menus();