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.
This commit is contained in:
Julien Fastré 2017-01-09 21:12:48 +01:00
parent 7c57dd3661
commit b5737f4801

View File

@ -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);
}
}
}