From 72e287b2d540943fa87db253099d8ff6a0449858 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 26 Jan 2023 00:07:43 -0800 Subject: [PATCH] (NFC) ArrayTest - Speed up ~50% Before: On local i3-12100, takes ~17s (avg over two runs) After: On local i3-12100, take ~8s (avg over two runs) --- tests/phpunit/CRM/Utils/ArrayTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/CRM/Utils/ArrayTest.php b/tests/phpunit/CRM/Utils/ArrayTest.php index 631aa58c41..d76f3dce3e 100644 --- a/tests/phpunit/CRM/Utils/ArrayTest.php +++ b/tests/phpunit/CRM/Utils/ArrayTest.php @@ -6,6 +6,14 @@ */ class CRM_Utils_ArrayTest extends CiviUnitTestCase { + /** + * Set up for tests. + */ + public function setUp(): void { + $this->useTransaction(); + parent::setUp(); + } + public function testAsColumns() { $rowsNum = [ ['a' => 10, 'b' => 11], -- 2.25.1