Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 11... Línea 11...
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
12
// GNU General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
/**
-
 
17
 * Privacy tests for core_user.
-
 
18
 *
-
 
19
 * @package    core_user
-
 
20
 * @category   test
-
 
21
 * @copyright  2018 Adrian Greeve <adrian@moodle.com>
-
 
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
23
 */
-
 
24
namespace core_user\privacy;
-
 
25
 
-
 
26
defined('MOODLE_INTERNAL') || die();
-
 
27
global $CFG;
-
 
Línea 28... Línea -...
28
 
-
 
29
use \core_privacy\tests\provider_testcase;
16
 
30
use \core_user\privacy\provider;
-
 
31
use \core_privacy\local\request\approved_userlist;
-
 
Línea -... Línea 17...
-
 
17
namespace core_user\privacy;
-
 
18
 
32
use \core_privacy\local\request\transform;
19
use core\tests\session\mock_handler;
-
 
20
use core_privacy\tests\provider_testcase;
-
 
21
use core_privacy\local\request\approved_userlist;
Línea 33... Línea 22...
33
 
22
use core_privacy\local\request\transform;
34
require_once($CFG->dirroot . "/user/lib.php");
23
use core_user\privacy\provider;
35
 
24
 
-
 
25
/**
36
/**
26
 * Unit tests for core_user.
37
 * Unit tests for core_user.
27
 *
-
 
28
 * @package core_user
38
 *
29
 * @copyright  2018 Adrian Greeve <adrian@moodle.com>
39
 * @copyright  2018 Adrian Greeve <adrian@moodle.com>
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
31
 * @covers \core_user\privacy\provider
-
 
32
 */
-
 
33
final class provider_test extends provider_testcase {
-
 
34
    public static function setUpBeforeClass(): void {
-
 
35
        global $CFG;
-
 
36
        parent::setUpBeforeClass();
Línea 40... Línea 37...
40
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
37
 
41
 */
38
        require_once($CFG->dirroot . "/user/lib.php");
42
class provider_test extends provider_testcase {
39
    }
43
 
40
 
Línea 473... Línea 470...
473
            'timecreated' => time(),
470
            'timecreated' => time(),
474
            'timemodified' => time(),
471
            'timemodified' => time(),
475
            'firstip' => '0.0.0.0',
472
            'firstip' => '0.0.0.0',
476
            'lastip' => '0.0.0.0'
473
            'lastip' => '0.0.0.0'
477
        ];
474
        ];
-
 
475
        $mockhandler = new mock_handler();
478
        $DB->insert_record('sessions', $usersessions);
476
        $mockhandler->add_test_session($usersessions);
479
    }
477
    }
Línea 480... Línea 478...
480
 
478
 
481
    /**
479
    /**
482
     * Create a random string.
480
     * Create a random string.