Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 22... Línea 22...
22
 * @package    theme_boost
22
 * @package    theme_boost
23
 * @covers     \theme_boost\boostnavbar
23
 * @covers     \theme_boost\boostnavbar
24
 * @copyright  2021 Peter Dias
24
 * @copyright  2021 Peter Dias
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 boostnavbar_test extends \advanced_testcase {
27
final class boostnavbar_test extends \advanced_testcase {
28
    /**
28
    /**
29
     * Provider for test_remove_no_link_items
29
     * Provider for test_remove_no_link_items
30
     * The setup and expected arrays are defined as an array of 'nodekey' => $hasaction
30
     * The setup and expected arrays are defined as an array of 'nodekey' => $hasaction
31
     *
31
     *
32
     * @return array
32
     * @return array
33
     */
33
     */
34
    public function remove_no_link_items_provider(): array {
34
    public static function remove_no_link_items_provider(): array {
35
        return [
35
        return [
36
            'All nodes have links links including leaf node. Set to remove section nodes.' => [
36
            'All nodes have links links including leaf node. Set to remove section nodes.' => [
37
                [
37
                [
38
                    'node1' => ['hasaction' => true, 'issection' => false],
38
                    'node1' => ['hasaction' => true, 'issection' => false],
39
                    'node2' => ['hasaction' => true, 'issection' => false],
39
                    'node2' => ['hasaction' => true, 'issection' => false],
Línea 227... Línea 227...
227
    /**
227
    /**
228
     * Provider for test_remove_duplicate_items.
228
     * Provider for test_remove_duplicate_items.
229
     *
229
     *
230
     * @return array
230
     * @return array
231
     */
231
     */
232
    public function remove_duplicate_items_provider(): array {
232
    public static function remove_duplicate_items_provider(): array {
233
        global $CFG;
233
        global $CFG;
Línea 234... Línea 234...
234
 
234
 
235
        return [
235
        return [
236
            'Breadcrumb items with identical text and action url (actions of same type moodle_url).' => [
236
            'Breadcrumb items with identical text and action url (actions of same type moodle_url).' => [
Línea 405... Línea 405...
405
    /**
405
    /**
406
     * Provider for test_remove_items_that_exist_in_navigation.
406
     * Provider for test_remove_items_that_exist_in_navigation.
407
     *
407
     *
408
     * @return array
408
     * @return array
409
     */
409
     */
410
    public function remove_items_that_exist_in_navigation_provider(): array {
410
    public static function remove_items_that_exist_in_navigation_provider(): array {
411
        global $CFG;
411
        global $CFG;
Línea 412... Línea 412...
412
 
412
 
413
        return [
413
        return [
414
            'Item with identical action url and text exists in the primary navigation menu.' => [
414
            'Item with identical action url and text exists in the primary navigation menu.' => [