Skip to content

Commit 3b04ef8

Browse files
committed
fix tests.
1 parent f474620 commit 3b04ef8

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

pkg/mongodb/MongodbContext.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class MongodbContext implements PsrContext
1313
* @var array
1414
*/
1515
private $config;
16+
1617
/**
1718
* @var Client
1819
*/
@@ -25,6 +26,7 @@ public function __construct($client, array $config = [])
2526
'collection_name' => 'enqueue',
2627
'polling_interval' => null,
2728
], $config);
29+
2830
$this->client = $client;
2931
}
3032

pkg/mongodb/Tests/MongodbConnectionFactoryTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public function testCouldBeConstructedWithEmptyConfiguration()
2323
{
2424
$params = [
2525
'uri' => 'mongodb://127.0.0.1/',
26+
'dbname' => 'enqueue',
27+
'collection_name' => 'enqueue',
2628
];
2729

2830
$factory = new MongodbConnectionFactory();
@@ -35,6 +37,8 @@ public function testCouldBeConstructedWithCustomConfiguration()
3537
'uri' => 'mongodb://127.0.0.3/',
3638
'uriOptions' => ['testValue' => 123],
3739
'driverOptions' => ['testValue' => 123],
40+
'dbname' => 'enqueue',
41+
'collection_name' => 'enqueue',
3842
];
3943

4044
$factory = new MongodbConnectionFactory($params);

pkg/mongodb/Tests/MongodbContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testShouldCreateMessage()
6565
$this->assertEquals('body', $message->getBody());
6666
$this->assertEquals(['pkey' => 'pval'], $message->getProperties());
6767
$this->assertEquals(['hkey' => 'hval'], $message->getHeaders());
68-
$this->assertSame(0, $message->getPriority());
68+
$this->assertNull($message->getPriority());
6969
$this->assertFalse($message->isRedelivered());
7070
}
7171

0 commit comments

Comments
 (0)