Skip to content

Commit 196405b

Browse files
committed
chore: remove comment
1 parent c32dd99 commit 196405b

5 files changed

+5
-30
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=8.1
1+
ARG PHP_VERSION=8.3
22

33
FROM php:${PHP_VERSION}-cli
44

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"doctrine/coding-standard": "12.0.x-dev",
4444
"spatie/laravel-query-builder": "^5.6|^6",
4545
"phpstan/phpstan": "^1.10",
46-
"rector/rector": "^1.2"
46+
"rector/rector": "^1.2",
47+
"squizlabs/php_codesniffer": "^3.12"
4748
},
4849
"conflict": {
4950
"illuminate/bus": "< 10.37.2"

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
tty: true
44
build: .
55
working_dir: /var/www/laravel-mongodb
6-
command: "bash -c 'composer install && composer run test'"
6+
command: "bash -c 'composer install'"
77
environment:
88
MONGODB_URI: 'mongodb://mongodb/'
99
volumes:

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</testsuite>
1818
</testsuites>
1919
<php>
20-
<env name="MONGODB_URI" value="mongodb://mongodb/?directConnection=true"/>
20+
<env name="MONGODB_URI" value="mongodb://127.0.0.1/?directConnection=true"/>
2121
<env name="MONGODB_DATABASE" value="unittest"/>
2222
<env name="SQLITE_DATABASE" value=":memory:"/>
2323
<env name="QUEUE_CONNECTION" value="database"/>

tests/SchemaTest.php

-26
Original file line numberDiff line numberDiff line change
@@ -475,32 +475,6 @@ public function testGetTableListingBySchema()
475475
$this->assertContains('newcollection', $tables);
476476
$this->assertContains('newcollection_two', $tables);
477477
}
478-
// Protected method cannot test
479-
// public function testGetAllCollections()
480-
// {
481-
// // Insert test data into normal collections
482-
// DB::connection('mongodb')->table('newcollection')->insert(['test' => 'value']);
483-
// DB::connection('mongodb')->table('newcollection_two')->insert(['test' => 'value']);
484-
485-
// // Create a view (this creates system.views)
486-
// DB::connection('mongodb')->getDatabase()->command([
487-
// 'create' => 'test_view',
488-
// 'viewOn' => 'newcollection',
489-
// 'pipeline' => [],
490-
// ]);
491-
492-
// $collections = Schema::getAllCollections();
493-
494-
// $this->assertIsArray($collections);
495-
// $this->assertGreaterThanOrEqual(2, count($collections));
496-
497-
// // Ensure normal collections are present
498-
// $this->assertContains('newcollection', $collections);
499-
// $this->assertContains('newcollection_two', $collections);
500-
501-
// // Ensure system collections are excluded
502-
// $this->assertNotContains('system.views', $collections);
503-
// }
504478

505479
public function testSystemCollectionsArePresentButFiltered()
506480
{

0 commit comments

Comments
 (0)