Пример #1
0
 public function testFilterTest()
 {
     $index = mt_rand(1, 10);
     $filterTest = new FilterTest($index, true);
     $this->assertSame($index, $filterTest->getIndex());
     $this->assertTrue($filterTest->getNegative());
     $filterTest->setIndex($index)->setNegative(true);
     $this->assertSame($index, $filterTest->getIndex());
     $this->assertTrue($filterTest->getNegative());
     $xml = '<?xml version="1.0"?>' . "\n" . '<filterTest index="' . $index . '" negative="true" />';
     $this->assertXmlStringEqualsXmlString($xml, (string) $filterTest);
     $array = array('filterTest' => array('index' => $index, 'negative' => true));
     $this->assertEquals($array, $filterTest->toArray());
 }
Пример #2
0
 /**
  * Method returning the xml representative this class
  *
  * @return SimpleXML
  */
 public function toXml($name = 'importanceTest')
 {
     return parent::toXml($name);
 }
Пример #3
0
 /**
  * Method returning the xml representative this class
  *
  * @param  string $name
  * @return SimpleXML
  */
 public function toXml($name = 'inviteTest')
 {
     return parent::toXml($name);
 }