/** * @expectedException InvalidArgumentException */ public function testInvalidByMonth() { $test = new When(); $test->bymonth(-1); }