public function testOff()
 {
     $o = new Observable();
     $o->on('foo', function () use(&$res) {
         return '1';
     });
     $o->off('foo');
     $this->assertNotEquals('1', $o->emit('foo'));
 }
 public function receiveMessage($message)
 {
     $this->observer->emit('message', array('message' => $message, 'channel' => null, 'timeToken' => time()));
 }