/**
  * @return void
  */
 public function testChangeResetPasswordLinkToken()
 {
     $token = '1';
     $this->assertInstanceOf('Magento\\User\\Model\\User', $this->model->changeResetPasswordLinkToken($token));
     $this->assertEquals($token, $this->model->getRpToken());
     $this->assertInternalType('string', $this->model->getRpTokenCreatedAt());
 }
Ejemplo n.º 2
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testChangeResetPasswordLinkToken()
 {
     $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME);
     $this->_model->changeResetPasswordLinkToken('test');
     $date = $this->_model->getRpTokenCreatedAt();
     $this->assertNotNull($date);
     $this->_model->save();
     $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME);
     $this->assertEquals('test', $this->_model->getRpToken());
     $this->assertEquals(strtotime($date), strtotime($this->_model->getRpTokenCreatedAt()));
 }