From 778d1969886f5574add641f53f3b9f994d56d7c0 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 19 May 2018 14:04:25 +1000 Subject: [PATCH] dev/core#130 Remove deprecated create_function from RegionTest in favor of an annoymous function --- tests/phpunit/CRM/Core/RegionTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Core/RegionTest.php b/tests/phpunit/CRM/Core/RegionTest.php index 121129862f..3f4956eba1 100644 --- a/tests/phpunit/CRM/Core/RegionTest.php +++ b/tests/phpunit/CRM/Core/RegionTest.php @@ -73,11 +73,15 @@ class CRM_Core_RegionTest extends CiviUnitTestCase { )); CRM_Core_Region::instance('testAllTypes')->add(array( // note: returns a value which gets appended to the region - 'callback' => create_function('&$spec, &$html', 'return "callback-return
";'), + 'callback' => function(&$spec, &$html) { + return "callback-return
"; + }, )); CRM_Core_Region::instance('testAllTypes')->add(array( // note: returns void; directly modifies region's $html - 'callback' => create_function('&$spec, &$html', '$html = "callback-ref
" . $html;'), + 'callback' => function(&$spec, &$html) { + $html = "callback-ref
" . $html; + }, )); CRM_Core_Region::instance('testAllTypes')->add(array( 'scriptUrl' => '/foo%20bar.js', -- 2.25.1