Skip to content

Commit

Permalink
Update tests to get 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddeco committed Aug 3, 2015
1 parent 98cd2b1 commit e8b690d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Adapters/EventDispatcherTestLaravel4.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public function testItKnowsIfTheLaravelDispatcherHasListeners()
* assert that it is the Symfony Dispatcher
*/

public function testLegacyEventReceivesTheDispatcherInstance()
{
$dispatcher = null;
$this->dispatcher->addListener('test', function ($event) use (&$dispatcher) {
$dispatcher = $event->getDispatcher();
});
$this->dispatcher->dispatch('test');
$this->assertSame($this->symfonyDispatcher, $dispatcher);
}

public function testEventReceivesTheDispatcherInstance()
{
$dispatcher = null;
Expand Down
10 changes: 10 additions & 0 deletions tests/Adapters/EventDispatcherTestLaravel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public function testItKnowsIfTheLaravelDispatcherHasListeners()
* assert that it is the Symfony Dispatcher
*/

public function testLegacyEventReceivesTheDispatcherInstance()
{
$dispatcher = null;
$this->dispatcher->addListener('test', function ($event) use (&$dispatcher) {
$dispatcher = $event->getDispatcher();
});
$this->dispatcher->dispatch('test');
$this->assertSame($this->symfonyDispatcher, $dispatcher);
}

public function testEventReceivesTheDispatcherInstance()
{
$dispatcher = null;
Expand Down

0 comments on commit e8b690d

Please sign in to comment.