3 * Generic providers for the MediaWiki PHPUnit test suite
5 * @author Antoine Musso
6 * @copyright Copyright © 2011, Antoine Musso
11 class MediaWikiProvide
{
13 /* provide an array of numbers from 1 up to @param $num */
14 private static function createProviderUpTo( $num ) {
16 for( $i=1; $i<=$num;$i++
) {
22 /* array of months numbers (as an integer) */
23 public static function Months() {
24 return self
::createProviderUpTo( 12 );
27 /* array of days numbers (as an integer) */
28 public static function Days() {
29 return self
::createProviderUpTo( 31 );
32 public static function DaysMonths() {
35 $months = self
::Months();
37 foreach( $months as $month) {
38 foreach( $days as $day ) {
39 $ret[] = array( $day[0], $month[0] );