Skip to content

Commit

Permalink
Dummy test code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanda committed May 5, 2017
1 parent 4eca05f commit a6f49c2
Showing 1 changed file with 3 additions and 40 deletions.
43 changes: 3 additions & 40 deletions tests/cases/ProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace Gamee\RabbitMQ\Tests\Cases;

use Bunny\Channel;
use Bunny\Client;
use Bunny\Message;
use Tester\Assert;
use Tester\TestCase;

Expand All @@ -13,54 +10,20 @@
final class ProducerTest extends TestCase
{

/**
* @var Client
*/
private $bunny;


public function setUp()
{
$this->bunny = new Client([
'host' => 'localhost',
'port' => '5672'
]);
$this->bunny->connect();
}


public function testPublish()
{
$channel = $this->bunny->channel();

$channel->queueDeclare('hello_durable', false, true, false, false);

$channel->publish('Hello', [], '', 'hello_durable');

echo "Sent 'Hello World!'\n";

}


public function testConsume()
public function testFoo()
{
$channel = $this->bunny->channel();

$channel->consume(
function (Message $message, Channel $channel, Client $client) {
var_dump($message->content);
$channel->ack($message);
},
'hello_durable'
);

$this->bunny->run(1);
Assert::true(true);
}


public function tearDown()
{
Assert::true(true);

$this->bunny->disconnect();
}

Expand Down

0 comments on commit a6f49c2

Please sign in to comment.