CSS-Inliner

 view release on metacpan or  search on metacpan

t/embedded_style_block.t  view on Meta::CPAN


open( my $fh, $result_file ) or die "can't open $result_file: $!!\n";
my $correct_result = do { local( $/ ) ; <$fh> } ;

my $inliner = CSS::Inliner->new();

eval {
  $inliner->fetch_file({ url => $test_url });
};

## conditional test plan based on whether or not the endpoint can be reached - frequently can't by cpan testers
plan $@ ? (skip_all => 'Connectivity for endpoint required for test cannot be established') : (tests => 2);

my $inlined = $inliner->inlinify();

ok($inlined eq $correct_result, 'result was correct');

$result_file = $html_path . 'embedded_style_result_encoded.html';

open( $fh, $result_file ) or die "can't open $result_file: $!!\n";
$correct_result = do { local( $/ ) ; <$fh> } ;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.118 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )