Ejemplo n.º 1
0
 /**
  * @param int $motionId
  *
  * @return \Wonderland\Application\Model\Motion
  *
  * @throws NotFoundException
  */
 public function getMotion($motionId)
 {
     if (($motion = $this->repository->getMotion($motionId)) === null) {
         throw new NotFoundException('Motion Not Found');
     }
     $this->repository->checkMotion($motion);
     return $motion;
 }
 public function testCheckMotion()
 {
     $motion = $this->getMotionMock();
     $this->repository->checkMotion($motion);
     $this->assertEquals(100.0, $motion->getScore());
     $this->assertTrue($motion->getIsApproved());
     $this->assertFalse($motion->getIsActive());
 }