示例#1
0
文件: Subject.php 项目: kornelek/lms
 /**
  * {@inheritDoc}
  */
 public function interruptUpdate(ReasonException $reason = null)
 {
     if (false === $this->updating) {
         throw SubjectException::notUpdating();
     }
     if (null === $reason) {
         $reason = ReasonException::notSpecified();
     }
     $this->reason = $reason;
     $this->updating = false;
 }
示例#2
0
 /**
  * Make sure that we get the message we are expecting.
  */
 public function testNotUpdating()
 {
     $this->assertEquals('There is no update in progress to interrupt.', SubjectException::notUpdating()->getMessage(), 'Make sure we get the right message.');
 }