Skip to content

Commit ce5bb7f

Browse files
author
oxcom
committed
issue #9: update test coverage for PHP7+
1 parent 088b3c3 commit ce5bb7f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

EventListener/ExceptionListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace SymfonyRollbarBundle\EventListener;
44

5-
use Symfony\Component\Console\ConsoleEvents;
65
use Symfony\Component\Console\Event\ConsoleErrorEvent;
76
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
87
use Symfony\Component\DependencyInjection\ContainerInterface;

Tests/SymfonyRollbarBundle/EventListener/ConsoleListenerTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
1414
use SymfonyRollbarBundle\Command\DeployCommand;
1515
use SymfonyRollbarBundle\EventListener\AbstractListener;
16+
use SymfonyRollbarBundle\EventListener\ErrorListener;
1617
use SymfonyRollbarBundle\Tests\Fixtures\ErrorHandler;
1718

1819
/**
1920
* Class ConsoleListenerTest
20-
* @package SymfonyRollbarBundle\Tests\SymfonyRollbarBundle\EventListener
21-
* @runTestsInSeparateProcesses
21+
*
22+
* @package SymfonyRollbarBundle\Tests\EventListener
2223
*/
2324
class ConsoleListenerTest extends KernelTestCase
2425
{
@@ -30,6 +31,7 @@ public function setUp()
3031

3132
/**
3233
* @dataProvider provideLegacyEvents
34+
* @covers \SymfonyRollbarBundle\EventListener\ExceptionListener::onConsoleError
3335
*
3436
* @param $error
3537
* @param $event
@@ -73,8 +75,8 @@ public function testLegacyConsoleException($error, $event)
7375
/**
7476
* @var AbstractListener $listener
7577
*/
76-
if (!$listener[0] instanceof AbstractListener) {
77-
// disable default symfony listeners
78+
if (!$listener[0] instanceof AbstractListener || $listener[0] instanceof ErrorListener) {
79+
// disable default symfony listeners and current error listener
7880
$eventDispatcher->removeListener($key, $listener);
7981
continue;
8082
}

phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<whitelist>
3232
<directory>./</directory>
3333
<exclude>
34-
<directory>./Resources</directory>
35-
<directory>./Tests</directory>
36-
<directory>./vendor</directory>
34+
<directory>./Resources/</directory>
35+
<directory>./Tests/</directory>
36+
<directory>./vendor/</directory>
3737
</exclude>
3838
</whitelist>
3939
</filter>

0 commit comments

Comments
 (0)