1Test::Stream::Event::PlUasne(r3)Contributed Perl DocumenTteastti:o:nStream::Event::Plan(3)
2
3
4
6 Test::Stream::Event::Plan - The event of a plan
7
9 This distribution is deprecated in favor of Test2, Test2::Suite, and
10 Test2::Workflow.
11
12 See Test::Stream::Manual::ToTest2 for a conversion guide.
13
15 Plan events are fired off whenever a plan is declared, done testing is
16 called, or a subtext completes.
17
19 use Test::Stream::Context qw/context/;
20 use Test::Stream::Event::Plan;
21
22 my $ctx = context();
23
24 # Plan for 10 tests to run
25 my $event = $ctx->plan(10);
26
27 # Plan to skip all tests (will exit 0)
28 $ctx->plan(0, skip_all => "These tests need to be skipped");
29
31 $num = $plan->max
32 Get the number of expected tests
33
34 $dir = $plan->directive
35 Get the directive (such as TODO, skip_all, or no_plan).
36
37 $reason = $plan->reason
38 Get the reason for the directive.
39
41 The source code repository for Test::Stream can be found at
42 http://github.com/Test-More/Test-Stream/.
43
45 Chad Granum <exodist@cpan.org>
46
48 Chad Granum <exodist@cpan.org>
49
51 Copyright 2015 Chad Granum <exodist7@gmail.com>.
52
53 This program is free software; you can redistribute it and/or modify it
54 under the same terms as Perl itself.
55
56 See http://dev.perl.org/licenses/
57
58
59
60perl v5.28.0 2016-02-05 Test::Stream::Event::Plan(3)