Code Duplication    Length = 17-17 lines in 2 locations

tests/lib/share/helper.php 1 location

@@ 101-117 (lines=17) @@
98
		$this->assertSame($expectedUrl, $remoteUrl);
99
	}
100
101
	public function dataTestSplitUserRemoteError() {
102
		return array(
103
			// Invalid path
104
			array('user@'),
105
106
			// Invalid user
107
			array('@server'),
108
			array('us/er@server'),
109
			array('us:er@server'),
110
111
			// Invalid splitting
112
			array('user'),
113
			array(''),
114
			array('us/erserver'),
115
			array('us:erserver'),
116
		);
117
	}
118
119
	/**
120
	 * @dataProvider dataTestSplitUserRemoteError

tests/lib/share/share.php 1 location

@@ 1046-1062 (lines=17) @@
1043
1044
	}
1045
1046
	public function dataShareWithRemoteUserAndRemoteIsInvalid() {
1047
		return [
1048
			// Invalid path
1049
			array('user@'),
1050
1051
			// Invalid user
1052
			array('@server'),
1053
			array('us/er@server'),
1054
			array('us:er@server'),
1055
1056
			// Invalid splitting
1057
			array('user'),
1058
			array(''),
1059
			array('us/erserver'),
1060
			array('us:erserver'),
1061
		];
1062
	}
1063
1064
	/**
1065
	 * @dataProvider dataShareWithRemoteUserAndRemoteIsInvalid