/** * Keyword may not contain a "+", Exception expected. */ public function testKeywordWithPlusSignThrowsException() { $keywords = new Keywords(); $keywords->lang = "en"; $keywords->Keywords = array("csharp", "pascal", "c++"); $document = DOMDocumentFactory::fromString('<root />'); $this->setExpectedException('Exception', 'Keywords may not contain a "+" character'); $xml = $keywords->toXML($document->firstChild); }