comment("Check invalid constructor parameters"); try{ $parser = new tmApacheLogParser("", array()); $t->fail('Exception should be thrown'); } catch (tmApacheLogParserException $ex) { $t->pass('Exception thrown OK when both arguments are empty'); } unset($parser); try{ $parser = new tmApacheLogParser('%s %s', array('time')); $t->fail('Exception should be thrown'); } catch (tmApacheLogParserException $ex) { $t->pass('Exception thrown when too many parts of RE given'); } unset($parser); /* try{ $parser = new tmApacheLogParser('%s', array('time','remote_ip')); $t->fail('Exception should be thrown'); } catch (tmApacheLogParserException $ex) { $t->pass('Exception thrown when too few parts of RE given'); } unset($parser); */