/** * @return string */ protected function getLockFile() { $tmp = $this->tmpDir; $job = $this->helper->escape($this->job); if (!empty($this->config['environment'])) { $env = $this->helper->escape($this->config['environment']); return "{$tmp}/{$env}-{$job}.lck"; } else { return "{$tmp}/{$job}.lck"; } }
/** * @param string $input * @param string $expected * * @dataProvider dataProviderTestEscape */ public function testEscape($input, $expected) { $actual = $this->helper->escape($input); $this->assertEquals($expected, $actual); }