Skip to content

Commit 45aeb05

Browse files
committed
test
1 parent 077c4f3 commit 45aeb05

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/Database/Adapter/Mongo.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ public function __construct(Client $client)
7878
$this->client->connect();
7979
}
8080

81+
public function getHostname(): string
82+
{
83+
return 'mongo';
84+
//return $this->client->host; // Private method
85+
}
86+
8187
/**
8288
* Returns the current Mongo client
8389
* @return mixed

tests/e2e/Adapter/Scopes/CollectionTests.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,13 @@ public function testDatabaseHostname(): void
8080

8181
$host = $database->getAdapter()->getHostname();
8282

83-
if (!$database->getAdapter()->getSupportForHostname()){
83+
if (!$database->getAdapter()->getSupportForHostname()) {
8484
$this->assertEquals('', $host);
85-
// $this->expectNotToPerformAssertions();
86-
// return;
85+
// $this->expectNotToPerformAssertions();
86+
// return;
8787
}
8888

89-
var_dump($host);
90-
91-
$this->assertTrue(in_array($host, ['mysql','mariadb','postgres']));
89+
$this->assertTrue(in_array($host, ['mysql', 'mariadb', 'postgres', 'mongo']));
9290
}
9391

9492
public function testCreateCollectionWithSchema(): void

0 commit comments

Comments
 (0)