예제 #1
0
 /**
  * Creates an instance of Broadcaster if not already created
  */
 private static function initializeBroadcaster()
 {
     if (is_null(self::$broadcaster)) {
         // Create new grader
         self::$broadcaster = new Broadcaster();
     }
 }
예제 #2
0
 protected function detourBroadcasterCalls($times = null)
 {
     if (is_null($times)) {
         $times = $this->once();
     }
     $broadcasterMock = $this->getMock('Broadcaster', array('broadcastClarification'));
     $broadcasterMock->expects($times)->method('broadcastClarification');
     ClarificationController::$broadcaster = $broadcasterMock;
 }