Skip to content

Commit ca6e683

Browse files
authored
update travis-ci config (#115)
* 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
1 parent dc9f7f6 commit ca6e683

11 files changed

+23
-18
lines changed

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ language: php
33
sudo: false
44

55
php:
6-
- 5.3
76
- 5.4
87
- 5.5
98
- 5.6
109
- 7.0
11-
- hhvm
10+
- 7.1
1211

1312
env:
1413
- DRIVER=mysqli SPHINXSEARCH_BUILD=rel22
@@ -18,9 +17,6 @@ env:
1817

1918
matrix:
2019
fast_finish: true
21-
allow_failures:
22-
- env: DRIVER=pdo SPHINXSEARCH_BUILD=rel22
23-
- env: DRIVER=pdo SPHINXSEARCH_BUILD=beta
2420

2521
before_install:
2622
- mkdir $HOME/sphinx

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"php": ">=5.3.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "4.4.*"
18+
"phpunit/phpunit": "6.3.*"
1919
},
2020
"autoload": {
2121
"psr-4": {

tests/SphinxQL/ConnectionTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Foolz\SphinxQL\Expression;
55
use Foolz\SphinxQL\Tests\TestUtil;
66

7-
class ConnectionTest extends PHPUnit_Framework_TestCase
7+
class ConnectionTest extends \PHPUnit\Framework\TestCase
88
{
99
/**
1010
* @var ConnectionInterface
@@ -98,7 +98,7 @@ public function testConnect()
9898
}
9999

100100
/**
101-
* @expectedException PHPUnit_Framework_Error_Warning
101+
* @expectedException PHPUnit\Framework\Error\Warning
102102
*/
103103
public function testConnectThrowsPHPException()
104104
{
@@ -192,7 +192,7 @@ public function testEscape()
192192
}
193193

194194
/**
195-
* @expectedException PHPUnit_Framework_Error_Warning
195+
* @expectedException PHPUnit\Framework\Error\Warning
196196
*/
197197
public function testEscapeThrowsException()
198198
{

tests/SphinxQL/ExpressionTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use Foolz\SphinxQL\Expression as Expression;
44

5-
class ExpressionTest extends PHPUnit_Framework_TestCase
5+
class ExpressionTest extends \PHPUnit\Framework\TestCase
66
{
77
public function testValue()
88
{
@@ -16,4 +16,4 @@ public function testValue()
1616
$this->assertInstanceOf('Foolz\Sphinxql\Expression', $result);
1717
$this->assertEquals('* \\ Ç"" \'', (string) $result);
1818
}
19-
}
19+
}

tests/SphinxQL/FacetTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @package Foolz\SphinxQL
88
* @author Vicent Valls
99
*/
10-
class FacetTest extends PHPUnit_Framework_TestCase
10+
class FacetTest extends \PHPUnit\Framework\TestCase
1111
{
1212
public static $conn = null;
1313

tests/SphinxQL/HelperTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
use Foolz\SphinxQL\Helper;
66
use Foolz\SphinxQL\Tests\TestUtil;
77

8-
class HelperTest extends PHPUnit_Framework_TestCase
8+
class HelperTest extends \PHPUnit\Framework\TestCase
99
{
1010
/**
1111
* @var ConnectionInterface
1212
*/
1313
public $conn;
1414

15-
public function __construct()
15+
public function setUp()
1616
{
1717
$conn = TestUtil::getConnectionDriver();
1818
$conn->setParam('port', 9307);

tests/SphinxQL/MatchTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Foolz\SphinxQL\Match;
55
use Foolz\SphinxQL\Tests\TestUtil;
66

7-
class MatchTest extends PHPUnit_Framework_TestCase
7+
class MatchTest extends \PHPUnit\Framework\TestCase
88
{
99
public static $sphinxql = null;
1010

tests/SphinxQL/MultiResultSetTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Foolz\SphinxQL\Tests\TestUtil;
55
use Foolz\SphinxQL\Exception\DatabaseException;
66

7-
class MultiResultSetTest extends PHPUnit_Framework_TestCase
7+
class MultiResultSetTest extends \PHPUnit\Framework\TestCase
88
{
99
/**
1010
* @var Connection

tests/SphinxQL/ResultSetTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Foolz\SphinxQL\Drivers\Mysqli\Connection;
55
use Foolz\SphinxQL\Tests\TestUtil;
66

7-
class ResultSetTest extends PHPUnit_Framework_TestCase
7+
class ResultSetTest extends \PHPUnit\Framework\TestCase
88
{
99
/**
1010
* @var Connection

tests/SphinxQL/SphinxQLTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Foolz\SphinxQL\Match;
77
use Foolz\SphinxQL\Tests\TestUtil;
88

9-
class SphinxQLTest extends PHPUnit_Framework_TestCase
9+
class SphinxQLTest extends \PHPUnit\Framework\TestCase
1010
{
1111
public static $conn = null;
1212

tests/bootstrap.php

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
// PHPUnit Backwards Compatability Fix
4+
if (!class_exists('\PHPUnit\Framework\TestCase')) {
5+
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
6+
}
7+
8+
if (!class_exists('\PHPUnit\Framework\Error\Warning')) {
9+
class_alias('\PHPUnit_Framework_Error_Warning', '\PHPUnit\Framework\Error\Warning');
10+
}
11+
312
// autoload.php generated by Composer
413

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

0 commit comments

Comments
 (0)