| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 20 | public function __construct() |
|
| 21 | { |
||
| 22 | $htaccessFile = <<<'EOD' |
||
| 23 | 20 | <IfModule mod_dir.c> |
|
| 24 | DirectoryIndex index2.html |
||
| 25 | </IfModule> |
||
| 26 | EOD; |
||
| 27 | |||
| 28 | $test = [ |
||
| 29 | 20 | 'subdir' => 'directory-index', |
|
| 30 | 'files' => [ |
||
| 31 | 20 | ['.htaccess', $htaccessFile], |
|
| 32 | ['index.html', "0"], |
||
| 33 | ['index2.html', "1"] |
||
| 34 | ], |
||
| 35 | 'request' => [ |
||
| 36 | 'url' => '', // We request the index, that is why its empty |
||
| 37 | 'bypass-standard-error-handling' => ['404'] |
||
| 38 | ], |
||
| 39 | 'interpretation' => [ |
||
| 40 | ['success', 'body', 'equals', '1'], |
||
| 41 | ['failure', 'body', 'equals', '0'], |
||
| 42 | ['failure', 'status-code', 'equals', '404'], // "index.html" might not be set to index |
||
| 43 | ] |
||
| 44 | ]; |
||
| 45 | |||
| 46 | 20 | parent::__construct($test); |
|
| 47 | 20 | } |
|
| 49 |