Browse Source

Don't use deprecated PHP features.

Mark Story 8 years ago
parent
commit
634988972f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      tests/TestCase/View/Helper/RssHelperTest.php

+ 5 - 1
tests/TestCase/View/Helper/RssHelperTest.php

@@ -260,7 +260,11 @@ class RssHelperTest extends TestCase
             ['title' => 'title3', 'guid' => 'http://www.example.com/guid3', 'link' => 'http://www.example.com/link3', 'description' => 'description3']
         ];
 
-        $result = $this->Rss->items($items, create_function('$v', '$v[\'title\'] = $v[\'title\'] . \'-transformed\'; return $v;'));
+        $result = $this->Rss->items($items, function ($v) {
+            $v['title'] = $v['title'] . '-transformed';
+
+            return $v;
+        });
         $expected = [
             '<item',
                 '<title', 'title1-transformed', '/title',