/**
* @expectedException \InvalidArgumentException
*/
public function testWriteToFileThrowsExceptionWhenFileIsNotWritable()
{
$this->crontabFileHandler->parseFromFile($this->crontab, $this->fixtureFile);
touch($this->tempFile);
chmod($this->tempFile, 0400);
$this->crontabFileHandler->writeToFile($this->crontab, $this->tempFile);
// Expected an InvalidArgumentException because the file is not writable.
}