Example #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());
 }
Example #2
0
 /**
  * Returns the array representation of this class 
  *
  * @return array
  */
 public function toArray($name = 'importanceTest')
 {
     return parent::toArray($name);
 }
Example #3
0
 /**
  * Returns the array representation of this class 
  *
  * @param  string $name
  * @return array
  */
 public function toArray($name = 'inviteTest')
 {
     return parent::toArray($name);
 }