diff --git a/tests/Whoops/Exception/FrameTest.php b/tests/Whoops/Exception/FrameTest.php index 72c6250..5356c6f 100644 --- a/tests/Whoops/Exception/FrameTest.php +++ b/tests/Whoops/Exception/FrameTest.php @@ -103,6 +103,20 @@ class FrameTest extends TestCase $this->assertStringEqualsFile($data['file'], $frame->getFileContents()); } + /** + * @covers Whoops\Exception\Frame::getFileContents + * @testWith ["[internal]"] + * ["Unknown"] + * @see https://github.com/filp/whoops/pull/599 + */ + public function testGetFileContentsWhenFrameIsNotRelatedToSpecificFile($fakeFilename) + { + $data = array_merge($this->getFrameData(), ['file' => $fakeFilename]); + $frame = $this->getFrameInstance($data); + + $this->assertNull($frame->getFileContents()); + } + /** * @covers Whoops\Exception\Frame::getFileLines */