File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,26 @@ public function testDaemonOptions()
3030 $ this ->assertEquals ($ memoryLimit , $ options ->getOption (DaemonOptions::MEMORY_LIMIT ));
3131 $ this ->assertEquals ($ timeLimit , $ options ->getOption (DaemonOptions::TIME_LIMIT ));
3232 }
33+
34+ /**
35+ * Test that an InvalidArgumentException is thrown when the object is
36+ * constructed with an unknown option.
37+ *
38+ * @expectedException \InvalidArgumentException
39+ */
40+ public function testUnknownOptionInConstructor ()
41+ {
42+ new DaemonOptions (['hello ' => 'world ' ]);
43+ }
44+
45+ /**
46+ * Test that an InvalidArgumentException is thrown when ::getOption is
47+ * called with an unknown option.
48+ *
49+ * @expectedException \InvalidArgumentException
50+ */
51+ public function testGetUnknownOption ()
52+ {
53+ (new DaemonOptions ())->getOption ('hello ' );
54+ }
3355}
You can’t perform that action at this time.
0 commit comments