ソースを参照

improved unit test

Val Bancer 9 年 前
コミット
ce2d2bc138
1 ファイル変更5 行追加3 行削除
  1. 5 3
      tests/TestCase/Routing/RouterTest.php

+ 5 - 3
tests/TestCase/Routing/RouterTest.php

@@ -2774,8 +2774,10 @@ class RouterTest extends TestCase
             'lang' => 'eng',
             'controller' => 'posts',
             'action' => 'view',
-            123,
-            '?' => ['foo' => 'bar'],
+            'pass' => [123],
+            'url' => ['url' => 'eng/posts/view/123', 'foo' => 'bar', 'baz' => 'quu'],
+            'paging' => [],
+            'models' => [],
         ];
         $actual = Router::reverseToArray($params);
         $expected = [
@@ -2783,7 +2785,7 @@ class RouterTest extends TestCase
             'controller' => 'posts',
             'action' => 'view',
             123,
-            '?' => ['foo' => 'bar'],
+            '?' => ['foo' => 'bar', 'baz' => 'quu'],
         ];
         $this->assertEquals($expected, $actual);
     }