Skip to content

Fixes to pass build #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ language: php
php:
# using major version aliases

# aliased to 5.2.17
- 5.2
# aliased to 5.3.29
- 5.3
# aliased to a recent 5.4.x version
- 5.4
# aliased to a recent 5.5.x version
- 5.5
# aliased to a recent 5.6.x version
- 5.6
# aliased to a recent 7.x version
# aliased to a recent 7.0.x version
- 7.0
# aliased to a recent 7.1.x version
- 7.1
# aliased to a recent 7.2.x version
#- 7.2
# aliased to a recent nightly build
#- nightly
# aliased to a recent hhvm version
- hhvm

Expand All @@ -31,7 +29,7 @@ matrix:
- php: hhvm
env: DB=pgsql # PDO driver for pgsql is unsupported by HHVM (3rd party install for support)
allow_failures:
- php: 7.0
- php: 7.1
- php: hhvm

# execute any number of scripts before the test run, custom env's are available as variables
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ continuous integration with a PHP project.

Here is a sample status icon showing the state of the master branch.

[![Build Status](https://travis-ci.org/travis-ci-examples/php.svg?branch=master)](https://travis-ci.org/travis-ci-examples/php)
[![Build Status](https://travis-ci.org/travis-ci-examples/php-example.svg?branch=master)](https://travis-ci.org/travis-ci-examples/php-example)

In order to run this project just fork it on github.com and then [enable](http://about.travis-ci.org/docs/user/getting-started/)
your fork on your [travis-ci profile](http://travis-ci.org/profile). Every push will then trigger a new build on Travis CI.
Expand Down
3 changes: 1 addition & 2 deletions Tests/HelloWorldTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class HelloWorldTest extends PHPUnit_Framework_TestCase
class HelloWorldTest extends \PHPUnit\Framework\TestCase
{
/**
* @var PDO
Expand Down Expand Up @@ -44,4 +44,3 @@ public function testWhat()
$this->assertEquals('Bar', $helloWorld->what());
}
}

6 changes: 6 additions & 0 deletions Tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

function loader($class)
{
// Support for pre-PHP 5.6 versions
if ($class === 'PHPUnit\Framework\TestCase') {
class_alias('PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');

return;
}
$file = $class . '.php';
if (file_exists($file)) {
require $file;
Expand Down