Skip to content

Commit

Permalink
Merge pull request #5 from zumba/modernize
Browse files Browse the repository at this point in the history
Drop support for <= 5.4.
  • Loading branch information
young-steveo committed May 21, 2015
2 parents b6d25b6 + c7a3bff commit 5d8eca8
Show file tree
Hide file tree
Showing 12 changed files with 997 additions and 140 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
vendor/
bin/
composer.lock
bin/
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6

services:
- mongodb
Expand All @@ -11,7 +11,7 @@ before_script:
- composer install --dev


script: if [ $(phpenv version-name) = "5.3" ]; then ./bin/phpunit -c phpunit.5.3.xml --coverage-text; else ./bin/phpunit --coverage-text; fi
script: ./bin/phpunit --coverage-text

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

## Requirements

* PHP 5.3+
* PHPUnit ~3.7, ~4.0
* PHP 5.5+
* PHPUnit 4.0+
* PECL mongo 1.3+

## Testing
Expand All @@ -28,6 +28,7 @@ class MyMongoTestCase extends \PHPUnit_Framework_TestCase {
* @return Zumba\PHPUnit\Extensions\Mongo\Client\Connector
*/
public function getMongoConnection() {
// Add your credentials here
return new \MongoClient();
}

Expand Down Expand Up @@ -57,8 +58,6 @@ class MyMongoTestCase extends \PHPUnit_Framework_TestCase {

[See full working example.](https://github.com/zumba/mongounit/blob/master/examples/PizzaTraitTest.php)

## Note about PHP and PHPUnit Versions
## Note about PHP Versions

PHP 5.3 is supported for PHPUnit ~3.7 by way of extending `\Zumba\PHPUnit\Extensions\Mongo\TestCase`. PHPUnit 4 is working with this testcase, however it is not actively supported.

PHP 5.4 is supported via use of the `\Zumba\PHPUnit\Extensions\Mongo\TestTrait` trait. It currently is supporting PHPUnit 4 `@before` and `@after` but can be used in PHPUnit ~3.7 by either aliasing the `mongoSetUp` and `mongoTearDown` to `setUp` and `tearDown`, or by calling `mongoSetUp` and `mongoTearDown` in your respective methods.
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.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"issues": "https://github.com/zumba/mongounit/issues"
},
"require": {
"php": ">=5.3.0",
"php": ">=5.5.0",
"ext-mongo": "*"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "~4.6.0"
},
"config": {
"bin-dir": "bin"
Expand Down
Loading

0 comments on commit 5d8eca8

Please sign in to comment.