| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function getSnapshotId(): string |
||
| 27 | { |
||
| 28 | $name = (new \ReflectionClass($this))->getShortName().'_'. |
||
| 29 | $this->getName().'_'. |
||
| 30 | $this->snapshotIncrementor; |
||
| 31 | |||
| 32 | $replaced = \preg_replace('/(\s+|\W+)/ui', '_', $name); |
||
| 33 | |||
| 34 | if (\mb_strlen($replaced) >= self::WINDOWS_FILE_NAME_LENGTH_LIMIT) { |
||
| 35 | throw new \Exception('Very long filename, please rename test or test case name!'); |
||
| 36 | } |
||
| 37 | |||
| 38 | return $replaced; |
||
| 39 | } |
||
| 40 | } |
||
| 41 |