/** * Testing testBuildingXMLElements(). * * @param string Name of XML element to build * @param array Array of attributes to add to element * @param int Level of added node * @param string Expected name to retrieve from Element * @param array Expected array of attributes and values assigned to element * @param bool Expected value for the "Skip White" attribute * @param int Expected value for level of node * * @return void * @dataProvider casesBuild */ public function testBuildingXMLElements( $name, $options, $level, $expName, $expAttr, $expSkip, $expLevel ) { if ( is_null($options) ) { $this->object = new JSimpleXMLElement($name); } elseif ( is_null($level) ) { $this->object = new JSimpleXMLElement($name, $options); } else { $this->object = new JSimpleXMLElement( $name, $options, $level ); } $this->assertThat( $this->object->name(), $this->equalTo($expName) ); $this->assertThat( $this->object->attributes(), $this->equalTo($expAttr) ); $this->assertThat( $this->object->attributes(XML_OPTION_SKIP_WHITE), $this->equalTo($expSkip) ); $this->assertThat( $this->object->level(), $this->equalTo($expLevel) ); }
public function name() { return parent::name(); }