/** * Tests the JFeed::setAuthor method. * * @return void * * @since 3.0 * * @covers JFeed::setAuthor */ public function testSetAuthor() { $this->object->setAuthor('Sir John A. Macdonald', '*****@*****.**'); $properties = TestReflection::getValue($this->object, 'properties'); $this->assertInstanceOf('JFeedPerson', $properties['author']); $this->assertEquals('Sir John A. Macdonald', $properties['author']->name); $this->assertEquals('*****@*****.**', $properties['author']->email); }
/** * Method to handle the <author> element for the feed. * * @param JFeed $feed The JFeed object being built from the parsed feed. * @param SimpleXMLElement $el The current XML element object to handle. * * @return void * * @since 12.3 */ protected function handleAuthor(JFeed $feed, SimpleXMLElement $el) { // Set the author information from the XML element. $feed->setAuthor((string) $el->name, (string) $el->email, (string) $el->uri); }