aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/LoginCredentials/CredentialsTest.php
blob: a64ad6c9b76e582e07fe03ec0f54e3b0cf22c64d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php

/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace Test\Authentication\LoginCredentials;

use OC\Authentication\LoginCredentials\Credentials;
use Test\TestCase;

class CredentialsTest extends TestCase {
	/** @var string */
	private $uid;

	/** @var string */
	private $user;

	/** @var string */
	private $password;

	/** @var Credentials */
	private $credentials;

	protected function setUp(): void {
		parent::setUp();

		$this->uid = 'user123';
		$this->user = 'User123';
		$this->password = '123456';

		$this->credentials = new Credentials($this->uid, $this->user, $this->password);
	}

	public function testGetUID(): void {
		$this->assertEquals($this->uid, $this->credentials->getUID());
	}

	public function testGetUserName(): void {
		$this->assertEquals($this->user, $this->credentials->getLoginName());
	}

	public function testGetPassword(): void {
		$this->assertEquals($this->password, $this->credentials->getPassword());
	}
}