]> iEval git - html-element-library.git/blame - t/wrap_content.t
Refactor tests (first pass)
[html-element-library.git] / t / wrap_content.t
CommitLineData
aa016126
MG
1#!/usr/bin/perl
2use t::lib tests => 1;
67e78ff2 3
aa016126
MG
4my $t1 = HTML::Element->new_from_lol(
5 ['html',
6 ['head',
7 [ 'title', 'I like stuff!' ]],
8 ['body', {id => 'corpus'}, {'lang', 'en-JP'},
9 'stuff',
10 ['p', ['span', {id => 'wrapme'}, 'um, p < 4!'], {'class' => 'par123'}],
11 ['div', {foo => 'bar'}, '123'], # at 0.1.2
12 ['div', {jack => 'olantern'}, '456']]]); # at 0.1.2
67e78ff2 13
14my $bold = HTML::Element->new('b', id => 'wrapper');
15
aa016126
MG
16my $w = $t1->look_down('id' => 'wrapme');
17$w->wrap_content($bold);
18isxml $w, \'<span id="wrapme"><b id="wrapper">um, p &lt; 4!</b></span>', 'wrap_content';
This page took 0.023956 seconds and 4 git commands to generate.