8000 [EventDispatcher] Add Drupal EventDispatcher by znerol · Pull Request #12521 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[EventDispatcher] Add Drupal EventDispatcher #12521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix colliding mock subscriber classes
  • Loading branch information
znerol committed Jan 18, 2015
commit 60845da0c60db3fec7e3c2d4b7407990b72855b9
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\EventDispatcher\DependencyInjection\CompiledRegisterListenersPass;

class CompiledCompiledRegisterListenersPassTest extends \PHPUnit_Framework_TestCase
class CompiledRegisterListenersPassTest extends \PHPUnit_Framework_TestCase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we don't use @coversDefaultClass and @Covers ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use those annotations. You can find some @covers ones but those were added a long time ago.

{
public function testPassAddsConstructorArgument() {
$container = new ContainerBuilder();
Expand All @@ -32,7 +32,7 @@ public function testPassAddsTaggedListenersAndSubscribers() {
$container = new ContainerBuilder();
$definition = $container->register('event_dispatcher', 'stdClass');

$container->register('test_subscriber', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService')
$container->register('test_subscriber', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\CompiledSubscriberService')
->addTag('kernel.event_subscriber');

$container->register('test_listener', 'stdObject')
Expand Down Expand Up @@ -138,7 +138,7 @@ public function testAbstractEventListener()
}
}

class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
class CompiledSubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add a use statement

{
public static function getSubscribedEvents()
{
Expand Down
0