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

Commit 4a31d50

Browse files
committed
PHPUnit 6 added
composer changed to phpunit ^5.7 || ^6.0.6
1 parent 07d53d3 commit 4a31d50

15 files changed

+26
-29
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"require-dev": {
2222
"ocramius/proxy-manager": "^1.0 || ^2.0",
2323
"phpbench/phpbench": "^0.10.0",
24-
"phpunit/phpunit": "^5.2.10",
24+
"phpunit/phpunit": "^5.7 || ^6.0.6",
2525
"mikey179/vfsStream": "^1.6",
2626
"zendframework/zend-coding-standard": "~1.0.0"
2727
},

test/AbstractFactory/ConfigAbstractFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use ZendTest\ServiceManager\TestAsset\SecondComplexDependencyObject;
1616
use ZendTest\ServiceManager\TestAsset\SimpleDependencyObject;
1717

18-
class ConfigAbstractFactoryTest extends \PHPUnit_Framework_TestCase
18+
class ConfigAbstractFactoryTest extends \PHPUnit\Framework\TestCase
1919
{
2020

2121
public function testCanCreateReturnsTrueIfDependencyNotArrays()

test/AbstractFactory/ReflectionBasedAbstractFactoryTest.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace ZendTest\ServiceManager\AbstractFactory;
99

1010
use Interop\Container\ContainerInterface;
11-
use PHPUnit_Framework_TestCase as TestCase;
11+
use PHPUnit\Framework\TestCase as TestCase;
1212
use Zend\ServiceManager\AbstractFactory\ReflectionBasedAbstractFactory;
1313
use Zend\ServiceManager\Exception\ServiceNotFoundException;
1414

@@ -55,26 +55,22 @@ public function testFactoryRaisesExceptionWhenUnableToResolveATypeHintedService(
5555
$this->container->has('config')->willReturn(false);
5656
$factory = new ReflectionBasedAbstractFactory();
5757
$this->expectException(ServiceNotFoundException::class);
58-
$this->expectExceptionMessage(
59-
sprintf(
60-
'Unable to create service "%s"; unable to resolve parameter "sample" using type hint "%s"',
61-
TestAsset\ClassWithTypeHintedConstructorParameter::class,
62-
TestAsset\SampleInterface::class
63-
)
64-
);
58+
$this->expectExceptionMessage(sprintf(
59+
'Unable to create service "%s"; unable to resolve parameter "sample" using type hint "%s"',
60+
TestAsset\ClassWithTypeHintedConstructorParameter::class,
61+
TestAsset\SampleInterface::class
62+
));
6563
$factory($this->container->reveal(), TestAsset\ClassWithTypeHintedConstructorParameter::class);
6664
}
6765

6866
public function testFactoryRaisesExceptionForScalarParameters()
6967
{
7068
$factory = new ReflectionBasedAbstractFactory();
7169
$this->expectException(ServiceNotFoundException::class);
72-
$this->expectExceptionMessage(
73-
sprintf(
74-
'Unable to create service "%s"; unable to resolve parameter "foo" to a class, interface, or array type',
75-
TestAsset\ClassWithScalarParameters::class
76-
)
77-
);
70+
$this->expectExceptionMessage(sprintf(
71+
'Unable to create service "%s"; unable to resolve parameter "foo" to a class, interface, or array type',
72+
TestAsset\ClassWithScalarParameters::class
73+
));
7874
$instance = $factory($this->container->reveal(), TestAsset\ClassWithScalarParameters::class);
7975
}
8076

test/AbstractPluginManagerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace ZendTest\ServiceManager;
99

1010
use Interop\Container\ContainerInterface;
11-
use PHPUnit_Framework_TestCase as TestCase;
11+
use PHPUnit\Framework\TestCase as TestCase;
1212
use stdClass;
1313
use Zend\ServiceManager\ConfigInterface;
1414
use Zend\ServiceManager\Exception\InvalidArgumentException;
@@ -181,7 +181,8 @@ function ($container, $name, $callback) {
181181
public function testGetRaisesExceptionWhenNoFactoryIsResolved()
182182
{
183183
$pluginManager = $this->createContainer();
184-
$this->expectException(ServiceNotFoundException::class, get_class($pluginManager));
184+
$this->expectException(ServiceNotFoundException::class);
185+
$this->expectExceptionMessage(get_class($pluginManager));
185186
$pluginManager->get('Some\Unknown\Service');
186187
}
187188

test/ConfigTest.php

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

88
namespace ZendTest\ServiceManager;
99

10-
use PHPUnit_Framework_TestCase as TestCase;
10+
use PHPUnit\Framework\TestCase as TestCase;
1111
use Zend\ServiceManager\Config;
1212
use Zend\ServiceManager\ServiceManager;
1313

test/ExamplePluginManagerTest.php

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

88
namespace ZendTest\ServiceManager;
99

10-
use PHPUnit_Framework_TestCase as TestCase;
10+
use PHPUnit\Framework\TestCase as TestCase;
1111
use Zend\ServiceManager\ServiceManager;
1212
use Zend\ServiceManager\Test\CommonPluginManagerTrait;
1313
use ZendTest\ServiceManager\TestAsset\InvokableObject;

test/Exception/CyclicAliasExceptionTest.php

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

88
namespace ZendTest\ServiceManager\Exception;
99

10-
use PHPUnit_Framework_TestCase as TestCase;
10+
use PHPUnit\Framework\TestCase as TestCase;
1111
use Zend\ServiceManager\Exception\CyclicAliasException;
1212

1313
/**

test/Factory/InvokableFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace ZendTest\ServiceManager\Factory;
99

1010
use Interop\Container\ContainerInterface;
11-
use PHPUnit_Framework_TestCase as TestCase;
11+
use PHPUnit\Framework\TestCase as TestCase;
1212
use Zend\ServiceManager\Factory\InvokableFactory;
1313
use ZendTest\ServiceManager\TestAsset\InvokableObject;
1414

test/LazyServiceIntegrationTest.php

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

88
namespace ZendTest\ServiceManager;
99

10-
use PHPUnit_Framework_TestCase as TestCase;
10+
use PHPUnit\Framework\TestCase as TestCase;
1111
use ProxyManager\Autoloader\AutoloaderInterface;
1212
use RecursiveDirectoryIterator;
1313
use RecursiveIteratorIterator;

test/Proxy/LazyServiceFactoryTest.php

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

1010
use Interop\Container\ContainerInterface;
1111
use PHPUnit_Framework_MockObject_MockObject as MockObject;
12-
use PHPUnit_Framework_TestCase as TestCase;
12+
use PHPUnit\Framework\TestCase as TestCase;
1313
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
1414
use ProxyManager\Proxy\LazyLoadingInterface;
1515
use ProxyManager\Proxy\VirtualProxyInterface;

0 commit comments

Comments
 (0)