Browse Source

refs #improve-add-crumb-doc add unit test to confirm the url array format works

chav170 10 years ago
parent
commit
2e36f5b34b
1 changed files with 10 additions and 1 deletions
  1. 10 1
      tests/TestCase/View/Helper/HtmlHelperTest.php

+ 10 - 1
tests/TestCase/View/Helper/HtmlHelperTest.php

@@ -1280,6 +1280,11 @@ class HtmlHelperTest extends TestCase
         ];
         $this->assertHtml($expected, $result);
 
+        $this->Html->addCrumb('Fifth', [
+            'plugin' => false,
+            'controller' => 'controller',
+            'action' => 'action',
+        ]);
         $result = $this->Html->getCrumbs('-', 'Start');
         $expected = [
             ['a' => ['href' => '/']],
@@ -1298,7 +1303,11 @@ class HtmlHelperTest extends TestCase
             'Third',
             '/a',
             '-',
-            'Fourth'
+            'Fourth',
+            '-',
+            ['a' => ['href' => '/controller/action']],
+            'Fifth',
+            '/a',
         ];
         $this->assertHtml($expected, $result);
     }