Commit graph

6 commits

Author SHA1 Message Date
Brad Jorsch
e27ff73b32 Reject out-of-range output when converting to TS_MW
TS_MW is a 14-character string "YYYYMMDDHHIISS", and thus cannot
represent timestamps earlier than 00000101000000 or later than
99991231235959.

MWTimestamp should throw an exception if asked to represent out-of-range
times in this format, rather than returning invalid values that are
likely to be truncated by the database.

Bug: T51580
Change-Id: I744e446356f3ed9193dfaaaec5dc81c611dab4a3
2014-12-19 17:06:38 -05:00
umherirrender
7701eec0cc Avoid running of hooks when running MWTimestampTest
Bug: 55886
Change-Id: I91e1dfeb1cddb158318ac178264e5acaf0a16215
2014-10-23 17:50:36 +00:00
Timo Tijhof
96771e3a65 test: Clean up data providers that should be static
Follows-up b36d883.

By far most data providers are static (and PHPUnit expects them
to be static and calls them that way).

Most of these classes already had their data providers static
but additional commits sloppily introduced non-static ones.

* ResourceLoaderWikiModuleTest, 8968d8787f.
* TitleTest, 545f1d3a73.
  Odd unused method 'dataTestIsValidMoveOperation' was introduced
  in 550b878e63.
* GlobalVarConfigTest, a3e18c3670.

Change-Id: I5da99f7cd3da68c550ae507ffe1f725d31e7666f
2014-09-18 12:52:44 -07:00
umherirrender
2000672ac3 Fixed spacing
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat

Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
2014-03-20 20:37:30 +00:00
addshore
b4230fa89e Expand MWTimestamp tests
Change-Id: I00215ecd85b7403a05a75d5eaccbbd2819343624
2014-01-26 18:01:07 +01:00
addshore
853291c7d6 Split Timestamp.php into class and exception files
Change-Id: I438adfe5479a1017baee8f2b663f3fb2e49c685a
2014-01-25 16:24:04 +01:00
Renamed from tests/phpunit/includes/TimestampTest.php (Browse further)