Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testDisconnectAndCreateNewConnection()
public function testDb()
{
$connection = DB::connection('mongodb');
$this->assertInstanceOf(Database::class, $connection->getMongoDB());
$this->assertInstanceOf(Database::class, $connection->getDatabase());
$this->assertInstanceOf(Client::class, $connection->getClient());
}

Expand Down Expand Up @@ -199,7 +199,7 @@ public function testConnectionConfig(string $expectedUri, string $expectedDataba
$client = $connection->getClient();

$this->assertSame($expectedUri, (string) $client);
$this->assertSame($expectedDatabaseName, $connection->getMongoDB()->getDatabaseName());
$this->assertSame($expectedDatabaseName, $connection->getDatabase()->getDatabaseName());
$this->assertSame('foo', $connection->getCollection('foo')->getCollectionName());
$this->assertSame('foo', $connection->table('foo')->raw()->getCollectionName());
}
Expand Down
6 changes: 3 additions & 3 deletions tests/FilesystemsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function provideValidOptions(): Generator
'driver' => 'gridfs',
'bucket' => static fn (Application $app) => $app['db']
->connection('mongodb')
->getMongoDB()
->getDatabase()
->selectGridFSBucket(),
],
];
Expand All @@ -68,7 +68,7 @@ public function testValidOptions(array $options)
// Service used by "bucket-service"
$this->app->singleton('bucket', static fn (Application $app) => $app['db']
->connection('mongodb')
->getMongoDB()
->getDatabase()
->selectGridFSBucket());

$this->app['config']->set('filesystems.disks.' . $this->dataName(), $options);
Expand Down Expand Up @@ -145,6 +145,6 @@ public function testPrefix()

private function getBucket(): Bucket
{
return DB::connection('mongodb')->getMongoDB()->selectGridFSBucket();
return DB::connection('mongodb')->getDatabase()->selectGridFSBucket();
}
}
Loading