blob: aa1a63c2129d4829c2c8564a7f81499273f99360 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package FixMyStreet::Test;
use parent qw(Exporter);
use strict;
use warnings FATAL => 'all';
use utf8;
use Test::More;
use mySociety::Locale;
BEGIN {
use FixMyStreet;
FixMyStreet->test_mode(1);
mySociety::Locale::gettext_domain('FixMyStreet', 1);
}
use FixMyStreet::DB;
my $db = FixMyStreet::DB->schema->storage;
sub import {
strict->import;
warnings->import(FATAL => 'all');
utf8->import;
Test::More->export_to_level(1);
$db->txn_begin;
}
END {
$db->txn_rollback if $db;
}
1;
|