MDL-31857 phpunit: PHPDoc and typo fixes during integration
[moodle.git] / lib / tests / phpunit_test.php
CommitLineData
5bd40408
PS
1<?php
2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
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/>.
16
7aea08e1
SH
17/**
18 * PHPunit implementation unit tests
19 *
20 * @package core
21 * @category phpunit
22 * @copyright 2012 Petr Skoda {@link http://skodak.org}
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 */
25
5bd40408
PS
26defined('MOODLE_INTERNAL') || die();
27
28/**
29 * Test integration of PHPUnit and custom Moodle hacks.
30 *
7aea08e1 31 * @package core
5bd40408
PS
32 * @category phpunit
33 * @copyright 2012 Petr Skoda {@link http://skodak.org}
34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35 */
36class core_phpunit_basic_testcase extends basic_testcase {
37
7aea08e1
SH
38 /**
39 * Tests that bootstraping has occurred correctly
40 * @return void
41 */
5bd40408
PS
42 public function test_bootstrap() {
43 global $CFG;
44 $this->assertTrue(isset($CFG->httpswwwroot));
45 $this->assertEquals($CFG->httpswwwroot, $CFG->wwwroot);
46 $this->assertEquals($CFG->prefix, $CFG->phpunit_prefix);
47 }
48
49/*
50 public function test_borked_tests() {
51 global $DB;
52
53 $DB->set_field('user', 'confirmed', 1, array('id'=>-1));
54 $CFG->xx = 'yy';
55 }
56*/
57
58}