Skip to content

Commit

Permalink
Porting regression test from master from PR #527
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Feb 7, 2018
1 parent 7c35324 commit 6c7893c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/StacktraceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,25 @@ public function testFromBacktraceWithAnonymousFrame()
$this->assertFrameEquals($frames[2], 'TestClass::triggerError', 'path/to/file', 12);
}


public function testInAppWithEmptyFrame()
{
$stack = [
[
'function' => '{closure}',
],
null
];

$stacktrace = new Stacktrace($this->client);
$stacktrace->addFrame('/some/file', 123, $stack);
$frames = $stacktrace->getFrames();

$this->assertCount(1, $frames);
$this->assertContainsOnlyInstancesOf(Frame::class, $frames);
$this->assertFalse($frames[0]->isInApp());
}

public function testGetFrameArgumentsDoesNotModifyCapturedArgs()
{
// PHP's errcontext as passed to the error handler contains REFERENCES to any vars that were in the global scope.
Expand Down

0 comments on commit 6c7893c

Please sign in to comment.