コード例 #1
0
 /**
  * Checks the animation getter
  */
 public function testAnimations()
 {
     $this->assertEquals(Animation::getAnimations(), array(Animation::BOUNCE, Animation::DROP));
 }
コード例 #2
0
 /**
  * Sets the marker animation
  *
  * @param string $animation
  */
 public function setAnimation($animation = null)
 {
     if (in_array($animation, Animation::getAnimations()) || $animation === null) {
         $this->animation = $animation;
     } else {
         throw new \InvalidArgumentException(sprintf('The animation of a marker can only be : ', implode(', ', Animation::getAnimations())));
     }
 }