This repository was archived by the owner on Feb 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +17
-20
lines changed Expand file tree Collapse file tree 5 files changed +17
-20
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* @link http://github.com/zendframework/zend-servicemanager for the canonical source repository
4
- * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
4
+ * @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (http://www.zend.com)
5
5
* @license http://framework.zend.com/license/new-bsd New BSD License
6
6
*/
7
7
@@ -29,7 +29,7 @@ class ConfigDumper
29
29
/**
30
30
* @var ContainerInterface
31
31
*/
32
- protected $ container ;
32
+ private $ container ;
33
33
34
34
/**
35
35
* @param ContainerInterface $container
@@ -39,14 +39,6 @@ public function __construct(ContainerInterface $container = null)
39
39
$ this ->container = $ container ;
40
40
}
41
41
42
- /**
43
- * @param ContainerInterface $container
44
- */
45
- public function setContainer (ContainerInterface $ container )
46
- {
47
- $ this ->container = $ container ;
48
- }
49
-
50
42
/**
51
43
* @param array $config
52
44
* @param string $className
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* @link http://github.com/zendframework/zend-servicemanager for the canonical source repository
4
- * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
4
+ * @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (http://www.zend.com)
5
5
* @license http://framework.zend.com/license/new-bsd New BSD License
6
6
*/
7
7
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* @link http://github.com/zendframework/zend-servicemanager for the canonical source repository
4
- * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
4
+ * @copyright Copyright (c) 2017 Zend Technologies USA Inc. (http://www.zend.com)
5
5
* @license http://framework.zend.com/license/new-bsd New BSD License
6
6
*/
7
7
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* @link http://github.com/zendframework/zend-servicemanager for the canonical source repository
4
- * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
4
+ * @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (http://www.zend.com)
5
5
* @license http://framework.zend.com/license/new-bsd New BSD License
6
6
*/
7
7
@@ -63,8 +63,8 @@ public function helpArguments()
63
63
public function ignoreUnresolvedArguments ()
64
64
{
65
65
return [
66
- 'short ' => ['-i ' ],
67
- 'long ' => ['--ignore-unresolved ' ],
66
+ 'short ' => ['-i ' ],
67
+ 'long ' => ['--ignore-unresolved ' ],
68
68
];
69
69
}
70
70
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* @link http://github.com/zendframework/zend-servicemanager for the canonical source repository
4
- * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
4
+ * @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (http://www.zend.com)
5
5
* @license http://framework.zend.com/license/new-bsd New BSD License
6
6
*/
7
7
@@ -114,8 +114,10 @@ public function testCreateDependencyConfigWithContainerAndNoServiceWithoutTypeHi
114
114
$ container ->has (ObjectWithScalarDependency::class)
115
115
->shouldBeCalled ()
116
116
->willReturn (false );
117
- $ this ->dumper ->setContainer ($ container ->reveal ());
118
- $ config = $ this ->dumper ->createDependencyConfig (
117
+
118
+ $ dumper = new ConfigDumper ($ container ->reveal ());
119
+
120
+ $ config = $ dumper ->createDependencyConfig (
119
121
[ConfigAbstractFactory::class => []],
120
122
ObjectWithScalarDependency::class
121
123
);
@@ -127,11 +129,14 @@ public function testCreateDependencyConfigWithContainerWithoutTypeHintedParamete
127
129
$ container ->has (ObjectWithScalarDependency::class)
128
130
->shouldBeCalled ()
129
131
->willReturn (true );
130
- $ this ->dumper ->setContainer ($ container ->reveal ());
131
- $ config = $ this ->dumper ->createDependencyConfig (
132
+
133
+ $ dumper = new ConfigDumper ($ container ->reveal ());
134
+
135
+ $ config = $ dumper ->createDependencyConfig (
132
136
[ConfigAbstractFactory::class => []],
133
137
ObjectWithObjectScalarDependency::class
134
138
);
139
+
135
140
self ::assertEquals (
136
141
[
137
142
ConfigAbstractFactory::class => [
You can’t perform that action at this time.
0 commit comments