resourceloader: Improve test coverage of ResourceLoader::register()
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 4 May 2018 01:15:24 +0000 (02:15 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 4 May 2018 01:15:24 +0000 (02:15 +0100)
commit94f71346e8f89d5946a0829e083f40b9abc3fb18
tree8e74183c80a6fd2201c3f8bbac445563db13ffe7
parent4da760c56a2684b18e2eccc211630c03d020bab9
resourceloader: Improve test coverage of ResourceLoader::register()

Verify that calling register() twice does not throw, but warns,
and that the last registration wins.

This behaviour was actually surprising to me because it used to
throw, and I'd assume that when we added the warning, the behaviour
would go from fatal to non-fatal, but keep that the last one is
at fault/unsupported.

Perhaps b1ea0612 / d3e3bcfd6 (T116628) should've added a return
statement. Oh well, we can consider changing that later, but at
least test for it.

Change-Id: I955132868146ea5bf88c9b9e648c84d8196cb1f9
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php