This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function __construct(array $defaults = [])
85
85
*/
86
86
public static function factory ($ options = [])
87
87
{
88
- return new static ($ options ['defaults ' ]);
88
+ return new static (isset ( $ options ['defaults ' ]) ? $ options [ ' defaults ' ] : [ ]);
89
89
}
90
90
91
91
/**
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Zend Framework (http://framework.zend.com/)
4
+ *
5
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
6
+ * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
7
+ * @license http://framework.zend.com/license/new-bsd New BSD License
8
+ */
9
+
10
+ namespace ZendTest \Mvc \Router \Console ;
11
+
12
+ use PHPUnit_Framework_TestCase as TestCase ;
13
+ use Zend \Mvc \Router \Console \Catchall ;
14
+
15
+ class CatchallTest extends TestCase
16
+ {
17
+ public function provideFactoryOptions ()
18
+ {
19
+ return [
20
+ [[]],
21
+ [['defaults ' => []]]
22
+ ];
23
+ }
24
+
25
+ /**
26
+ * @dataProvider provideFactoryOptions
27
+ */
28
+ public function testFactory ($ options )
29
+ {
30
+ $ this ->assertInstanceOf (Catchall::class, Catchall::factory ($ options ));
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments