From b5737f480197da170bd1ad19f421a708ce8e8134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 9 Jan 2017 21:12:48 +0100 Subject: [PATCH] clone query builder to avoid to run test on altered queries if the instance is not cloned, the queryBuilder is used multiple times, and the second test is run on an already altered test. --- Test/Export/AbstractAggregatorTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Test/Export/AbstractAggregatorTest.php b/Test/Export/AbstractAggregatorTest.php index 0f2e08f39..d7623788b 100644 --- a/Test/Export/AbstractAggregatorTest.php +++ b/Test/Export/AbstractAggregatorTest.php @@ -77,7 +77,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase { foreach ($this->getQueryBuilders() as $qb) { foreach ($this->getFormData() as $data) { - yield array($qb, $data); + yield array(clone $qb, $data); } } } @@ -89,7 +89,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase { foreach ($this->getQueryBuilders() as $qb) { foreach ($this->getFormData() as $data) { - yield array($qb, $data); + yield array(clone $qb, $data); } } }