Skip to content

Commit 8efbe92

Browse files
committed
apply phpunit 6
1 parent 974683e commit 8efbe92

7 files changed

Lines changed: 21 additions & 12 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ script:
1717
- ./vendor/bin/phpunit --coverage-text
1818

1919
after_script:
20-
- if [[ $TRAVIS_PHP_VERSION = 7.1 ]]; then php ./vendor/bin/phpcov merge --clover ./build/logs/clover.xml ./build/coverage/; fi
2120
- if [[ $TRAVIS_PHP_VERSION = 7.1 ]]; then php ./vendor/bin/coveralls -v --exclude-no-stmt; fi
2221

2322
notifications:

build/coverage/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"zendframework/zend-mvc": "~2.4 || ^3.0.1"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "~4.0|~5.0",
22+
"phpunit/phpunit": "~4.0|~5.0|~6.0",
2323
"satooshi/php-coveralls": "^1.0.1",
24-
"phpunit/phpcov": "~2.0"
24+
"phpunit/phpcov": "~2.0|~3.0"
2525
},
2626
"autoload": {
2727
"psr-4": {

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
</whitelist>
1616
</filter>
1717
<logging>
18-
<log type="coverage-php" target="./build/coverage/coverage-redirect-handler-module.cov"/>
18+
<log type="coverage-clover" target="./build/logs/clover.xml"/>
1919
</logging>
2020
</phpunit>

test/Controller/Plugin/RedirectFactoryTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919

2020
namespace RedirectHandlerModuleTest\Controller\Plugin;
2121

22-
use PHPUnit_Framework_TestCase;
2322
use RedirectHandlerModule\Controller\Plugin\RedirectFactory;
23+
use PHPUnit\Framework\TestCase;
2424

25-
class RedirectFactoryTest extends PHPUnit_Framework_TestCase
25+
if (! class_exists(TestCase::class)) {
26+
class_alias(\PHPUnit_Framework_TestCase::class, TestCase::class);
27+
}
28+
29+
class RedirectFactoryTest extends TestCase
2630
{
2731
private $factory;
2832

test/Controller/Plugin/RedirectTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
namespace RedirectHandlerModuleTest\Controller\Plugin;
2121

2222
use InvalidArgumentException;
23-
use PHPUnit_Framework_TestCase;
2423
use RedirectHandlerModule\Controller\Plugin\Redirect;
2524
use Zend\EventManager\EventManager;
2625
use Zend\Http\Headers;
@@ -33,8 +32,13 @@
3332
use Zend\Mvc\Router\RouteMatch as V2RouteMatch;
3433
use Zend\Router\Http\TreeRouteStack as V3TreeRouteStack;
3534
use Zend\Router\RouteMatch as V3RouteMatch;
35+
use PHPUnit\Framework\TestCase;
3636

37-
class RedirectTest extends PHPUnit_Framework_TestCase
37+
if (! class_exists(TestCase::class)) {
38+
class_alias(\PHPUnit_Framework_TestCase::class, TestCase::class);
39+
}
40+
41+
class RedirectTest extends TestCase
3842
{
3943
private $controllerManager;
4044
private $controller;

test/ModuleTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919

2020
namespace RedirectHandlerModuleTest;
2121

22-
use PHPUnit_Framework_TestCase;
2322
use RedirectHandlerModule\Module;
23+
use PHPUnit\Framework\TestCase;
24+
25+
if (! class_exists(TestCase::class)) {
26+
class_alias(\PHPUnit_Framework_TestCase::class, TestCase::class);
27+
}
2428

2529
/**
2630
* This class tests Module class.
2731
*/
28-
class ModuleTest extends PHPUnit_Framework_TestCase
32+
class ModuleTest extends TestCase
2933
{
3034
/**
3135
* @var Module

0 commit comments

Comments
 (0)