thephpleague / monga

Simple and swift MongoDB abstraction.
MIT License
331 stars 30 forks source link

Tests failing on php 5.6 #32

Closed ftassi closed 8 years ago

ftassi commented 8 years ago

Hi guys, running the suite tests against php 5.6 I'm getting 2 errors

There were 2 failures:

1) ConnectionTests::testHasDatabase
Failed asserting that false is true.

/Users/ftassi/workspace/monga/tests/ConnectionTests.php:49

2) ConnectionTests::testListDatabases
Failed asserting that an array contains 'admin'.

/Users/ftassi/workspace/monga/tests/ConnectionTests.php:71```

Basically both due to a non existent database `admin`. I'm not quite sure where this databases is created and why it should be there. What am I missing? 

Here is my mongo version:

➜ monga git:(master) ✗ php --ri mongo | grep Version Version => 1.6.7 ➜ monga git:(master) ✗ mongod --version db version v3.0.3

bcrowe commented 8 years ago

So, Travis runs Mongo 2, which comes with the admin database, which why you might see things passing on here/on Travis, but not locally with Mongo 3. Looks like local exists between both of them outta the box, so we can just use that... putting up a PR now.

bcrowe commented 8 years ago

Closing as there is a PR open now. Thanks for pointing this out! :+1: