Skip to content

Commit 9c22823

Browse files
committed
Document why unserialize() is needed for tests
Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 5f79069 commit 9c22823

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/bootstrap.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ public function getErrorsAsArray($obj)
6565
*/
6666
public function getData($name)
6767
{
68+
/*
69+
* The unrestricted unserialize() is needed here as we do have
70+
* serialized objects in the tests. There should be no security risk as
71+
* the test data comes with the repository.
72+
*/
6873
$data = unserialize(file_get_contents('tests/data/' . $name . '.out'));
6974
$data['query'] = file_get_contents('tests/data/' . $name . '.in');
7075
return $data;

0 commit comments

Comments
 (0)