Code Duplication    Length = 7-10 lines in 6 locations

tests/lib/avatar.php 1 location

@@ 40-48 (lines=9) @@
37
	/**
38
	 * @return array
39
	 */
40
	public function traversalProvider() {
41
		return [
42
			['Pot\..\entiallyDangerousUsername'],
43
			['Pot/..\entiallyDangerousUsername'],
44
			['PotentiallyDangerousUsername/..'],
45
			['PotentiallyDangerousUsername\../'],
46
			['/../PotentiallyDangerousUsername'],
47
		];
48
	}
49
50
	/**
51
	 * @dataProvider traversalProvider

tests/lib/connector/sabre/BlockLegacyClientPluginTest.php 2 locations

@@ 49-57 (lines=9) @@
46
	/**
47
	 * @return array
48
	 */
49
	public function oldDesktopClientProvider() {
50
		return [
51
			['Mozilla/5.0 (1.5.0) mirall/1.5.0'],
52
			['mirall/1.5.0'],
53
			['mirall/1.5.4'],
54
			['mirall/1.6.0'],
55
			['Mozilla/5.0 (Bogus Text) mirall/1.6.9'],
56
		];
57
	}
58
59
	/**
60
	 * @dataProvider oldDesktopClientProvider
@@ 86-94 (lines=9) @@
83
	/**
84
	 * @return array
85
	 */
86
	public function newAndAlternateDesktopClientProvider() {
87
		return [
88
			['Mozilla/5.0 (1.7.0) mirall/1.7.0'],
89
			['mirall/1.8.3'],
90
			['mirall/1.7.2'],
91
			['mirall/1.7.0'],
92
			['Mozilla/5.0 (Bogus Text) mirall/1.9.3'],
93
		];
94
	}
95
96
	/**
97
	 * @dataProvider newAndAlternateDesktopClientProvider

tests/lib/files/pathverificationtest.php 1 location

@@ 82-91 (lines=10) @@
79
		$this->view->verifyPath('', $fileName);
80
	}
81
82
	public function providesAstralPlane() {
83
		return [
84
			// this is the monkey emoji - http://en.wikipedia.org/w/index.php?title=%F0%9F%90%B5&redirect=no
85
			['🐵'],
86
			['🐵.txt'],
87
			['txt.💩'],
88
			['💩🐵.txt'],
89
			['💩🐵'],
90
		];
91
	}
92
93
	/**
94
	 * @dataProvider providesInvalidCharsWindows

tests/lib/ocs/privatedata.php 1 location

@@ 145-151 (lines=7) @@
142
		$this->assertEquals(101, $result->getStatusCode());
143
	}
144
145
	public function deleteWithEmptyKeysProvider() {
146
		return array(
147
			array(array()),
148
			array(array('app' => '123')),
149
			array(array('key' => '123')),
150
		);
151
	}
152
153
	/**
154
	 * @param \OC_OCS_Result $result

tests/lib/files/view.php 1 location

@@ 1415-1421 (lines=7) @@
1412
		$lockingProvider->releaseAll();
1413
	}
1414
1415
	public function dataLockPaths() {
1416
		return [
1417
			['/testuser/{folder}', ''],
1418
			['/testuser', '/{folder}'],
1419
			['', '/testuser/{folder}'],
1420
		];
1421
	}
1422
1423
	public function pathRelativeToFilesProvider() {
1424
		return [