jenkins-bot has submitted this change and it was merged.

Change subject: test: describe the parser tests recorder
......................................................................


test: describe the parser tests recorder

How to best describe the myriad of parser tests recorder we have?  PHP
come with interfaces which let us express what a developer should expect
from all those common classes.

The ITestRecorder interface represent our parser test recorders.

Change-Id: I58e10e7ebcb7ae1c4598a4f7e3bd4f11a7f713c4
---
M tests/testHelpers.inc
1 file changed, 30 insertions(+), 1 deletion(-)

Approvals:
  IAlex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc
index 02fcf24..4c778f6 100644
--- a/tests/testHelpers.inc
+++ b/tests/testHelpers.inc
@@ -21,7 +21,36 @@
  * @ingroup Testing
  */
 
-class TestRecorder {
+/**
+ * Interface to record parser test results.
+ *
+ * The ITestRecorder is a very simple interface to record the result of
+ * MediaWiki parser tests. One should call start() before running the
+ * full parser tests and end() once all the tests have been finished.
+ * After each test, you should use record() to keep track of your tests
+ * results. Finally, report() is used to generate a summary of your
+ * test run, one could dump it to the console for human consumption or
+ * register the result in a database for tracking purposes.
+ *
+ * @since 1.22
+ */
+interface ITestRecorder {
+
+       /** Called at beginning of the parser test run */
+       public function start();
+
+       /** Called after each test */
+       public function record( $test, $result );
+
+       /** Called before finishing the test run */
+       public function report();
+
+       /** Called at the end of the parser test run */
+       public function end();
+
+}
+
+class TestRecorder implements ITestRecorder {
        var $parent;
        var $term;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/54653
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I58e10e7ebcb7ae1c4598a4f7e3bd4f11a7f713c4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Platonides <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to