FrameCollection: test that getArray does not modify FrameCollection

This commit is contained in:
Denis Sokolov
2014-02-26 17:51:59 +01:00
parent 0937fed4b4
commit 8f1583cc99
@@ -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
*/