Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Commit

Permalink
Fix: Directly attach to SharedEventManager instance
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 9, 2015
1 parent aa444d5 commit 92ed1c6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions module/User/test/UserTest/GitHub/LoginListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use User\GitHub\LoginListener;
use Zend\EventManager\Event;
use Zend\EventManager\EventManager;
use Zend\EventManager\SharedEventManager;

/**
* Test case for {@see \User\GitHub\LoginListener}
Expand All @@ -28,11 +29,14 @@ protected function setUp()
*/
public function testAttach()
{
$eventManager = new EventManager();
$this->listener->attachShared($eventManager->getSharedManager());
$sharedEventManager = new SharedEventManager();

$listeners = $eventManager->getSharedManager()
->getListeners('ScnSocialAuth\Authentication\Adapter\HybridAuth', 'registerViaProvider');
$this->listener->attachShared($sharedEventManager);

$listeners = $sharedEventManager->getListeners(
'ScnSocialAuth\Authentication\Adapter\HybridAuth',
'registerViaProvider'
);

$this->assertFalse($listeners->isEmpty());
}
Expand Down

0 comments on commit 92ed1c6

Please sign in to comment.