1use strict; 2use warnings; 3use Test::More; 4use Net::APNs::Extended; 5 6subtest 'basic' => sub { 7 my $apns = Net::APNs::Extended->new( 8 cert_file => 'xxx.cert', 9 key_file => 'yyy.key', 10 ); 11 isa_ok $apns, 'Net::APNs::Extended'; 12 is $apns->is_sandbox, 0; 13 is $apns->host_production, 'gateway.push.apple.com'; 14 is $apns->host_sandbox, 'gateway.sandbox.push.apple.com'; 15 is $apns->port, 2195; 16 is $apns->max_payload_size, 256; 17 is $apns->command, 1; 18 is $apns->password, undef; 19 is $apns->cert_file, 'xxx.cert'; 20 is $apns->key_file, 'yyy.key'; 21 is $apns->cert, undef; 22 is $apns->key, undef; 23 is $apns->read_timeout, 3; 24 is $apns->cert_type, Net::SSLeay::FILETYPE_PEM; 25 is $apns->key_type, Net::SSLeay::FILETYPE_PEM; 26 isa_ok $apns->json, 'JSON::XS'; 27}; 28 29done_testing; 30