Code Duplication    Length = 13-13 lines in 2 locations

apps/user_ldap/tests/user/user.php 2 locations

@@ 66-78 (lines=13) @@
63
		return array($access, $connector);
64
	}
65
66
	public function testGetDNandUsername() {
67
		list($access, $config, $filesys, $image, $log, $avaMgr) =
68
			$this->getTestInstances();
69
70
		$uid = 'alice';
71
		$dn  = 'uid=alice,dc=foo,dc=bar';
72
73
		$user = new User(
74
			$uid, $dn, $access, $config, $filesys, $image, $log, $avaMgr);
75
76
		$this->assertSame($dn, $user->getDN());
77
		$this->assertSame($uid, $user->getUsername());
78
	}
79
80
	public function testUpdateEmailProvided() {
81
		list($access, $config, $filesys, $image, $log, $avaMgr, $dbc) =
@@ 893-905 (lines=13) @@
890
	/**
891
	 * @dataProvider displayNameProvider
892
	 */
893
	public function testComposeAndStoreDisplayName($part1, $part2, $expected) {
894
		list($access, $config, $filesys, $image, $log, $avaMgr) =
895
			$this->getTestInstances();
896
897
		$config->expects($this->once())
898
			->method('setUserValue');
899
900
		$user = new User(
901
			'user', 'cn=user', $access, $config, $filesys, $image, $log, $avaMgr);
902
903
		$displayName = $user->composeAndStoreDisplayName($part1, $part2);
904
		$this->assertSame($expected, $displayName);
905
	}
906
}
907