public function testGetLoginSavesPersonIdToSession() { $person = new Person(['id' => 1]); $session = $this->getMockSession(); $auth = new Auth($session, $this->getMockPersonRepository(), $this->getMockPermissionsProvider()); $session->expects($this->once())->method('set')->with($this->equalTo($auth->getSessionKey(), $person->getId())); $auth->login($person); }