Skip to content

Commit

Permalink
Merge pull request #8 from zumba/mongo-ext-upgrade
Browse files Browse the repository at this point in the history
Using mongodb extension instead of mongo
  • Loading branch information
cjsaylor authored Feb 15, 2017
2 parents c270246 + 4ffd7ab commit 55f7df8
Show file tree
Hide file tree
Showing 10 changed files with 388 additions and 166 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
sudo: false
language: php
php:
- 5.5
- 5.6
- 7.0

services:
- mongodb

before_script:
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- composer install --dev

- pecl install -f mongodb
- composer install

script: ./bin/phpunit --coverage-text

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Mongounit is a PHPUnit extension for test cases that utilize MongoDB as their da

## Requirements

* PHP 5.5+
* PHP 5.6+
* PHPUnit 4.0+
* PECL mongo 1.3+
* PECL mongodb 1.2+

## Testing

Expand All @@ -29,7 +29,7 @@ class MyMongoTestCase extends \PHPUnit_Framework_TestCase {
*/
public function getMongoConnection() {
// Add your credentials here
return new \MongoClient();
return new \MongoDB\Client();
}

/**
Expand Down Expand Up @@ -60,4 +60,4 @@ class MyMongoTestCase extends \PHPUnit_Framework_TestCase {

## Note about PHP Versions

PHP 5.3 and 5.4 are no longer actively supported. If you are using these version, stick to v1.2.0 of mongounit or below, however it is recommended to stop using these versions of PHP.
PHP 5.5 and below are no longer actively supported. If you are using these version, stick with previous versions of mongounit, however it is recommended to stop using these versions of PHP.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"require": {
"php": ">=5.5.0",
"ext-mongo": "*"
"ext-mongodb": "*",
"mongodb/mongodb": "~1.1.1"
},
"require-dev": {
"phpunit/phpunit": "~4.6.0"
Expand Down
Loading

0 comments on commit 55f7df8

Please sign in to comment.