Skip to content

Commit

Permalink
Merge pull request #53 from acrobat/phpunit-upgrade
Browse files Browse the repository at this point in the history
Upgrade phpunit dependency
  • Loading branch information
acrobat authored Jul 18, 2017
2 parents 24def49 + 6c70d89 commit 92b1fa3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Tests/DependencyInjection/BernardExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bernard\BernardBundle\DependencyInjection\BernardExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class BernardExtensionTest extends \PHPUnit_Framework_TestCase
class BernardExtensionTest extends \PHPUnit\Framework\TestCase
{
/** @var BernardExtension */
private $extension;
Expand All @@ -25,8 +25,8 @@ public function testServicesExists()
$this->extension->load([$config], $this->container);

// Make sure we don't have a dependencies on a real driver.
$this->container->set('bernard.driver', $this->getMock('Bernard\Driver'));
$this->container->set('event_dispatcher', $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'));
$this->container->set('bernard.driver', $this->createMock('Bernard\Driver'));
$this->container->set('event_dispatcher', $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'));

// Real services.
$this->assertInstanceOf('Bernard\Producer', $this->container->get('bernard.producer'));
Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/Compiler/NormalizerPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bernard\BernardBundle\DependencyInjection\Compiler\NormalizerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class NormalizerPassTest extends \PHPUnit_Framework_TestCase
class NormalizerPassTest extends \PHPUnit\Framework\TestCase
{
/** @var ContainerBuilder */
private $container;
Expand Down
7 changes: 4 additions & 3 deletions Tests/DependencyInjection/Compiler/ReceiverPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

class ReceiverPassTest extends \PHPUnit_Framework_TestCase
class ReceiverPassTest extends \PHPUnit\Framework\TestCase
{
/** @var ContainerBuilder */
private $container;
Expand Down Expand Up @@ -45,10 +45,11 @@ public function testRegisterMultipleTags()
$this->assertEquals($expected, $arguments[1]);
}

/**
* @expectedException \RuntimeException
*/
public function testExceptionWhenNameAttributeIsMissing()
{
$this->setExpectedException('RuntimeException');

$this->container->register('test_receiver', 'stdClass')->addTag('bernard.receiver', []);

$pass = new ReceiverPass();
Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bernard\BernardBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;

class ConfigurationTest extends \PHPUnit_Framework_TestCase
class ConfigurationTest extends \PHPUnit\Framework\TestCase
{
public function testDefaults()
{
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require-dev" : {
"symfony/console": "^2.7|^3.0",
"symfony/finder": "^2.7|^3.0",
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^5.5|^6.0"
},

"extra" : {
Expand Down

0 comments on commit 92b1fa3

Please sign in to comment.