6 use aliased 'System::Introspector::Report::Publish::MediaWiki';
11 package TestConnection;
14 use aliased 'System::Introspector::Report::Publish::MediaWiki::Page';
17 my ($self, $name) = @_;
21 content => scalar(io("$FindBin::Bin/data/$name.txt")->slurp),
26 my ($self, $page) = @_;
27 $result{$page->name} = $page->content;
31 my $conn = TestConnection->new;
32 my $wiki = MediaWiki->new(
42 { id => [qw( foo a )],
46 { key => 'bar', label => 'Bar' },
47 { key => 'baz', label => 'Baz' },
50 { bar => 231, baz => 421 },
51 { bar => 232, baz => 884 },
52 { bar => 332, baz => 784 },
55 { id => [qw( foo b )],
59 { key => 'bar', label => 'Bar' },
60 { key => 'baz', label => 'Baz' },
63 { bar => 231, baz => 421 },
64 { bar => 332, baz => 784 },
67 { id => [qw( foo c )],
71 { key => 'bar', label => 'New Bar' },
72 { key => 'baz', label => 'New Baz' },
75 { bar => 232, baz => 884 },
76 { bar => 332, baz => 784 },
83 $string =~ s{[\s\n]+}{}g;
87 ## uncomment to regenerate result file
88 # do { no warnings; $result{foo} > io("$FindBin::Bin/data/result/foo.txt") };
90 is $result{foo}->$_despace,
91 scalar(io("$FindBin::Bin/data/result/foo.txt")->slurp)->$_despace,
92 'resulting page looks correct';