Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 /**
  * 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()));
 }