Example #1
0
 public function testPublishShouldNotifySubscribedHandlers()
 {
     $handle = Phly_PubSub::subscribe('test', $this, 'handleTestTopic');
     Phly_PubSub::publish('test', 'test message');
     $this->assertEquals('test message', $this->message);
 }
Example #2
0
 /**
  * Set PubSub provider instance
  * 
  * @param  Phly_PubSub_Provider $provider 
  * @return void
  */
 public static function setInstance(Phly_PubSub_Provider $provider)
 {
     self::$_instance = $provider;
 }