Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
30 / 30 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
ContentDigestTester | |
100.00% |
30 / 30 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
30 / 30 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace HtaccessCapabilityTester\Testers; |
4 | |
5 | /** |
6 | * Class for testing if setting ContentDigest works |
7 | * |
8 | * @package HtaccessCapabilityTester |
9 | * @author Bjørn Rosell <it@rosell.dk> |
10 | * @since Class available since 0.7 |
11 | */ |
12 | class ContentDigestTester extends CustomTester |
13 | { |
14 | |
15 | /** |
16 | * Constructor. |
17 | * |
18 | * @return void |
19 | */ |
20 | public function __construct() |
21 | { |
22 | $test = [ |
23 | 'subdir' => 'content-digest', |
24 | 'subtests' => [ |
25 | [ |
26 | 'subdir' => 'on', |
27 | 'files' => [ |
28 | ['.htaccess', 'ContentDigest On'], |
29 | ['request-me.txt', 'hi'], |
30 | ], |
31 | 'request' => 'request-me.txt', |
32 | 'interpretation' => [ |
33 | ['failure', 'headers', 'not-contains-key', 'Content-MD5'], |
34 | ] |
35 | ], |
36 | [ |
37 | 'subdir' => 'off', |
38 | 'files' => [ |
39 | ['.htaccess', 'ContentDigest Off'], |
40 | ['request-me.txt', "hi"], |
41 | ], |
42 | 'request' => 'request-me.txt', |
43 | 'interpretation' => [ |
44 | ['failure', 'headers', 'contains-key', 'Content-MD5'], |
45 | ['inconclusive', 'status-code', 'not-equals', '200'], |
46 | ['success', 'status-code', 'equals', '200'], |
47 | ] |
48 | ] |
49 | ] |
50 | ]; |
51 | |
52 | parent::__construct($test); |
53 | } |
54 | } |