projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8166e90
)
(NFC) ArrayTest - Speed up ~50%
author
Tim Otten
<totten@civicrm.org>
Thu, 26 Jan 2023 08:07:43 +0000
(
00:07
-0800)
committer
Tim Otten
<totten@civicrm.org>
Thu, 26 Jan 2023 08:16:01 +0000
(
00:16
-0800)
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
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/CRM/Utils/ArrayTest.php
b/tests/phpunit/CRM/Utils/ArrayTest.php
index 631aa58c41ac058c7f28b1cc61b1829cd4755db4..d76f3dce3e9f990ce6458508fd523f64258f03fe 100644
(file)
--- 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],