/** * @covers \php_rutils\Dt::getAge */ public function testGetAgeIncorrectType() { $birthDate = new \DateTimeZone('UTC'); try { $this->_object->getAge($birthDate); $this->fail('Incorrect date passed'); } catch (\InvalidArgumentException $e) { $this->assertEquals('Incorrect date/time type', $e->getMessage()); } }