public function testClone() { $boolean = new QtiBoolean(true); $otherBoolean = clone $boolean; $this->assertEquals($boolean->getValue(), $otherBoolean->getValue()); $this->assertNotSame($boolean, $otherBoolean); $otherBoolean->setValue(false); $this->assertNotEquals($boolean->getValue(), $otherBoolean->getValue()); }
/** * Marshall a QTI boolean datatype into its PCI JSON Representation. * * @param \qtism\common\datatypes\Boolean $boolean * @return array */ protected function marshallBoolean(QtiBoolean $boolean) { return array('base' => array('boolean' => $boolean->getValue())); }