Example #1
0
 public function testEquality()
 {
     $d1 = new QtiDuration('P1DT12H');
     // 1 day + 12 hours.
     $d2 = new QtiDuration('P1DT12H');
     $d3 = new QtiDuration('PT3600S');
     // 3600 seconds.
     $this->assertTrue($d1->equals($d2));
     $this->assertTrue($d2->equals($d1));
     $this->assertFalse($d1->equals($d3));
     $this->assertFalse($d3->equals($d1));
     $this->assertTrue($d3->equals($d3));
 }