title: PhpUnit testing the filemtime function
body: <p>I have a function that uses <code>filemtime</code> as it's main functionality and I'm unsure of how to test this with PHPUnit.</p>
  <pre><code>try {
      $time = filemtime($myPath);
  } catch (Exception $e) {
      error_log(&quot;Couldn't find file time&quot;);
  }
  // Do things with $time
  </code></pre>
  <p>Would it be best to try and mock the <code>filemtime</code> or would it be best to create some sort of temp file?</p>