diff options
author | Dave Arter <davea@mysociety.org> | 2015-05-07 15:30:14 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:25 +0100 |
commit | 7480ba512f4e88dcc08f50ec890c36141d0f44aa (patch) | |
tree | db620c1b47698b8e3d308a25c02fe47543b66a29 /perllib/FixMyStreet/Map.pm | |
parent | 319b49f0206fda26d7cf0fdc71eed6c4195594ae (diff) |
Allow MAP_TYPE to be overridden by tests
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index b050592ba..81b81f656 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -35,6 +35,16 @@ sub allowed_maps { return grep { $avail{$_} } @allowed; } +=head2 reload_allowed_maps + +Allows tests to override MAP_TYPE at run time. + +=cut + +sub reload_allowed_maps { + @ALL_MAP_CLASSES = allowed_maps(); +} + =head2 map_class Set and return the appropriate class given a query parameter string. |