public function testAddDate6() { $this->setExpectedException('fValidationException'); $_POST['foo'] = "foobar"; $_GET['bar'] = "foobar"; try { $v = new fValidation(); $v->addDateFields('foo', 'bar'); $v->validate(); } catch (fValidationException $e) { $this->assertContains('Foo: Please enter a date', $e->getMessage()); $this->assertContains('Bar: Please enter a date', $e->getMessage()); throw $e; } }