Index: trunk/extensions/FlaggedRevs/tests/FlaggedPageTest.php |
— | — | @@ -1,42 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class FlaggedPageTest extends PHPUnit_Framework_TestCase { |
5 | | - /** |
6 | | - * Prepares the environment before running a test. |
7 | | - */ |
8 | | - protected function setUp() { |
9 | | - parent::setUp(); |
10 | | - $this->user = new User(); |
11 | | - } |
12 | | - |
13 | | - /** |
14 | | - * Cleans up the environment after running a test. |
15 | | - */ |
16 | | - protected function tearDown() { |
17 | | - parent::tearDown(); |
18 | | - } |
19 | | - |
20 | | - /** |
21 | | - * Constructs the test case. |
22 | | - */ |
23 | | - public function __construct() {} |
24 | | - |
25 | | - public function testPageDataFromTitle() { |
26 | | - $title = Title::makeTitle( NS_MAIN, "somePage" ); |
27 | | - $article = new FlaggableWikiPage( $title ); |
28 | | - |
29 | | - $user = $this->user; |
30 | | - $article->doEdit( "Some text to insert", "creating a page", EDIT_NEW, false, $user ); |
31 | | - |
32 | | - $data = (array)$article->pageDataFromTitle( wfGetDB( DB_SLAVE ), $title ); |
33 | | - |
34 | | - $this->assertEquals( true, array_key_exists( 'fpc_override', $data ), |
35 | | - "data->fpc_override field exists" ); |
36 | | - $this->assertEquals( true, array_key_exists( 'fp_stable', $data ), |
37 | | - "data->fp_stable field exists" ); |
38 | | - $this->assertEquals( true, array_key_exists( 'fp_pending_since', $data ), |
39 | | - "data->fp_pending_since field exists" ); |
40 | | - $this->assertEquals( true, array_key_exists( 'fp_reviewed', $data ), |
41 | | - "data->fp_reviewed field exists" ); |
42 | | - } |
43 | | -} |
Index: trunk/extensions/FlaggedRevs/tests/FlaggablePageTest.php |
— | — | @@ -0,0 +1,42 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class FlaggablePageTest extends PHPUnit_Framework_TestCase { |
| 5 | + /** |
| 6 | + * Prepares the environment before running a test. |
| 7 | + */ |
| 8 | + protected function setUp() { |
| 9 | + parent::setUp(); |
| 10 | + $this->user = new User(); |
| 11 | + } |
| 12 | + |
| 13 | + /** |
| 14 | + * Cleans up the environment after running a test. |
| 15 | + */ |
| 16 | + protected function tearDown() { |
| 17 | + parent::tearDown(); |
| 18 | + } |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructs the test case. |
| 22 | + */ |
| 23 | + public function __construct() {} |
| 24 | + |
| 25 | + public function testPageDataFromTitle() { |
| 26 | + $title = Title::makeTitle( NS_MAIN, "somePage" ); |
| 27 | + $article = new FlaggableWikiPage( $title ); |
| 28 | + |
| 29 | + $user = $this->user; |
| 30 | + $article->doEdit( "Some text to insert", "creating a page", EDIT_NEW, false, $user ); |
| 31 | + |
| 32 | + $data = (array)$article->pageDataFromTitle( wfGetDB( DB_SLAVE ), $title ); |
| 33 | + |
| 34 | + $this->assertEquals( true, array_key_exists( 'fpc_override', $data ), |
| 35 | + "data->fpc_override field exists" ); |
| 36 | + $this->assertEquals( true, array_key_exists( 'fp_stable', $data ), |
| 37 | + "data->fp_stable field exists" ); |
| 38 | + $this->assertEquals( true, array_key_exists( 'fp_pending_since', $data ), |
| 39 | + "data->fp_pending_since field exists" ); |
| 40 | + $this->assertEquals( true, array_key_exists( 'fp_reviewed', $data ), |
| 41 | + "data->fp_reviewed field exists" ); |
| 42 | + } |
| 43 | +} |
Property changes on: trunk/extensions/FlaggedRevs/tests/FlaggablePageTest.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 44 | + native |