public static function fileNotFound($path)
{
return new static("File `{$path}` does not exist.");
}
public function test_it_returns_a_404_for_missing_file() { $e = (new SampleExceptionHandler())->render(FileNotFoundException::fileNotFound('non/existing.jpg')); $this->assertHttpException($e, 404); }