File tree Expand file tree Collapse file tree 6 files changed +35
-0
lines changed
exception_when_missing_false Expand file tree Collapse file tree 6 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ public function testParameterHandling($testCaseName)
101
101
'dist-file ' => 'parameters.yml.dist ' ,
102
102
'environment ' => array (),
103
103
'interactive ' => false ,
104
+ 'expect-exception ' => false ,
104
105
),
105
106
(array ) Yaml::parse (file_get_contents ($ dataDir .'/setup.yml ' ))
106
107
);
@@ -112,6 +113,10 @@ public function testParameterHandling($testCaseName)
112
113
$ this ->io ->write ($ message )->shouldBeCalled ();
113
114
114
115
$ this ->setInteractionExpectations ($ testCase );
116
+
117
+ if (!empty ($ testCase ['expect-exception ' ])) {
118
+ $ this ->setExpectedException ($ testCase ['expect-exception ' ]);
119
+ }
115
120
116
121
$ this ->processor ->processFile ($ testCase ['config ' ]);
117
122
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ provided : foo
3
+ missing : bar
Original file line number Diff line number Diff line change
1
+ title : Missing keys in the environment will cause a throw when the option is set to true
2
+
3
+ config :
4
+ env-map :
5
+ provided : IC_TEST_PROVIDED
6
+ exception-when-missing : true
7
+
8
+ environment :
9
+ IC_TEST_PROVIDED : bar
10
+
11
+ expect-exception : " InvalidArgumentException"
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ provided : foo
3
+ missing : bar
Original file line number Diff line number Diff line change
1
+ # This file is auto-generated during the composer install
2
+ parameters :
3
+ provided : bar
4
+ missing : bar
Original file line number Diff line number Diff line change
1
+ title : Missing keys in the environment will not cause a throw when the option is set to false
2
+
3
+ config :
4
+ env-map :
5
+ provided : IC_TEST_PROVIDED
6
+ exception-when-missing : false
7
+
8
+ environment :
9
+ IC_TEST_PROVIDED : bar
You can’t perform that action at this time.
0 commit comments