Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
18 / 18 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
InnocentRequestTester | |
100.00% |
18 / 18 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
18 / 18 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace HtaccessCapabilityTester\Testers; |
4 | |
5 | use \HtaccessCapabilityTester\TestResult; |
6 | |
7 | /** |
8 | * Class for testing if an innocent request for a txt file succeeds |
9 | * |
10 | * @package HtaccessCapabilityTester |
11 | * @author Bjørn Rosell <it@rosell.dk> |
12 | * @since Class available since 0.7 |
13 | */ |
14 | class InnocentRequestTester extends CustomTester |
15 | { |
16 | |
17 | public function __construct() |
18 | { |
19 | $test = [ |
20 | 'subdir' => 'innocent-request', |
21 | 'files' => [ |
22 | ['request-me.txt', 'thank you my dear'], |
23 | ], |
24 | 'request' => [ |
25 | 'url' => 'request-me.txt', |
26 | 'bypass-standard-error-handling' => ['all'] |
27 | ], |
28 | 'interpretation' => [ |
29 | ['success', 'status-code', 'equals', '200'], |
30 | ['inconclusive', 'status-code', 'equals', '0'], |
31 | ['inconclusive', 'status-code', 'equals', '403'], |
32 | ['inconclusive', 'status-code', 'equals', '404'], |
33 | ['failure'], |
34 | ] |
35 | ]; |
36 | |
37 | parent::__construct($test); |
38 | } |
39 | } |