fix test name
This commit is contained in:
parent
5d0fa550df
commit
9bcea2e9f4
@ -132,7 +132,7 @@ class EventDispatcherTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']);
|
$this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']);
|
||||||
$this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']);
|
$this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']);
|
||||||
$this->dispatcher->dispatch(new ContractsEvent(), self::preFoo);
|
$this->dispatcher->dispatch(new Event(), self::preFoo);
|
||||||
$this->assertTrue($this->listener->preFooInvoked);
|
$this->assertTrue($this->listener->preFooInvoked);
|
||||||
$this->assertFalse($this->listener->postFooInvoked);
|
$this->assertFalse($this->listener->postFooInvoked);
|
||||||
$this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent'));
|
$this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent'));
|
||||||
@ -146,7 +146,7 @@ class EventDispatcherTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']);
|
$this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']);
|
||||||
$this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']);
|
$this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']);
|
||||||
$this->dispatcher->dispatch(new Event(), self::preFoo);
|
$this->dispatcher->dispatch(new ContractsEvent(), self::preFoo);
|
||||||
$this->assertTrue($this->listener->preFooInvoked);
|
$this->assertTrue($this->listener->preFooInvoked);
|
||||||
$this->assertFalse($this->listener->postFooInvoked);
|
$this->assertFalse($this->listener->postFooInvoked);
|
||||||
$this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent'));
|
$this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent'));
|
||||||
|
Reference in New Issue
Block a user