Added tests

This commit is contained in:
SilverFire - Dmitry Naumenko
2018-10-22 16:10:42 +03:00
parent 388bcebb9d
commit fd596a0b39
+14
View File
@@ -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
*/