ConfigFactory: Improve error message for invalid callback
authorUmherirrender <umherirrender_de.wp@web.de>
Sat, 20 Jan 2018 09:44:46 +0000 (10:44 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 20 Jan 2018 09:48:04 +0000 (10:48 +0100)
commit2b3006b49aed9e920431fa0cf64812ce0d22f23c
tree6c20d828b9796b76aa4ef621cb409cc421511884
parent1ed097a16517656998d3e4d00d4e60d710a88f25
ConfigFactory: Improve error message for invalid callback

Getting the following error for an invalid callback in extension
registration is not helpful:
Fatal error: Uncaught exception 'InvalidArgumentException' with message
'Invalid callback provided' in /includes/config/ConfigFactory.php:108

Changed message to
Invalid callback '$1' provided

Added a test case for the instanceof part of the if

Change-Id: I425e2607b651c666336289c2c0d93730bb6312ed
includes/config/ConfigFactory.php
tests/phpunit/includes/config/ConfigFactoryTest.php