Example #1
0
 public function testAssigningUser()
 {
     $userProvider = m::mock('Gumer\\PSN\\Authentication\\UserProviderInterface');
     $userInstance = m::mock('Gumer\\PSN\\Authentication\\UserInterface');
     $manager = Manager::instance($userProvider);
     $manager->be($userInstance);
     $this->assertSame($userInstance, $manager->user());
 }
 /**
  * @param \Gumer\PSN\Authentication\Manager $manager
  */
 public function __construct(Manager $manager = null)
 {
     $this->manager = $manager ?: Manager::instance();
 }