예제 #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());
 }
예제 #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;
 }