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.22
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 /
course /
tests /
fixtures /
[ HOME SHELL ]
Name
Size
Permission
Action
course_capability_assignment.p...
3.45
KB
-rw-r--r--
format_theunittest.php
2.86
KB
-rw-r--r--
mock_hooks.php
5.93
KB
-rw-r--r--
testable_course_edit_form.php
1.47
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mock_hooks.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/>. /** * Fixture for mocking callbacks used in \core_course_category * * @package core_course * @category test * @copyright 2020 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace tests\core_course { /** * Class mock_hooks * * @package core_course * @category test * @copyright 2020 Ruslan Kabalin * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class mock_hooks { /** @var bool $cancoursecategorydelete */ private static $cancoursecategorydelete = true; /** @var bool $cancoursecategorydeletemove */ private static $cancoursecategorydeletemove = true; /** @var string $getcoursecategorycontents */ private static $getcoursecategorycontents = ''; /** @var array $callingarguments */ private static $callingarguments = []; /** * Set calling arguments. * * This is supposed to be used in the callbacks to store arguments passed to callback. * * @param array $callingarguments */ public static function set_calling_arguments($callingarguments) { self::$callingarguments = $callingarguments; } /** * Get calling arguments. * * This is supposed to be used in the test to verify arguments passed to callback. * This method also reset stored calling arguments. * * @return array $callingarguments */ public static function get_calling_arguments() { $callingarguments = self::$callingarguments; self::$callingarguments = []; return $callingarguments; } /** * Get can_course_category_delete callback return. * * @return bool */ public static function get_can_course_category_delete_return() : bool { return self::$cancoursecategorydelete; } /** * Sets can_course_category_delete callback return. * * @param bool $return */ public static function set_can_course_category_delete_return(bool $return) { self::$cancoursecategorydelete = $return; } /** * Get can_course_category_delete_move callback return. * * @return bool */ public static function get_can_course_category_delete_move_return() : bool { return self::$cancoursecategorydeletemove; } /** * Sets can_course_category_delete_move callback return. * * @param bool $return */ public static function set_can_course_category_delete_move_return(bool $return) { self::$cancoursecategorydeletemove = $return; } /** * Get get_course_category_contents callback return. * * @return string */ public static function get_get_course_category_contents_return() : string { return self::$getcoursecategorycontents; } /** * Sets get_course_category_contents callback return. * * @param string $return */ public static function set_get_course_category_contents_return(string $return) { self::$getcoursecategorycontents = $return; } } } namespace { /** * Test pre_course_category_delete callback. * * @param object $category */ function tool_unittest_pre_course_category_delete(object $category) { \tests\core_course\mock_hooks::set_calling_arguments(func_get_args()); } /** * Test pre_course_category_delete_move callback. * * @param core_course_category $category * @param core_course_category $newcategory */ function tool_unittest_pre_course_category_delete_move(core_course_category $category, core_course_category $newcategory) { \tests\core_course\mock_hooks::set_calling_arguments(func_get_args()); } /** * Test can_course_category_delete callback. * * @param core_course_category $category * @return bool */ function tool_unittest_can_course_category_delete(core_course_category $category) { \tests\core_course\mock_hooks::set_calling_arguments(func_get_args()); return \tests\core_course\mock_hooks::get_can_course_category_delete_return(); } /** * Test can_course_category_delete_move callback. * * @param core_course_category $category * @param core_course_category $newcategory * @return bool */ function tool_unittest_can_course_category_delete_move(core_course_category $category, core_course_category $newcategory) { \tests\core_course\mock_hooks::set_calling_arguments(func_get_args()); return \tests\core_course\mock_hooks::get_can_course_category_delete_move_return(); } /** * Test get_course_category_contents callback. * * @param core_course_category $category * @return string */ function tool_unittest_get_course_category_contents(core_course_category $category) { \tests\core_course\mock_hooks::set_calling_arguments(func_get_args()); return \tests\core_course\mock_hooks::get_get_course_category_contents_return(); } }
Close