Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 27... Línea 27...
27
 * @package     core
27
 * @package     core
28
 * @category    navigation
28
 * @category    navigation
29
 * @copyright   2021 onwards Peter Dias
29
 * @copyright   2021 onwards Peter Dias
30
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 */
31
 */
32
class primary_test extends \advanced_testcase {
32
final class primary_test extends \advanced_testcase {
33
    /**
33
    /**
34
     * Test the initialise in different contexts
34
     * Test the initialise in different contexts
35
     *
35
     *
36
     * @param string $usertype The user to setup for - admin, guest, regular user
36
     * @param string $usertype The user to setup for - admin, guest, regular user
37
     * @param string $expected The expected nodes
37
     * @param string $expected The expected nodes
Línea 57... Línea 57...
57
    }
57
    }
Línea 58... Línea 58...
58
 
58
 
59
    /**
59
    /**
60
     * Data provider for the test_setting_initialise function
60
     * Data provider for the test_setting_initialise function
61
     */
61
     */
62
    public function setting_initialise_provider() {
62
    public static function setting_initialise_provider(): array {
63
        return [
63
        return [
64
            'Testing as a guest user' => ['guest', ['home']],
64
            'Testing as a guest user' => ['guest', ['home', 'calendar']],
65
            'Testing as an admin' => ['admin', ['home', 'myhome', 'mycourses', 'siteadminnode']],
65
            'Testing as an admin' => ['admin', ['home', 'myhome', 'mycourses', 'siteadminnode']],
66
            'Testing as a regular user' => ['user', ['home', 'myhome', 'mycourses']]
66
            'Testing as a regular user' => ['user', ['home', 'myhome', 'mycourses']]
67
        ];
67
        ];
Línea 150... Línea 150...
150
    /**
150
    /**
151
     * Data provider for test_search_and_set_active_node
151
     * Data provider for test_search_and_set_active_node
152
     *
152
     *
153
     * @return array
153
     * @return array
154
     */
154
     */
155
    public function search_and_set_active_node_provider(): array {
155
    public static function search_and_set_active_node_provider(): array {
156
        return [
156
        return [
157
            'Test by activating node which is part of the tree'
157
            'Test by activating node which is part of the tree'
158
                => ['tenthchild', 'tenthchild'],
158
                => ['tenthchild', 'tenthchild'],
159
            'Do not change the state of any nodes of the tree'
159
            'Do not change the state of any nodes of the tree'
160
                => ['sixthchild'],
160
                => ['sixthchild'],