/** * {@inheritdoc} */ public function parse($data) { if (preg_match(self::A_RDATA_REGEX, $data, $matches) !== 1) { throw new ParseException(sprintf('Unable to parse data "%"', $data)); } $aRdata = new ARdata(); $aRdata->setAddress($matches[0]); return $aRdata; }
public function testOutput() { $address = '192.168.1.1'; $this->aRdata->setAddress($address); $this->assertEquals($address, $this->aRdata->output()); }