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

testUpdateTokenAdd() public method

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