예제 #1
0
 public function testSwimdataLoop()
 {
     $Loop = new Loop(new Object(array(Object::STROKE => array(25, 20, 15, 20), Object::STROKETYPE => array(2, 2, 2, 2))));
     $Loop->nextStep();
     $this->assertEquals(20, $Loop->stroke());
     $this->assertEquals(2, $Loop->stroketype());
     $Loop->setStepSize(2);
     $Loop->nextStep();
     $this->assertEquals(20, $Loop->stroke());
     $this->assertEquals(2, $Loop->stroketype());
     $Loop->nextStep();
     $this->assertTrue($Loop->isAtEnd());
 }