Skip to content

Commit 0dd0b0e

Browse files
authored
Merge pull request #140 from open-source-contributions/test_enhancement
Test enhancement
2 parents 172ee19 + 14d822a commit 0dd0b0e

File tree

8 files changed

+15
-9
lines changed

8 files changed

+15
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ matrix:
2323
- php: 'nightly'
2424

2525
before_install:
26-
- composer install --dev -n --prefer-source
26+
- composer install -n --prefer-source
2727
- phpenv rehash
2828
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then sudo apt-get install -y nodejs; npm install -g snyk; fi"
2929

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "2.*",
23-
"phpunit/phpunit": "4.* || 5.*",
23+
"phpunit/phpunit": "^4.8.36 || 5.*",
2424
"squizlabs/php_codesniffer": "3.*"
2525
},
2626
"autoload": {

tests/GeoIp2/Test/Database/ReaderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
namespace GeoIp2\Test\Database;
44

55
use GeoIp2\Database\Reader;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversNothing
910
*/
10-
class ReaderTest extends \PHPUnit_Framework_TestCase
11+
class ReaderTest extends TestCase
1112
{
1213
public function databaseTypes()
1314
{

tests/GeoIp2/Test/Model/CountryTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
namespace GeoIp2\Test\Model;
44

55
use GeoIp2\Model\Country;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversNothing
910
*/
10-
class CountryTest extends \PHPUnit_Framework_TestCase
11+
class CountryTest extends TestCase
1112
{
1213
private $raw = [
1314
'continent' => [
@@ -34,7 +35,7 @@ class CountryTest extends \PHPUnit_Framework_TestCase
3435

3536
private $model;
3637

37-
public function setUp()
38+
protected function setUp()
3839
{
3940
$this->model = new Country($this->raw, ['en']);
4041
}

tests/GeoIp2/Test/Model/InsightsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
namespace GeoIp2\Test\Model;
44

55
use GeoIp2\Model\Insights;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversNothing
910
*/
10-
class InsightsTest extends \PHPUnit_Framework_TestCase
11+
class InsightsTest extends TestCase
1112
{
1213
public function testFull()
1314
{

tests/GeoIp2/Test/Model/NameTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
namespace GeoIp2\Test\Model;
44

55
use GeoIp2\Model\Country;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversNothing
910
*/
10-
class NameTest extends \PHPUnit_Framework_TestCase
11+
class NameTest extends TestCase
1112
{
1213
public $raw = [
1314
'continent' => [

tests/GeoIp2/Test/UtilTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
namespace GeoIp2\Test;
44

55
use GeoIp2\Util;
6+
use PHPUnit\Framework\TestCase;
67

78
/**
89
* @coversNothing
910
*/
10-
class UtilTest extends \PHPUnit_Framework_TestCase
11+
class UtilTest extends TestCase
1112
{
1213
public function testCidr()
1314
{

tests/GeoIp2/Test/WebService/ClientTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
use Composer\CaBundle\CaBundle;
66
use MaxMind\WebService\Client as WsClient;
7+
use PHPUnit\Framework\TestCase;
78

89
/**
910
* @coversNothing
1011
*/
11-
class ClientTest extends \PHPUnit_Framework_TestCase
12+
class ClientTest extends TestCase
1213
{
1314
private $country = [
1415
'continent' => [

0 commit comments

Comments
 (0)