示例#1
0
 /**
  * you should _not_ do this - cqrs definition separates events and commands
  *
  * @event Malocher\CqrsTest\Integration\Integration5\Integration5Event
  * @command Malocher\CqrsTest\Integration\Integration5\Integration5Command
  * @param Message $message
  */
 public function editBoth(Message $message)
 {
     if (is_callable($message->callback)) {
         $message->edit();
         call_user_func($message->callback, $message->isEdited());
     }
 }
示例#2
0
 public function testGetPayload()
 {
     $this->message = new Message('string payload');
     $this->assertEquals('string payload', $this->message->getPayload());
     /*
     * This is a realy cool test :-)
             if (is_null($this->message->getArguments())) {
        $this->assertNull($this->message->getArguments());
             } else {
        $this->assertNotNull($this->message->getArguments());
             }
     */
 }