Compare commits

...
Sign in to create a new pull request.

9 commits

5 changed files with 28 additions and 23 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
composer.lock
vendor

View file

@ -1,16 +1,16 @@
language: php language: php
dist: trusty
php: sudo: required
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- hhvm-nightly
matrix: matrix:
allow_failures: include:
- php: hhvm-nightly - php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
install: install:
- composer install - composer install
@ -20,7 +20,8 @@ before_script:
- cd tests - cd tests
script: script:
- phpunit --colors --coverage-clover /home/travis/build/joshtronic/php-googleplaces/build/logs/clover.xml . - phpunit --colors --coverage-clover ../build/logs/clover.xml .
after_success: after_success:
- php ../vendor/bin/coveralls --config ../.coveralls.yml -v - cd ..
- php vendor/bin/coveralls --config .coveralls.yml -v

View file

@ -1,14 +1,8 @@
# php-googleplaces # php-googleplaces
[![Build Status](http://img.shields.io/travis/joshtronic/php-googleplaces.svg?style=flat)][travis] [![Build Status](https://travis-ci.org/joshtronic/php-googleplaces.svg?branch=master)](https://travis-ci.org/joshtronic/php-googleplaces)
[![Coverage Status](http://img.shields.io/coveralls/joshtronic/php-googleplaces.svg?style=flat)][coveralls] [![Coverage Status](https://coveralls.io/repos/github/joshtronic/php-googleplaces/badge.svg?branch=master)](https://coveralls.io/github/joshtronic/php-googleplaces?branch=master)
[![Downloads](http://img.shields.io/packagist/dm/joshtronic/php-googleplaces.svg?style=flat)][packagist] [![Total Downloads](https://poser.pugx.org/joshtronic/php-googleplaces/downloads)](https://packagist.org/packages/joshtronic/php-googleplaces)
[![Gittip](http://img.shields.io/gittip/joshtronic.svg?style=flat)][gittip]
[travis]: http://travis-ci.org/joshtronic/php-googleplaces
[coveralls]: https://coveralls.io/r/joshtronic/php-googleplaces
[packagist]: https://packagist.org/packages/joshtronic/php-googleplaces
[gittip]: https://www.gittip.com/joshtronic/
PHP Wrapper for the Google Places API. PHP Wrapper for the Google Places API.

View file

@ -15,7 +15,7 @@
"php": ">=5.3.0" "php": ">=5.3.0"
}, },
"require-dev": { "require-dev": {
"satooshi/php-coveralls": "dev-master" "satooshi/php-coveralls": "1.0.*"
}, },
"autoload": { "autoload": {
"psr-4": {"joshtronic\\": "src/"} "psr-4": {"joshtronic\\": "src/"}

View file

@ -3,6 +3,10 @@
require_once '../src/GooglePlaces.php'; require_once '../src/GooglePlaces.php';
require_once '../src/GooglePlacesClient.php'; require_once '../src/GooglePlacesClient.php';
if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) {
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
}
class GooglePlacesTest extends PHPUnit_Framework_TestCase class GooglePlacesTest extends PHPUnit_Framework_TestCase
{ {
private $places; private $places;
@ -15,7 +19,11 @@ class GooglePlacesTest extends PHPUnit_Framework_TestCase
private function clientSetUp($next = false) private function clientSetUp($next = false)
{ {
$client = $this->getMock('GooglePlacesClient', array('get')); if (version_compare(PHPUnit_Runner_Version::id(), '5.4', '<=')) {
$client = $this->getMock('GooglePlacesClient', array('get'));
} else {
$client = $this->createMock('GooglePlacesClient');
}
$client $client
->expects($this->once()) ->expects($this->once())