Exemplo n.º 1
0
 /**
  * @param string $name the message name
  * @param null|object $sender the sender object
  * @param array $parameters the parameters to add to the message
  * @throws \InvalidArgumentException
  */
 public function __construct($name, $sender = null, array $parameters = [])
 {
     Assert::isString($name);
     if ($sender !== null) {
         Assert::isObject($sender);
     }
     $this->name = $name;
     $this->sender = $sender;
     $this->params = $parameters;
     $this->stopped = false;
     $this->responseList = new ArrayList();
 }
Exemplo n.º 2
0
 /**
  * @covers Brickoo\Component\Common\Assert::isObject
  * @expectedException \InvalidArgumentException
  */
 public function testIsObjectThrowsArgumentException()
 {
     Assert::isObject(array("wrongType"));
 }