diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index 0cc3ddc..dfa8f3d 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -66,6 +66,7 @@ public function test_set_default_configurations_values() $this->assertAttributeEquals(15, 'heartbeat', $connection); $this->assertAttributeEquals(30, 'readWriteTimeout', $connection); $this->assertAttributeEquals(30, 'connectionTimeout', $connection); + $this->assertAttributeEquals('/', 'vhost', $connection); } public function test_set_altered_configurations_values() @@ -75,6 +76,7 @@ public function test_set_altered_configurations_values() Config::set('queue.connections.rabbitmq.read_write_timeout', 60); Config::set('queue.connections.rabbitmq.connection_timeout', 60); Config::set('queue.connections.rabbitmq.heartbeat', 30); + Config::set('queue.connections.rabbitmq.vhost', '/test-vhost'); $mAMQPStreamConnection = M::mock(AMQPStreamConnection::class); $this->app->bind(AMQPStreamConnection::class, function () use ($mAMQPStreamConnection) { @@ -85,11 +87,12 @@ public function test_set_altered_configurations_values() $mAMQPStreamConnection->shouldReceive('channel')->once()->withNoArgs()->andReturn($mChannel); $mAMQPStreamConnection->shouldReceive('close')->once()->withNoArgs(); $mChannel->shouldReceive('close')->once()->withNoArgs(); - + $connection = $this->app[Connection::class]; $this->assertAttributeEquals(30, 'heartbeat', $connection); $this->assertAttributeEquals(60, 'readWriteTimeout', $connection); $this->assertAttributeEquals(60, 'connectionTimeout', $connection); + $this->assertAttributeEquals('/test-vhost', 'vhost', $connection); } }