Example #1
0
 public function testIsValid()
 {
     $this->assertFalse($this->object->isValid());
     $this->object->setId(['test']);
     $this->assertFalse($this->object->isValid());
     $this->object->setTo(['test']);
     $this->assertTrue($this->object->isValid());
 }
Example #2
0
 protected function sendReceipt(Client $client, NodeInterface $node)
 {
     $receipt = new Receipt();
     $receipt->setTo($node->getAttribute('from'));
     $receipt->setId($node->getAttribute('id'));
     $client->send($receipt);
     return $this;
 }