File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,9 @@ public function componentClassResourcePath($class)
265265 }
266266 return Path::system (dirname (realpath ($ file )), '_resources ' );
267267 }
268+ // @codeCoverageIgnoreStart
268269 throw new RuntimeException ("No Class Loader Defined " );
270+ // @codeCoverageIgnoreEnd
269271 }
270272
271273 protected function _getClassLoader ()
Original file line number Diff line number Diff line change @@ -240,7 +240,9 @@ public function getFileHash($fullPath)
240240 $ hash = apcu_fetch ($ key , $ exists );
241241 if ($ exists && $ hash )
242242 {
243+ // @codeCoverageIgnoreStart
243244 return $ hash ;
245+ // @codeCoverageIgnoreEnd
244246 }
245247 }
246248
Original file line number Diff line number Diff line change @@ -51,4 +51,11 @@ public function testFavicon()
5151 $ this ->assertEquals ($ full , $ fromFile );
5252 $ this ->assertEquals ('"40ed4027e1e5f15c19a2fb287bcc3724" ' , $ fromFile ->getEtag ());
5353 }
54+
55+ public function testMissingFile ()
56+ {
57+ $ fromFile = ResourceFactory::fromFile ('invalidfile ' );
58+ $ this ->assertInstanceOf (Response::class, $ fromFile );
59+ $ this ->assertEquals (404 , $ fromFile ->getStatusCode ());
60+ }
5461}
You can’t perform that action at this time.
0 commit comments