CakeDC\Users\Test\TestCase\Model\Entity\UserTest::testUpdateTokenExistingAdd PHP Method

testUpdateTokenExistingAdd() public method

test
public testUpdateTokenExistingAdd ( ) : void
return void
    public function testUpdateTokenExistingAdd()
    {
        $this->User['token'] = 'aaa';
        $this->User['token_expires'] = $this->now;
        $this->User->updateToken(20);
        $this->assertEquals('20 seconds after', $this->User['token_expires']->diffForHumans($this->now));
        $this->assertNotEquals('aaa', $this->User['token']);
    }