public function testWriteToFileIsSuccessfulWhenFileIsWritable()
{
$this->crontabFileHandler->parseFromFile($this->crontab, $this->fixturesDir . '/crontab');
$file = tempnam(sys_get_temp_dir(), 'cron');
$this->crontabFileHandler->writeToFile($this->crontab, $file);
$this->assertSame($this->crontab->render() . PHP_EOL, file_get_contents($file));
unlink($file);
}