private function isInvalid($parameterString) { try { $parser = new AttributeParser(); $parser->parse($parameterString); } catch (\Exception $exception) { return true; } return false; }
public function testParseMissingValue() { $this->assertEquals('charset', $this->parser->parse("charset")); $this->assertEquals('charset', $this->parser->parse("charset=")); }
/** * * @return \webignition\InternetMediaType\Parameter\Parser\AttributeParser */ private function getAttributeParser() { $attributeParser = new AttributeParser(); $attributeParser->setConfiguration($this->getConfiguration()); return $attributeParser; }