/** * Create new Gnip Publisher -- with XML values -- then validate against returned string values. * * @access public * @param void * @return void */ function testFromXml() { $xml = '<rule type="actor" value="testActor"/>'; $rule = Services_Gnip_Rule::fromXml(new SimpleXMLElement($xml)); $this->assertEquals("actor", $rule->type); $this->assertEquals("testActor", $rule->value); }
function testFromXml() { $xml = '<rule type="actor">testActor</rule>'; $rule = Services_Gnip_Rule::fromXml($xml); $this->assertEquals("actor", $rule->type); $this->assertEquals("testActor", $rule->value); }