Skip to content

Commit 7687827

Browse files
committed
Updated dependencies
- PHPUnit 5, 6 and 7 + config - zendframework/zend-mvc to v2.7.15 || ^3.0.4
1 parent 482e63c commit 7687827

11 files changed

+736
-374
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"zendframework/zend-eventmanager": "^2.6.3 || ^3.0.1",
2323
"zendframework/zend-http": "^2.5.4",
2424
"zendframework/zend-json": "^2.6.1 || ^3.0",
25-
"zendframework/zend-mvc": "^2.7.9 || ^3.0.2",
25+
"zendframework/zend-mvc": "^2.7.15 || ^3.0.4",
2626
"zendframework/zend-view": "^2.8.1"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^4.8",
29+
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5",
3030
"zendframework/zend-coding-standard": "~1.0.0"
3131
},
3232
"autoload": {

composer.lock

Lines changed: 709 additions & 353 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml.dist

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./vendor/autoload.php" colors="true">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true">
36
<testsuites>
47
<testsuite name="ZFApiProblem Module Tests">
58
<directory>./test</directory>
69
</testsuite>
710
</testsuites>
11+
812
<filter>
9-
<whitelist addUncoveredFilesFromWhitelist="true">
10-
<directory>./src</directory>
13+
<whitelist processUncoveredFilesFromWhitelist="true">
14+
<directory suffix=".php">./src</directory>
1115
</whitelist>
1216
</filter>
1317
</phpunit>

test/ApiProblemResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZFTest\ApiProblem;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use ZF\ApiProblem\ApiProblem;
1111
use ZF\ApiProblem\ApiProblemResponse;
1212

test/ApiProblemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZFTest\ApiProblem;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use ReflectionObject;
1111
use ZF\ApiProblem\ApiProblem;
1212
use ZF\ApiProblem\Exception;

test/Listener/ApiProblemListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZFTest\ApiProblem\Listener;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use Zend\Http\Request;
1111
use Zend\Mvc\Application;
1212
use Zend\Mvc\MvcEvent;
@@ -16,7 +16,7 @@
1616

1717
class ApiProblemListenerTest extends TestCase
1818
{
19-
public function setUp()
19+
protected function setUp()
2020
{
2121
$this->event = new MvcEvent();
2222
$this->event->setError('this is an error event');

test/Listener/RenderErrorListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZFTest\ApiProblem\Listener;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use RuntimeException;
1111
use TypeError;
1212
use Zend\Http\Request;
@@ -23,7 +23,7 @@ class RenderErrorListenerTest extends TestCase
2323
*/
2424
protected $listener;
2525

26-
public function setUp()
26+
protected function setUp()
2727
{
2828
$this->listener = new RenderErrorListener();
2929
}

test/Listener/SendApiProblemResponseListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZFTest\ApiProblem\Listener;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use Zend\Http\Response as HttpResponse;
1111
use Zend\Mvc\ResponseSender\SendResponseEvent;
1212
use ZF\ApiProblem\ApiProblem;
@@ -16,7 +16,7 @@
1616

1717
class SendApiProblemResponseListenerTest extends TestCase
1818
{
19-
public function setUp()
19+
protected function setUp()
2020
{
2121
$this->exception = new DomainException('Random error', 400);
2222
$this->apiProblem = new ApiProblem(400, $this->exception);

test/ModuleTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ZF\ApiProblem;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use ReflectionClass;
1111
use Zend\EventManager\EventManager;
1212
use Zend\EventManager\SharedEventManager;
@@ -34,12 +34,14 @@ public function testOnBootstrap()
3434
{
3535
$module = new Module();
3636

37-
$application = $this->getMock(Application::class, [], [], '', false);
37+
$application = $this->getMockBuilder(Application::class)
38+
->disableOriginalConstructor()
39+
->getMock();
3840
$serviceLocator = $this->getMockForAbstractClass(ServiceLocatorInterface::class);
3941
$serviceLocator->method('get')->will($this->returnCallback([$this, 'serviceLocator']));
4042

4143
$eventManager = $this->marshalEventManager();
42-
$event = $this->getMock(MvcEvent::class);
44+
$event = $this->getMockBuilder(MvcEvent::class)->getMock();
4345

4446
$application->method('getServiceManager')->willReturn($serviceLocator);
4547
$application->method('getEventManager')->willReturn($eventManager);
@@ -55,7 +57,7 @@ public function serviceLocator($service)
5557
return new ApiProblemListener();
5658
break;
5759
case 'SendResponseListener':
58-
$listener = $this->getMock(SendResponseListener::class);
60+
$listener = $this->getMockBuilder(SendResponseListener::class)->getMock();
5961
$listener->method('getEventManager')->willReturn(new EventManager());
6062

6163
return $listener;

test/View/ApiProblemRendererTest.php

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

77
namespace ZFTest\ApiProblem\View;
88

9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use ZF\ApiProblem\ApiProblem;
1111
use ZF\ApiProblem\View\ApiProblemModel;
1212
use ZF\ApiProblem\View\ApiProblemRenderer;
1313

1414
class ApiProblemRendererTest extends TestCase
1515
{
16-
public function setUp()
16+
protected function setUp()
1717
{
1818
$this->renderer = new ApiProblemRenderer();
1919
}

0 commit comments

Comments
 (0)