/**
  * @test
  */
 public function testTextAndCommandRecognise()
 {
     // /command
     $this->message = new Message($this->generateMessage('/help'), 'testbot');
     $this->assertEquals('/help', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help', $this->message->getText());
     $this->assertEquals('', $this->message->getText(true));
     // text
     $this->message = new Message($this->generateMessage('some text'), 'testbot');
     $this->assertEquals('', $this->message->getFullCommand());
     $this->assertEquals('', $this->message->getCommand());
     $this->assertEquals('some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /command@bot
     $this->message = new Message($this->generateMessage('/help@testbot'), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help@testbot', $this->message->getText());
     $this->assertEquals('', $this->message->getText(true));
     // /commmad text
     $this->message = new Message($this->generateMessage('/help some text'), 'testbot');
     $this->assertEquals('/help', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /command@bot some text
     $this->message = new Message($this->generateMessage('/help@testbot some text'), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help@testbot some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
 }
 /**
  * @test
  */
 public function testTextAndCommandRecognise()
 {
     // /command
     $this->message = new Message($this->generateMessage('/help'), 'testbot');
     $this->assertEquals('/help', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help', $this->message->getText());
     $this->assertEquals('', $this->message->getText(true));
     // text
     $this->message = new Message($this->generateMessage('some text'), 'testbot');
     $this->assertEquals('', $this->message->getFullCommand());
     $this->assertEquals('', $this->message->getCommand());
     $this->assertEquals('some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /command@bot
     $this->message = new Message($this->generateMessage('/help@testbot'), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help@testbot', $this->message->getText());
     $this->assertEquals('', $this->message->getText(true));
     // /commmad text
     $this->message = new Message($this->generateMessage('/help some text'), 'testbot');
     $this->assertEquals('/help', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /command@bot some text
     $this->message = new Message($this->generateMessage('/help@testbot some text'), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals('/help@testbot some text', $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /commmad\n text
     //$array = $this->generateMessage("/help\n some text");
     ////print_r($this->generateMessage('/help@testbot'));
     //echo 'value:';
     //print_r($array);
     $this->message = new Message($this->generateMessage("/help\n some text"), 'testbot');
     $this->assertEquals('/help', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals("/help\n some text", $this->message->getText());
     $this->assertEquals(' some text', $this->message->getText(true));
     // /command@bot\nsome text
     $this->message = new Message($this->generateMessage("/help@testbot\nsome text"), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals("/help@testbot\nsome text", $this->message->getText());
     $this->assertEquals('some text', $this->message->getText(true));
     // /command@bot \nsome text
     $this->message = new Message($this->generateMessage("/help@testbot \nsome text"), 'testbot');
     $this->assertEquals('/help@testbot', $this->message->getFullCommand());
     $this->assertEquals('help', $this->message->getCommand());
     $this->assertEquals("/help@testbot \nsome text", $this->message->getText());
     $this->assertEquals("\nsome text", $this->message->getText(true));
 }