Add ARM files
[dh-make-perl] / dev / arm / libwww-mechanize-perl / libwww-mechanize-perl-1.34 / t / image-new.t
1 #!perl -Tw
2
3 use warnings;
4 use strict;
5
6 use Test::More tests=>10;
7
8 BEGIN {
9     use_ok( 'WWW::Mechanize::Image' );
10 }
11
12 # test new style API
13 my $link = WWW::Mechanize::Image->new( {
14     url  => 'url.html',
15     base => 'http://base.example.com/',
16     name => 'name',
17     alt  => 'alt',
18     tag  => 'a',
19     height => 2112,
20     width => 5150,
21 } );
22
23 is( $link->url, 'url.html', 'url() works' );
24 is( $link->base, 'http://base.example.com/', 'base() works' );
25 is( $link->name, 'name', 'name() works' );
26 is( $link->alt, 'alt', 'alt() works' );
27 is( $link->tag, 'a', 'tag() works' );
28 is( $link->height, 2112, 'height works' );
29 is( $link->width, 5150, 'width works' );
30 is( $link->url_abs, 'http://base.example.com/url.html', 'url_abs works' );
31 isa_ok( $link->URI, 'URI::URL', 'Returns an object' );