Exemplo n.º 1
0
 public function testRefreshRememberLoginToken()
 {
     $person = $this->getMockBuilder(Person::class)->setMethods(['setRememberToken', 'getId'])->setConstructorArgs([[]])->getMock();
     $person->expects($this->once())->method('getId')->will($this->returnValue(1));
     $person->expects($this->once())->method('setRememberToken')->with($this->anything());
     $personProvider = $this->getMockPersonRepository(['save']);
     $personProvider->expects($this->once())->method('save')->with($this->equalTo($person));
     $auth = new Auth($this->getMockSession(), $personProvider, $this->getMockPermissionsProvider());
     $auth->refreshRememberLoginToken($person);
 }