protected function validateQuery($query) { try { $this->validator->isValid($query); } catch (\Exception $e) { $this->errors[] = $e->getMessage(); return false; } $this->address = $this->validator->getAddress(); $this->prefix = $this->validator->getPrefix(); return true; }
/** * @expectedException \Exception * @expectedExceptionMessage Prefix string is not a valid range */ public function testExceptionPrefixIsOutOfRange() { $expected = '1234:abcd:1234:abcd:1234:abcd:1234:abcd/129'; self::$class->isValid($expected); }