mirror of
https://github.com/filp/whoops.git
synced 2026-09-17 21:26:34 +00:00
FrameCollection: test that getArray does not modify FrameCollection
This commit is contained in:
@@ -160,6 +160,18 @@ class FrameCollectionTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Whoops\Exception\FrameCollection::getArray
|
||||
*/
|
||||
public function testGetArrayImmutable()
|
||||
{
|
||||
$frames = $this->getFrameCollectionInstance();
|
||||
$arr = $frames->getArray();
|
||||
$arr[0] = 'foobar';
|
||||
$newCopy = $frames->getArray();
|
||||
$this->assertFalse($arr[0] === $newCopy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Whoops\Exception\FrameCollection::getIterator
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user