Server IP : 51.89.169.208 / Your IP : 18.191.251.36 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/usr/share/doc/perl-Test-Simple/t/Test2/modules/Event/ |
Upload File : |
use strict; use warnings; use Test2::Tools::Tiny; use Test2::API qw/intercept context/; use ok 'Test2::Event::Fail'; my $CLASS = 'Test2::Event::Fail'; my $one = $CLASS->new(name => 'no soup for you'); is($one->summary, "fail", 'summary'); is($one->increments_count, 1, 'increments_count'); is($one->diagnostics, 0, 'diagnostics'); is($one->no_display, 0, 'no_display'); is($one->subtest_id, undef, 'subtest_id'); is($one->terminate, undef, 'terminate'); is($one->global, undef, 'global'); is($one->sets_plan, undef, 'sets_plan'); is($one->causes_fail, 1, 'causes_fail'); $one->add_amnesty({tag => 'blah', details => 'blah'}); is($one->causes_fail, 0, 'causes_fail is off with amnesty'); $one->add_info({tag => 'xxx', details => 'yyy'}); is_deeply( $one->facet_data, { about => {package => $CLASS, details => 'fail', eid => $one->eid}, assert => {pass => 0, details => 'no soup for you'}, amnesty => [{tag => 'blah', details => 'blah'}], info => [{tag => 'xxx', details => 'yyy'}], }, "Got facet data" ); done_testing;