public function seeMessageInQueueContainsText($queue, $text)
    {
        $msg = $this->getChannel()->basic_get($queue);
        if (!$msg) {
            $this->fail("Message was not received");
        }
        if (!$msg instanceof AMQPMessage) {
            $this->fail("Received message is not format of AMQPMessage");
        }
        $this->debugSection("Message", $msg->body);
        $this->assertStringContainsString($text, $msg->body);
    }
public function seeMessageInQueueContainsText($queue, $text)
    {
        $msg = $this->getChannel()->basic_get($queue);
        if (!$msg) {
            $this->fail("Message was not received");
        }
        if (!$msg instanceof AMQPMessage) {
            $this->fail("Received message is not format of AMQPMessage");
        }
        $this->debugSection("Message", $msg->body);
        $this->assertStringContainsString($text, $msg->body);
    }
public function seeMessageInQueueContainsText ( $ queue , $ text ) { $ msg = $ this -> getChannel ( ) -> basic_get ( $ queue ) ; if ( ! $ msg ) { $ this -> fail ( "Message was not received" ) ; } if ( ! $ msg instanceof AMQPMessage ) { $ this -> fail ( "Received message is not format of AMQPMessage" ) ; } $ this -> debugSection ( "Message" , $ msg -> body ) ; $ this -> assertStringContainsString ( $ text , $ msg -> body ) ; }
Checks if message containing text received.

**This method drops message from queue**
**This method will wait for message. If none is sent the script will stuck**.

``` php
<?php
$I->pushToQueue('queue.emails', 'Hello, davert');
$I->seeMessageInQueueContainsText('queue.emails','davert');
?>
```

@param string $queue
@param string $text
Checks if message containing text received .