public function test_it_returns_a_404_for_missing_file() { $e = (new SampleExceptionHandler())->render(FileNotFoundException::fileNotFound('non/existing.jpg')); $this->assertHttpException($e, 404); }
/** * Ensure that a valid source has been provided. * @return void * @throws \Plank\Mediable\Exceptions\MediaUpload\ConfigurationException If no source is provided * @throws \Plank\Mediable\Exceptions\MediaUpload\FileNotFoundException If the source is invalid */ private function verifySource() { if (empty($this->source)) { throw ConfigurationException::noSourceProvided(); } if (!$this->source->valid()) { throw FileNotFoundException::fileNotFound($this->source->path()); } }