CakeDC\Users\Test\TestCase\Model\Behavior\PasswordBehaviorTest::testResetTokenUserAlreadyActive PHP Method

testResetTokenUserAlreadyActive() public method

Test resetToken
    public function testResetTokenUserAlreadyActive()
    {
        $activeUser = TableRegistry::get('CakeDC/Users.Users')->findByUsername('user-4')->first();
        $this->assertTrue($activeUser->active);
        $this->table = $this->getMockForModel('CakeDC/Users.Users', ['save']);
        $this->table->expects($this->never())->method('save');
        $this->Behavior->expects($this->never())->method('sendResetPasswordEmail');
        $this->Behavior->resetToken('user-4', ['expiration' => 3600, 'checkActive' => true]);
    }