The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use strict;
use Test::More 'tests' => 3;
# Test.
my $obj = Data::Commons::Image->new(
'commons_name' => 'Michal from Czechia.jpg',
);
is($obj->comment, undef, 'Get comment (undef - default value).');
# Test.
$obj = Data::Commons::Image->new(
'comment' => 'Michal from Czechia',
'commons_name' => 'Michal from Czechia.jpg',
);
is($obj->comment, 'Michal from Czechia', 'Get comment (Michal from Czechia)');