Welcome to mirror list, hosted at ThFree Co, Russian Federation.

UserTest.php « unit « tests - github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ae77bbeb4f3a6d37457257b5102d9f74057741ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php


use OCA\OJSXC\User;
use PHPUnit\Framework\TestCase;

class UserTest extends TestCase
{
	public function test()
	{
		$user1 = new User(" test @ 'abc", 'Test123', null);

		$this->assertEquals($user1->getFullName(), 'Test123');
		$this->assertEquals($user1->getUid(), '_ojsxc_esc_space_test_ojsxc_esc_space__ojsxc_esc_at__ojsxc_esc_space__ojsxc_squote_space_abc');
		$user1->setUid('test1');
		$user1->setFullName('test2');
		$this->assertEquals($user1->getUid(), 'test1');
		$this->assertEquals($user1->getFullName(), 'test2');
	}
}