Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 1f827e5

Browse files
committed
Updated PHPUnit - allow 5, 6 and 7 series
1 parent 54a9357 commit 1f827e5

9 files changed

+18
-65
lines changed

composer.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
}
1414
},
1515
"require": {
16-
"php": "^5.5 || ^7.0",
16+
"php": "^5.6 || ^7.0",
1717
"zendframework/zend-escaper": "^2.5",
1818
"zendframework/zend-stdlib": "^2.7 || ^3.0"
1919
},
2020
"require-dev": {
2121
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
22-
"phpunit/PHPUnit": "~4.0",
22+
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4",
2323
"zendframework/zend-coding-standard": "~1.0.0"
2424
},
2525
"suggest": {
@@ -46,7 +46,6 @@
4646
"cs-check": "phpcs",
4747
"cs-fix": "phpcbf",
4848
"test": "phpunit --colors=always",
49-
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
50-
"upload-coverage": "coveralls -v"
49+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
5150
}
5251
}

phpunit.xml.dist

+4-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4-
bootstrap="./test/bootstrap.php"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
55
colors="true">
66
<testsuites>
77
<testsuite name="zend-tag Test Suite">
8-
<directory>./test/</directory>
8+
<directory>./test</directory>
99
</testsuite>
1010
</testsuites>
1111

12-
<groups>
13-
<exclude>
14-
<group>disable</group>
15-
</exclude>
16-
</groups>
17-
1812
<filter>
19-
<whitelist addUncoveredFilesFromWhitelist="true">
13+
<whitelist processUncoveredFilesFromWhitelist="true">
2014
<directory suffix=".php">./src</directory>
2115
</whitelist>
2216
</filter>
23-
24-
<php>
25-
<ini name="date.timezone" value="UTC"/>
26-
27-
<!-- OB_ENABLED should be enabled for some tests to check if all
28-
functionality works as expected. Such tests include those for
29-
Zend\Soap and Zend\Session, which require that headers not be sent
30-
in order to work. -->
31-
<env name="TESTS_ZEND_OB_ENABLED" value="false" />
32-
33-
</php>
3417
</phpunit>

test/Cloud/CloudTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace ZendTest\Tag\Cloud;
1111

1212
use ArrayObject;
13+
use PHPUnit\Framework\TestCase;
1314
use stdClass;
1415
use Zend\ServiceManager\ServiceManager;
1516
use Zend\ServiceManager\Config as SMConfig;
@@ -26,7 +27,7 @@
2627
* @group Zend_Tag
2728
* @group Zend_Tag_Cloud
2829
*/
29-
class CloudTest extends \PHPUnit_Framework_TestCase
30+
class CloudTest extends TestCase
3031
{
3132
public function testGetAndSetItemList()
3233
{

test/Cloud/Decorator/DecoratorPluginManagerCompatibilityTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
namespace ZendTest\ServiceManager;
1010

11-
use PHPUnit_Framework_TestCase as TestCase;
11+
use PHPUnit\Framework\TestCase;
1212
use Zend\ServiceManager\ServiceManager;
1313
use Zend\Tag\Cloud\DecoratorPluginManager;
1414
use Zend\Tag\Cloud\Decorator\DecoratorInterface;

test/Cloud/Decorator/HtmlCloudTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
namespace ZendTest\Tag\Cloud\Decorator;
1111

1212
use ArrayObject;
13+
use PHPUnit\Framework\TestCase;
1314
use Zend\Tag\Cloud\Decorator;
1415

1516
/**
1617
* @group Zend_Tag
1718
* @group Zend_Tag_Cloud
1819
*/
19-
class HtmlCloudTest extends \PHPUnit_Framework_TestCase
20+
class HtmlCloudTest extends TestCase
2021
{
2122
public function testDefaultOutput()
2223
{

test/Cloud/Decorator/HtmlTagTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
namespace ZendTest\Tag\Cloud\Decorator;
1111

1212
use ArrayObject;
13+
use PHPUnit\Framework\TestCase;
1314
use Zend\Tag;
1415
use Zend\Tag\Cloud\Decorator;
1516

1617
/**
1718
* @group Zend_Tag
1819
* @group Zend_Tag_Cloud
1920
*/
20-
class HtmlTagTest extends \PHPUnit_Framework_TestCase
21+
class HtmlTagTest extends TestCase
2122
{
2223
public function testDefaultOutput()
2324
{

test/ItemListTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
namespace ZendTest\Tag;
1111

12+
use PHPUnit\Framework\TestCase;
1213
use Zend\Tag;
1314

1415
/**
1516
* @group Zend_Tag
1617
*/
17-
class ItemListTest extends \PHPUnit_Framework_TestCase
18+
class ItemListTest extends TestCase
1819
{
1920
public function testArrayAccessAndCount()
2021
{

test/ItemTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
namespace ZendTest\Tag;
1111

1212
use ArrayObject;
13+
use PHPUnit\Framework\TestCase;
1314
use Zend\Tag;
1415

1516
/**
1617
* @group Zend_Tag
1718
*/
18-
class ItemTest extends \PHPUnit_Framework_TestCase
19+
class ItemTest extends TestCase
1920
{
2021
public function testConstructor()
2122
{

test/bootstrap.php

-34
This file was deleted.

0 commit comments

Comments
 (0)