예제 #1
0
 public function testIsValid()
 {
     $this->assertFalse($this->object->isValid());
     $this->object->setTo(['test']);
     $this->assertFalse($this->object->isValid());
     $this->object->setFromName(['test']);
     $this->assertFalse($this->object->isValid());
     $this->object->setBody(['test']);
     $this->assertTrue($this->object->isValid());
 }
예제 #2
0
 public function sendMessage($toNumber, $message)
 {
     $this->connectAndLogin();
     $this->simulateTypingStart($toNumber);
     $this->message->setFromName($this->client->getIdentity()->getNickname());
     $this->message->setTo($toNumber);
     $this->message->setBody($message);
     $this->simulateTypingEnd();
     // Sending message...
     $this->client->send($this->message);
 }