registration: Fix handling of MessagesDirs array and add tests
authorKunal Mehta <legoktm@gmail.com>
Fri, 30 Jan 2015 20:56:02 +0000 (12:56 -0800)
committerKunal Mehta <legoktm@gmail.com>
Fri, 30 Jan 2015 21:00:22 +0000 (13:00 -0800)
commitf2daeaa7494b40400a927b00c92daf4b9831687b
treeb932ee1105444dd91ae378f3568100c680bcd938
parent576adbca56671e3d4a0059d83dd8961a15dde867
registration: Fix handling of MessagesDirs array and add tests

Previously the code was designed to handle:
  "MessagesDirs": {
    "FooBar": "i18n"
  }

However, it can also be an array, and some extensions (VisualEditor)
use it like:

  "MessagesDirs": {
    "FooBar": [
      "i18n",
      "also-i18n"
    ]
  }

This properly handles both strings and arrays and adds tests to verify
the behavior.

Change-Id: Iff1523b86f754cac1f5b8d822d4324c5fbfc1a50
includes/registration/ExtensionProcessor.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php