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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
/vendor
composer.lock
composer.phar
phpunit.phar
phpunit.xml
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"mongodb/mongodb": "^1.15"
},
"require-dev": {
"phpunit/phpunit": "^9.5.10",
"phpunit/phpunit": "^10.3",
"orchestra/testbench": "^8.0",
"mockery/mockery": "^1.4.4",
"doctrine/coding-standard": "12.0.x-dev"
Expand Down Expand Up @@ -60,7 +60,6 @@
]
}
},
"minimum-stability": "dev",
"config": {
"platform": {
"php": "8.1"
Expand Down
24 changes: 17 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<coverage/>
<testsuites>
<testsuite name="all">
<directory>tests/</directory>
Expand Down Expand Up @@ -38,12 +43,17 @@
</testsuite>
</testsuites>
<php>
<env name="MONGODB_URI" value="mongodb://mongodb/" />
<env name="MONGODB_URI" value="mongodb://mongodb/"/>
<env name="MONGODB_DATABASE" value="unittest"/>
<env name="MYSQL_HOST" value="mysql"/>
<env name="MYSQL_PORT" value="3306"/>
<env name="MYSQL_DATABASE" value="unittest"/>
<env name="MYSQL_USERNAME" value="root"/>
<env name="QUEUE_CONNECTION" value="database"/>
</php>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testDb()
$this->assertInstanceOf(Client::class, $connection->getMongoClient());
}

public function dataConnectionConfig(): Generator
public static function dataConnectionConfig(): Generator
{
yield 'Single host' => [
'expectedUri' => 'mongodb://some-host',
Expand Down