Index: trunk/extensions/Contest/test/ContestValidationTests.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | class ContestValidationTests extends MediaWikiTestCase { |
14 | 14 | |
15 | 15 | /** |
16 | | - * Tests |
| 16 | + * Tests @see SpecialContestSubmission::validateSubmissionField |
17 | 17 | */ |
18 | 18 | public function testURLValidation() { |
19 | 19 | $tests = array( |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | 'https://github.com/JeroenDeDauw/smwcon/tree/f9b26ec4ba1101b1f5d4ef76b7ae6ad3dabfb53' => false, |
25 | 25 | 'https://github.com/JeroenDeDauw/smwcon/tree/f9b26ec4ba1101b1f5d4ef76b7ae6ad3dabfb53ba' => false, |
26 | 26 | 'https://github.com/JeroenDeDauw/smwc*/tree/f9b26ec4ba1101b1f5d4ef76b7ae6ad3dabfb53b' => false, |
| 27 | + 'in ur unit test, being quite silly' => false, |
27 | 28 | ); |
28 | 29 | |
29 | 30 | foreach ( $tests as $test => $isValdid ) { |
— | — | @@ -35,4 +36,15 @@ |
36 | 37 | } |
37 | 38 | } |
38 | 39 | |
| 40 | + /** |
| 41 | + * Tests @see ContestDBObject::select and @see ContestDBObject::count |
| 42 | + */ |
| 43 | + public function testObjectSelectCount() { |
| 44 | + $classes = array( 'Contest', 'ContestChallenge' ); |
| 45 | + |
| 46 | + foreach ( $classes as $class ) { |
| 47 | + $this->assertEquals( count( $class::s()->select() ), $class::s()->count() ); |
| 48 | + } |
| 49 | + } |
| 50 | + |
39 | 51 | } |