ApiResult: Fix size checking
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 8 Sep 2015 15:40:23 +0000 (11:40 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 8 Sep 2015 15:40:23 +0000 (11:40 -0400)
commit46322fff07f204793d60c2e64171c90e5e29b17f
tree2514fa1d6b69ae68ce0b532c4666a016e767f020
parent2ac96b61739f91519069066c31f8a6bd9b73f6cd
ApiResult: Fix size checking

Two bugs here:
* Setting NO_SIZE_CHECK also bypassed validation
* ApiResult::valueSize() didn't handle ApiSerializable, which is fixed
  by defining that the value needs to be passed through
  ApiResult::validateValue() first.

Bug: T111796
Change-Id: I7c00d8ee53364a26f8f63f82a4d83b92baf5383e
includes/api/ApiResult.php
tests/phpunit/includes/api/ApiResultTest.php