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