1 | <?php |
||
15 | class FeatureTesterDecorator implements SpecificationTester |
||
16 | { |
||
17 | /** |
||
18 | * @var SpecificationTester |
||
19 | */ |
||
20 | private $featureTester; |
||
21 | |||
22 | /** |
||
23 | * @var Config |
||
24 | */ |
||
25 | private $config; |
||
26 | |||
27 | /** |
||
28 | * @param SpecificationTester $featureTester |
||
29 | * @param Config $config |
||
30 | */ |
||
31 | public function __construct(SpecificationTester $featureTester, Config $config) |
||
36 | |||
37 | /** |
||
38 | * Sets up specification for a test. |
||
39 | * |
||
40 | * @param Environment $env |
||
41 | * @param mixed $spec |
||
42 | * @param Boolean $skip |
||
43 | * |
||
44 | * @return Setup |
||
45 | */ |
||
46 | public function setUp(Environment $env, $spec, $skip) |
||
50 | |||
51 | /** |
||
52 | * Tests provided specification. |
||
53 | * |
||
54 | * @param Environment $env |
||
55 | * @param mixed $spec |
||
56 | * @param Boolean $skip |
||
57 | * |
||
58 | * @return TestResult |
||
59 | */ |
||
60 | public function test(Environment $env, $spec, $skip) |
||
68 | |||
69 | /** |
||
70 | * Tears down specification after a test. |
||
71 | * |
||
72 | * @param Environment $env |
||
73 | * @param mixed $spec |
||
74 | * @param Boolean $skip |
||
75 | * @param TestResult $result |
||
76 | * |
||
77 | * @return Teardown |
||
78 | */ |
||
79 | public function tearDown(Environment $env, $spec, $skip, TestResult $result) |
||
83 | |||
84 | /** |
||
85 | * @param FeatureNode $feature |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | private function shouldSkipFeature(FeatureNode $feature) |
||
95 | } |
||
96 |