Laravel mongodb ->getPdo() return null
<p>I'm using <code>DB::connection('mongodb')-&gt;getPdo()</code> to check if the database is connected (if not phpunit will mark some test as skipped) and it's turning out that <code>-&gt;getPdo()</code> always return null. The connection is working proven by that I can use <code>php artisan migrate</code> to create new collection and I can insert data into the collection.</p>

<p>Environment :</p>

<p>OS : windows 10 running MAMP 3.2.0</p>

<p>laravel : 5.2.37</p>

<p>jenssegers/mongodb : 3.0.2</p>

<p>Edit 1: Add returned object from using <code>DB::connection('mongodb')-&gt;getMongoDB()-&gt;connected</code></p>

<pre><code>MongoDB\Collection {#647
 +collectionName: "connected",
 +databaseName: "destinycore",
 +manager: MongoDB\Driver\Manager {#640},
 +readConcern: MongoDB\Driver\ReadConcern {#642},
 +readPreference: MongoDB\Driver\ReadPreference {#643},
 +typeMap: [
   "array" =&gt; "MongoDB\Model\BSONArray",
   "document" =&gt; "MongoDB\Model\BSONDocument",
   "root" =&gt; "MongoDB\Model\BSONDocument",
 ],
 +writeConcern: MongoDB\Driver\WriteConcern {#644},
}
</code></pre>