Skip to content

Commit

Permalink
Update testing to use PHPUnit 6
Browse files Browse the repository at this point in the history
Drop support for PHP < 7.
Fix unit tests to work with PHPUnit 6
  • Loading branch information
Richard Quadling authored and Richard Quadling committed Feb 9, 2017
1 parent 621874d commit 6cb4483
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ before_script:
- composer install -n
language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- hhvm
script:
- phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Version History

**3.0** (2017/02/09)

* Dropped support for PHP < 7.0

**2.0** (2016/11/17)

* Ownership transferred to Digitickets
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"LaLit\\": "src"
}
},
"require": {
"php": ">=7"
},
"require-dev": {
"phpunit/phpunit": "^4|^5",
"phpunit/phpunit": "^6",
"mockery/mockery": "^0"
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit
colors="true"
bootstrap="./tests/bootstrap.php"
colors="true"
columns="max"
verbose="true"
stoponfailure ="true"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/Array2XMLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace LaLit;

class Array2XMLTest extends \PHPUnit_Framework_TestCase
class Array2XMLTest extends \PHPUnit\Framework\TestCase
{
/**
* @expectedException \Exception
Expand Down
2 changes: 1 addition & 1 deletion tests/MainLaLitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace LaLit;

class MainLaLitTest extends \PHPUnit_Framework_TestCase
class MainLaLitTest extends \PHPUnit\Framework\TestCase
{
public function provideTestData()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/XML2ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace LaLit;

class XML2ArrayTest extends \PHPUnit_Framework_TestCase
class XML2ArrayTest extends \PHPUnit\Framework\TestCase
{
public function provideInvalidObjects()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/bugs/Bug003Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Class Bug003Test.
*/
class Bug003Test extends \PHPUnit_Framework_TestCase
class Bug003Test extends \PHPUnit\Framework\TestCase
{
public function testNullValues()
{
Expand Down Expand Up @@ -48,6 +48,6 @@ public function testNullValues()

END_XML;

self::assertEquals($expectedResults, $actualResults, 'Failed to handle empty @values');
$this->assertEquals($expectedResults, $actualResults, 'Failed to handle empty @values');
}
}

0 comments on commit 6cb4483

Please sign in to comment.