Skip to content

Commit 162211d

Browse files
committed
Coverage update
1 parent 410175d commit 162211d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/Dispatch.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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()

src/ResourceManager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

tests/Resources/ResourceFactoryTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)