| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function testNoAccessFile() |
||
| 33 | { |
||
| 34 | // existed file without write access for current user. |
||
| 35 | // for Ubuntu is /etc/hosts. |
||
| 36 | $file_name = "/etc/hosts"; |
||
| 37 | |||
| 38 | if (!file_exists($file_name)) { |
||
| 39 | self::markTestSkipped("test only for *nix."); |
||
| 40 | } |
||
| 41 | |||
| 42 | if (is_writable($file_name)) { |
||
| 43 | self::markTestSkipped("test runned under super/admin user. Change user."); |
||
| 44 | } |
||
| 45 | |||
| 46 | $this->expectException("DanchukAS\DenyMultiplyRun\Exception\OpenFileFail"); |
||
| 47 | DenyMultiplyRun::setPidFile($file_name); |
||
| 48 | } |
||
| 50 |