MediaWiki  1.23.14
DiffOpTest.php
Go to the documentation of this file.
1 <?php
2 
3 //Load our FakeDiffOp
4 require_once __DIR__ . DIRECTORY_SEPARATOR . 'FakeDiffOp.php';
5 
13 
17  public function testGetType() {
18  $obj = new FakeDiffOp();
19  $obj->type = 'foo';
20  $this->assertEquals( 'foo', $obj->getType() );
21  }
22 
26  public function testGetOrig() {
27  $obj = new FakeDiffOp();
28  $obj->orig = array( 'foo' );
29  $this->assertEquals( array( 'foo' ), $obj->getOrig() );
30  }
31 
35  public function testGetClosing() {
36  $obj = new FakeDiffOp();
37  $obj->closing = array( 'foo' );
38  $this->assertEquals( array( 'foo' ), $obj->getClosing() );
39  }
40 
44  public function testGetClosingWithParameter() {
45  $obj = new FakeDiffOp();
46  $obj->closing = array( 'foo', 'bar', 'baz' );
47  $this->assertEquals( 'foo', $obj->getClosing( 0 ) );
48  $this->assertEquals( 'bar', $obj->getClosing( 1 ) );
49  $this->assertEquals( 'baz', $obj->getClosing( 2 ) );
50  $this->assertEquals( null, $obj->getClosing( 3 ) );
51  }
52 
56  public function testNorig() {
57  $obj = new FakeDiffOp();
58  $this->assertEquals( 0, $obj->norig() );
59  $obj->orig = array( 'foo' );
60  $this->assertEquals( 1, $obj->norig() );
61  }
62 
66  public function testNclosing() {
67  $obj = new FakeDiffOp();
68  $this->assertEquals( 0, $obj->nclosing() );
69  $obj->closing = array( 'foo' );
70  $this->assertEquals( 1, $obj->nclosing() );
71  }
72 
73 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
FakeDiffOp
Class FakeDiffOp used to test abstract class DiffOp.
Definition: FakeDiffOp.php:6
DiffOpTest\testNorig
testNorig()
@covers DiffOp::norig
Definition: DiffOpTest.php:56
DiffOpTest\testGetClosingWithParameter
testGetClosingWithParameter()
@covers DiffOp::getClosing
Definition: DiffOpTest.php:44
DiffOpTest\testGetType
testGetType()
@covers DiffOp::getType
Definition: DiffOpTest.php:17
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
DiffOpTest\testGetClosing
testGetClosing()
@covers DiffOp::getClosing
Definition: DiffOpTest.php:35
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
DiffOpTest\testGetOrig
testGetOrig()
@covers DiffOp::getOrig
Definition: DiffOpTest.php:26
DiffOpTest
@licence GNU GPL v2+
Definition: DiffOpTest.php:12
DiffOpTest\testNclosing
testNclosing()
@covers DiffOp::nclosing
Definition: DiffOpTest.php:66