Commit graph

19 commits

Author SHA1 Message Date
Max Semenik f53debae7d Namespace this extension
Change-Id: I0c7719f17f74180a4c85f914888262f7e3b13111
2019-04-03 19:20:14 -07:00
Max Semenik 593529bc72 Simplify test code
No point in having a property and setUp() just to create a
parameterless class.

Change-Id: I5e7838004d306aac767380280280eed3108e2253
2019-03-27 20:53:55 -07:00
jenkins-bot c692534ef4 Merge "Update tests to match parser changes" 2019-03-19 14:37:13 +00:00
jenkins-bot f1604084fa Merge "Update tests to match parser changes" 2019-03-19 14:18:28 +00:00
Arlo Breault 5c6ef32a11 Update tests to match parser changes
Bug: T208070
Depends-On: I3da235cb83efa424f0cf1cf4fc7233240fcdf6b2
Change-Id: I47d1d9620031036b9497cacf70b34a45c3e5f409
2019-03-19 14:07:19 +00:00
Kunal Mehta ab601a2ca7 Upgrade to newer phan
Bug: T216933
Change-Id: If8a63da99343597b7f8c131f3656945eaf67d819
2019-03-16 22:39:09 -07:00
Arlo Breault ae237035f1 Update tests to match parser changes
Bug: T208070
Depends-On: I3da235cb83efa424f0cf1cf4fc7233240fcdf6b2
Change-Id: I74953d5de765a2245a2999f17c7ae1cf49376bd1
2019-03-15 18:24:34 +00:00
Alexia E. Smith cf1480cb96 Fix E_WARNING with {{#pos:}} if the offset is larger than the string
The mb_strpos() function throws E_WARNING if the offset is longer
than the length of the string.

Bug: T209600
Change-Id: Ib4296ba136eaf5c8461681e9d5f108118b2494f4
2018-11-15 12:50:32 -08:00
Umherirrender 99659b32c2 Add method scope visibility
Change-Id: I116b91653c01ace9fa0d9a49f2fa43375ef2924d
2018-11-01 19:50:46 +01:00
Jayprakash12345 e6385dfb32 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I41d7ee671ca103097271379df83cf63d979ee709
2018-04-13 14:58:29 +00:00
Kunal Mehta 23e9751985 build: Updating mediawiki/mediawiki-phan-config to 0.2.0
Change-Id: Ib60f7228deb749ac817fab0f28e2f8c937541cf3
2018-04-05 17:16:51 -07:00
Kunal Mehta 2abee407f2 Add phan configuration
Change-Id: I1127f08213d5ce3f33381506027dc8129cf6aa6c
2018-02-24 14:09:51 -08:00
Kunal Mehta be4f4b1858 Add @covers tag
Change-Id: Ib12892b36b2d1254cfcc861a3a84d859d5834a3f
2018-02-16 20:57:24 -08:00
Kunal Mehta 908f029b80 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: Iaa65f1987144baffd480d082538547fc9cf2c15b
2017-06-25 13:48:36 +00:00
Umherirrender 04e4c1b300 Add phpcs and make pass
Change-Id: I8f985ca83223f1a2fdb4365294701f3b1d9b019b
2017-06-06 19:51:28 +00:00
Reedy adf6a2edc8 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I075b7f6b5e11ead988b0baba5d85745dbb9ac480
2016-08-05 21:24:45 +01:00
Brad Jorsch 0fb7807e9a (bug 43451) Restore old behavior of 'mod', add 'fmod'
In trying to fix bug 35866, I32c9eca6 changed the behavior of 'mod' to
no longer cast its arguments to integers, which conventiently also
solved bug 6068. However, this also broke many existing uses that
depended on that casting.

This change reverts 'mod' to its old behavior while still solving bug
35866, and at the same time adds a new 'fmod' operator with the new
behavior to keep bug 6068 fixed as well.

Change-Id: I6114c6e769119e6ced61b3b55b6f70b03b5b1ebe
2012-12-28 16:27:23 -05:00
Reedy 1a96b47d94 (Bug 35866) ParserFunctions: Division by zero in Expr.php
The PHP modulo operator ('%') casts its operands to ints, causing
floating point values 0 < $right < 1 to raise a divide-by-zero error.
Explicitly casting both operands to float and using fnmod() resolves the
issue. This change also tidies up the check for zero values and adds
tests.

Change-Id: I32c9eca6552e4fec248eb4fa6419faa39c10df3b
2012-12-11 03:21:58 -08:00
Reedy 57a6ec2942 Bug 42809 - Replace testExpr with a PHPUnit test
Change-Id: I338af01b50684b5849ca198eac536eacdc916ec6
2012-12-07 18:34:58 +01:00