MediaWiki REL1_33
DiffOpTest.php
Go to the documentation of this file.
1<?php
8
12 public function testGetType() {
13 $obj = new FakeDiffOp();
14 $obj->type = 'foo';
15 $this->assertEquals( 'foo', $obj->getType() );
16 }
17
21 public function testGetOrig() {
22 $obj = new FakeDiffOp();
23 $obj->orig = [ 'foo' ];
24 $this->assertEquals( [ 'foo' ], $obj->getOrig() );
25 }
26
30 public function testGetClosing() {
31 $obj = new FakeDiffOp();
32 $obj->closing = [ 'foo' ];
33 $this->assertEquals( [ 'foo' ], $obj->getClosing() );
34 }
35
39 public function testGetClosingWithParameter() {
40 $obj = new FakeDiffOp();
41 $obj->closing = [ 'foo', 'bar', 'baz' ];
42 $this->assertEquals( 'foo', $obj->getClosing( 0 ) );
43 $this->assertEquals( 'bar', $obj->getClosing( 1 ) );
44 $this->assertEquals( 'baz', $obj->getClosing( 2 ) );
45 $this->assertEquals( null, $obj->getClosing( 3 ) );
46 }
47
51 public function testNorig() {
52 $obj = new FakeDiffOp();
53 $this->assertEquals( 0, $obj->norig() );
54 $obj->orig = [ 'foo' ];
55 $this->assertEquals( 1, $obj->norig() );
56 }
57
61 public function testNclosing() {
62 $obj = new FakeDiffOp();
63 $this->assertEquals( 0, $obj->nclosing() );
64 $obj->closing = [ 'foo' ];
65 $this->assertEquals( 1, $obj->nclosing() );
66 }
67
68}
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
testGetType()
DiffOp::getType.
testNclosing()
DiffOp::nclosing.
testGetOrig()
DiffOp::getOrig.
testNorig()
DiffOp::norig.
testGetClosing()
DiffOp::getClosing.
testGetClosingWithParameter()
DiffOp::getClosing.
Class FakeDiffOp used to test abstract class DiffOp.
Definition FakeDiffOp.php:6