MediaWiki REL1_33
ParserIntegrationTest.php
Go to the documentation of this file.
1<?php
3
30class ParserIntegrationTest extends PHPUnit\Framework\TestCase {
31
32 use MediaWikiCoversValidator;
33
35 private $ptTest;
36
38 private $ptRunner;
39
42
43 public function __construct( $runner, $fileName, $test ) {
44 parent::__construct( 'testParse', [ '[details omitted]' ],
45 basename( $fileName ) . ': ' . $test['desc'] );
46 $this->ptTest = $test;
47 $this->ptRunner = $runner;
48 }
49
50 public function testParse() {
51 $this->ptRunner->getRecorder()->setTestCase( $this );
52 $result = $this->ptRunner->runTest( $this->ptTest );
53 $this->assertEquals( $result->expected, $result->actual );
54 }
55
56 public function setUp() {
57 $this->ptTeardownScope = $this->ptRunner->staticSetup();
58 }
59
60 public function tearDown() {
61 if ( $this->ptTeardownScope ) {
62 ScopedCallback::consume( $this->ptTeardownScope );
63 }
64 }
65}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
This is the TestCase subclass for running a single parser test via the ParserTestRunner integration t...
__construct( $runner, $fileName, $test)
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))