File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
tests/PHPSemVerChecker/Console Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -33,4 +33,20 @@ public function testMerge()
3333 $ this ->assertEquals ('src-after config ' , $ input ->getArgument ('source-after ' ), 'Missing input arguments must take on existing configuration ' );
3434 $ this ->assertEquals (true , $ config ->get ('full-path ' ), 'CLI option should use Configuration value and not CLI default ' );
3535 }
36+
37+ /**
38+ * @expectedException \Symfony\Component\Console\Exception\RuntimeException
39+ */
40+ public function testEmptyInputShouldThrowException ()
41+ {
42+ // Default/empty configuration
43+ $ config = new Configuration ([]);
44+ // No input arguments
45+ $ input = new InspectableArgvInput ([null ]);
46+ $ command = new CompareCommand ();
47+ $ input ->bind ($ command ->getDefinition ());
48+ $ im = new InputMerger ();
49+ $ im ->merge ($ input , $ config );
50+ $ input ->validate ();
51+ }
3652}
You can’t perform that action at this time.
0 commit comments