Ensure users are able to edit the page after changing the content model
[lhc/web/wiklou.git] / tests / parser / ITestRecorder.php
1 <?php
2 /**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
17 *
18 * @file
19 * @ingroup Testing
20 */
21
22 /**
23 * Interface to record parser test results.
24 *
25 * The ITestRecorder is a very simple interface to record the result of
26 * MediaWiki parser tests. One should call start() before running the
27 * full parser tests and end() once all the tests have been finished.
28 * After each test, you should use record() to keep track of your tests
29 * results. Finally, report() is used to generate a summary of your
30 * test run, one could dump it to the console for human consumption or
31 * register the result in a database for tracking purposes.
32 *
33 * @since 1.22
34 */
35 interface ITestRecorder {
36
37 /**
38 * Called at beginning of the parser test run
39 */
40 public function start();
41
42 /**
43 * Called after each test
44 * @param string $test
45 * @param integer $subtest
46 * @param bool $result
47 */
48 public function record( $test, $subtest, $result );
49
50 /**
51 * Called before finishing the test run
52 */
53 public function report();
54
55 /**
56 * Called at the end of the parser test run
57 */
58 public function end();
59
60 }
61