Index: trunk/extensions/Validator/test/ValidatorCriteriaTests.php |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Unit tests for Validators criteria. |
| 6 | + * |
| 7 | + * @ingroup Validator |
| 8 | + * @since 0.4.8 |
| 9 | + * |
| 10 | + * @licence GNU GPL v3 |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 12 | + */ |
| 13 | +class ValidatorCriteriaTests extends MediaWikiTestCase { |
| 14 | + |
| 15 | + // TODO |
| 16 | + |
| 17 | +} |
Property changes on: trunk/extensions/Validator/test/ValidatorCriteriaTests.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 18 | + native |
Index: trunk/extensions/Validator/Validator.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | die( 'Not an entry point.' ); |
27 | 27 | } |
28 | 28 | |
29 | | -define( 'Validator_VERSION', '0.4.7' ); |
| 29 | +define( 'Validator_VERSION', '0.4.8 alpha' ); |
30 | 30 | |
31 | 31 | // Register the internationalization file. |
32 | 32 | $wgExtensionMessagesFiles['Validator'] = dirname( __FILE__ ) . '/Validator.i18n.php'; |
— | — | @@ -89,6 +89,9 @@ |
90 | 90 | $wgHooks['ParserFirstCallInit'][] = 'ValidatorDescribe::staticInit'; |
91 | 91 | $wgHooks['LanguageGetMagic'][] = 'ValidatorDescribe::staticMagic'; |
92 | 92 | |
| 93 | +// Since 0.4.8 |
| 94 | +$wgHooks['UnitTestsList'][] = 'MapsHooks::registerUnitTests'; |
| 95 | + |
93 | 96 | // This file needs to be included directly, since Validator_Settings.php |
94 | 97 | // uses it, in some rare cases before autoloading is defined. |
95 | 98 | require_once 'includes/ValidationError.php' ; |
Index: trunk/extensions/Validator/Validator.hooks.php |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Static class for hooks handled by the Validator extension. |
| 6 | + * |
| 7 | + * @since 0.4.8 |
| 8 | + * |
| 9 | + * @file Validator.hooks.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +final class ValidatorHooks { |
| 16 | + |
| 17 | + /** |
| 18 | + * Hook to add PHPUnit test cases. |
| 19 | + * |
| 20 | + * @since 0.4.8 |
| 21 | + * |
| 22 | + * @param array $files |
| 23 | + */ |
| 24 | + public static function registerUnitTests( array &$files ) { |
| 25 | + $testDir = dirname( __FILE__ ) . '/test/'; |
| 26 | + |
| 27 | + $files[] = $testDir . 'ValidatorCriteriaTests.php'; |
| 28 | + |
| 29 | + return true; |
| 30 | + } |
| 31 | + |
| 32 | +} |
Property changes on: trunk/extensions/Validator/Validator.hooks.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 33 | + native |