Skip to content

Commit

Permalink
OtterTest::TestRegion::local_xml_parsed()
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gray committed Feb 9, 2015
1 parent 428b3cf commit 7969162
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion t/lib/OtterTest/TestRegion.pm
Expand Up @@ -13,7 +13,7 @@ use Bio::Vega::Gene;
use Bio::Vega::Transform::Otter;

use Exporter qw( import );
our @EXPORT_OK = qw( check_xml extra_gene add_extra_gene_xml region_is %test_region_params local_xml_copy );
our @EXPORT_OK = qw( check_xml extra_gene add_extra_gene_xml region_is %test_region_params local_xml_copy local_xml_parsed );

our %test_region_params = ( ## no critic (Variables::ProhibitPackageVars)
dataset => 'human_test',
Expand Down Expand Up @@ -195,6 +195,18 @@ __EO_GENE_XML__
}
}

sub local_xml_parsed {
require XML::Simple;
XML::Simple->import(':strict');
my $xs = XML::Simple->new(
ForceArray => [],
KeyAttr => [],
);
my $xml = local_xml_copy();
my $parsed = $xs->XMLin($xml);
return $parsed;
}

# YUK - this ain't great! Maybe we should query the production server via HTTP.
#
sub local_xml_copy {
Expand Down

0 comments on commit 7969162

Please sign in to comment.