wiki.techinc.nl/tests/phpunit/includes/specials
Kevin Israel 19473fa625 Special:BookSources: Correct validation of ISBNs containing X
PHP's "equal" (==) operator considers the integer 0 to be equal to
the string 'X', and when 'X' is converted to a number, it becomes 0.
Neither is desired here.

* Fail when an X is encountered while calculating the check digit.
  (X can only occur as the check digit of an ISBN-10.)
* Fixed the check digit comparisons by adding an explicit string cast.
* Used the "identical" operator to make it more obvious that no type
  juggling should take place during the comparisons.
* Added some test cases.
* Removed an outdated TODO.

Bug: 67021
Change-Id: I85f53c41f403a60340e9441757fe66b9764e623c
2014-10-01 19:14:39 +00:00
..
ImageListPagerTest.php PHPUnit: Add Database tags 2014-09-16 18:42:27 -07:00
QueryAllSpecialPagesTest.php Pass phpcs-strict on some test files (10/11) 2014-04-24 13:50:56 -07:00
SpecialBooksourcesTest.php Special:BookSources: Correct validation of ISBNs containing X 2014-10-01 19:14:39 +00:00
SpecialMIMESearchTest.php PHPUnit: Add Database tags 2014-09-16 18:42:27 -07:00
SpecialMyLanguageTest.php test: Clean up data providers that should be static 2014-09-18 12:52:44 -07:00
SpecialPreferencesTest.php Make SpecialPreferencesTest::testBug41337 non-risky 2014-06-26 17:48:55 -07:00
SpecialRecentchangesTest.php ChangesListSpecialPage: Implement buildMainQueryConds() 2014-01-27 18:32:41 +01:00
SpecialSearchTest.php Merge "Remove unused private var and fix phpdoc" 2014-08-22 23:32:30 +00:00