resourceloader: Create unit tests for ResourceLoaderContext
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 29 Aug 2016 23:35:55 +0000 (16:35 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 29 Aug 2016 23:47:15 +0000 (16:47 -0700)
commitc4e5cc2957e76ed36bf6b7b5fb71670fc40feb1d
tree5ae6257f7c1feee071599613b9dcc63d5ac1e5cd
parentbb8608c98a3d677d8557dd7056a7434c7c38c055
resourceloader: Create unit tests for ResourceLoaderContext

* Fix up one last use of global config vars in this class.
  Other places in this class already used $rl->getConfig().
  This way we don't inherit all of MediaWikiTestCase.

* Add unit tests covering all of ResourceLoaderContext
  except expandModuleNames and getImageObj (tested in better
  places already with the right @covers).

* Increase coverage for expandModuleNames(), add missing case
  of when modules are not in alphabetical order.

Change-Id: Id19b084d37a6c3a77b36e03509adffb6b156fee1
includes/resourceloader/ResourceLoaderContext.php
tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php [new file with mode: 0644]
tests/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php