Skip to content

Commit

Permalink
Merge pull request #16 from hiddeco/master
Browse files Browse the repository at this point in the history
Update tests to get 100% coverage
  • Loading branch information
wtfzdotnet committed Sep 13, 2015
2 parents 98cd2b1 + e8b690d commit 2b71f11
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 2b71f11

Please sign in to comment.