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 +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-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-2015 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 \Console \Request as ConsoleRequest ;
14
+ use Zend \Mvc \Router \Console \Catchall ;
15
+
16
+ class CatchallTest extends TestCase
17
+ {
18
+ public function provideFactoryOptions ()
19
+ {
20
+ return [
21
+ [[]],
22
+ [['defaults ' => []]]
23
+ ];
24
+ }
25
+
26
+ /**
27
+ * @dataProvider provideFactoryOptions
28
+ */
29
+ public function testFactory ($ options )
30
+ {
31
+ $ this ->assertInstanceOf (Catchall::class, Catchall::factory ($ options ));
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments