Skip to content

Commit

Permalink
update travis-ci config (#115)
Browse files Browse the repository at this point in the history
* travis ci: add php 7.1 to test matrix
* travis ci: remove php 7.1 and hhvm from test matrix
* dep: update PHPUnit
* test: update tests to work with latest PHPUnit
  • Loading branch information
oohnoitz authored Nov 7, 2017
1 parent dc9f7f6 commit ca6e683
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ language: php
sudo: false

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1

env:
- DRIVER=mysqli SPHINXSEARCH_BUILD=rel22
Expand All @@ -18,9 +17,6 @@ env:

matrix:
fast_finish: true
allow_failures:
- env: DRIVER=pdo SPHINXSEARCH_BUILD=rel22
- env: DRIVER=pdo SPHINXSEARCH_BUILD=beta

before_install:
- mkdir $HOME/sphinx
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.4.*"
"phpunit/phpunit": "6.3.*"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions tests/SphinxQL/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Foolz\SphinxQL\Expression;
use Foolz\SphinxQL\Tests\TestUtil;

class ConnectionTest extends PHPUnit_Framework_TestCase
class ConnectionTest extends \PHPUnit\Framework\TestCase
{
/**
* @var ConnectionInterface
Expand Down Expand Up @@ -98,7 +98,7 @@ public function testConnect()
}

/**
* @expectedException PHPUnit_Framework_Error_Warning
* @expectedException PHPUnit\Framework\Error\Warning
*/
public function testConnectThrowsPHPException()
{
Expand Down Expand Up @@ -192,7 +192,7 @@ public function testEscape()
}

/**
* @expectedException PHPUnit_Framework_Error_Warning
* @expectedException PHPUnit\Framework\Error\Warning
*/
public function testEscapeThrowsException()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/SphinxQL/ExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Foolz\SphinxQL\Expression as Expression;

class ExpressionTest extends PHPUnit_Framework_TestCase
class ExpressionTest extends \PHPUnit\Framework\TestCase
{
public function testValue()
{
Expand All @@ -16,4 +16,4 @@ public function testValue()
$this->assertInstanceOf('Foolz\Sphinxql\Expression', $result);
$this->assertEquals('* \\ Ç"" \'', (string) $result);
}
}
}
2 changes: 1 addition & 1 deletion tests/SphinxQL/FacetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @package Foolz\SphinxQL
* @author Vicent Valls
*/
class FacetTest extends PHPUnit_Framework_TestCase
class FacetTest extends \PHPUnit\Framework\TestCase
{
public static $conn = null;

Expand Down
4 changes: 2 additions & 2 deletions tests/SphinxQL/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
use Foolz\SphinxQL\Helper;
use Foolz\SphinxQL\Tests\TestUtil;

class HelperTest extends PHPUnit_Framework_TestCase
class HelperTest extends \PHPUnit\Framework\TestCase
{
/**
* @var ConnectionInterface
*/
public $conn;

public function __construct()
public function setUp()
{
$conn = TestUtil::getConnectionDriver();
$conn->setParam('port', 9307);
Expand Down
2 changes: 1 addition & 1 deletion tests/SphinxQL/MatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Foolz\SphinxQL\Match;
use Foolz\SphinxQL\Tests\TestUtil;

class MatchTest extends PHPUnit_Framework_TestCase
class MatchTest extends \PHPUnit\Framework\TestCase
{
public static $sphinxql = null;

Expand Down
2 changes: 1 addition & 1 deletion tests/SphinxQL/MultiResultSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Foolz\SphinxQL\Tests\TestUtil;
use Foolz\SphinxQL\Exception\DatabaseException;

class MultiResultSetTest extends PHPUnit_Framework_TestCase
class MultiResultSetTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Connection
Expand Down
2 changes: 1 addition & 1 deletion tests/SphinxQL/ResultSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Foolz\SphinxQL\Drivers\Mysqli\Connection;
use Foolz\SphinxQL\Tests\TestUtil;

class ResultSetTest extends PHPUnit_Framework_TestCase
class ResultSetTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Connection
Expand Down
2 changes: 1 addition & 1 deletion tests/SphinxQL/SphinxQLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Foolz\SphinxQL\Match;
use Foolz\SphinxQL\Tests\TestUtil;

class SphinxQLTest extends PHPUnit_Framework_TestCase
class SphinxQLTest extends \PHPUnit\Framework\TestCase
{
public static $conn = null;

Expand Down
9 changes: 9 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

// PHPUnit Backwards Compatability Fix
if (!class_exists('\PHPUnit\Framework\TestCase')) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
}

if (!class_exists('\PHPUnit\Framework\Error\Warning')) {
class_alias('\PHPUnit_Framework_Error_Warning', '\PHPUnit\Framework\Error\Warning');
}

// autoload.php generated by Composer

require_once __DIR__ . '/../vendor/autoload.php';

0 comments on commit ca6e683

Please sign in to comment.