Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
13 | public function testLogFileNameSanitised() { |
||
14 | $log = new DeploynautLogFile('SomeSortOf Filename (UAT).log', $this->basePath); |
||
15 | $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/somesortof-filename-uat.log'); |
||
1 ignored issue
–
show
|
|||
16 | |||
17 | $log = new DeploynautLogFile('..SomeSortOf Filename_(UAT).log', $this->basePath); |
||
18 | $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/somesortof-filename-uat.log'); |
||
1 ignored issue
–
show
|
|||
19 | |||
20 | $log = new DeploynautLogFile('test-project.1823.log', $this->basePath); |
||
21 | $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/test-project.1823.log'); |
||
1 ignored issue
–
show
|
|||
22 | } |
||
23 | |||
61 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.