aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet.pm')
-rw-r--r--perllib/FixMyStreet.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/perllib/FixMyStreet.pm b/perllib/FixMyStreet.pm
index 645780629..f581631cf 100644
--- a/perllib/FixMyStreet.pm
+++ b/perllib/FixMyStreet.pm
@@ -27,6 +27,28 @@ Thus module has utility functions for the FMS project.
=head1 METHODS
+=head2 test_mode
+
+ FixMyStreet->test_mode( $bool );
+ my $in_test_mode_bool = FixMyStreet->test_mode;
+
+Put the FixMyStreet into test mode - inteded for the unit tests:
+
+ BEGIN {
+ use FixMyStreet;
+ FixMyStreet->test_mode(1);
+ }
+
+=cut
+
+my $TEST_MODE = undef;
+
+sub test_mode {
+ my $class = shift;
+ $TEST_MODE = shift if scalar @_;
+ return $TEST_MODE;
+}
+
=head2 path_to
$path = FixMyStreet->path_to( 'conf/general' );