Code Duplication    Length = 11-11 lines in 2 locations

tests/unit/controller/settingscontrollerTest.php 2 locations

@@ 66-76 (lines=11) @@
63
	/**
64
	 * @dataProvider setViewWithAllowedViewDataProvider
65
	 */
66
	public function testSetViewWithAllowedView($view) {
67
		$this->config->expects($this->once())
68
			->method('setUserValue')
69
			->with('user123', $this->appName, 'currentView', $view);
70
71
		$actual = $this->controller->setConfig('view', $view);
72
73
		$this->assertInstanceOf('OCP\AppFramework\Http\JSONResponse', $actual);
74
		$this->assertEquals([], $actual->getData());
75
		$this->assertEquals(200, $actual->getStatus());
76
	}
77
78
	public function setViewWithAllowedViewDataProvider() {
79
		return [
@@ 136-146 (lines=11) @@
133
	/**
134
	 * @dataProvider setPopoverWithAllowedValueDataProvider
135
	 */
136
	public function testSetPopoverWithAllowedValue($value) {
137
		$this->config->expects($this->once())
138
			->method('setUserValue')
139
			->with('user123', $this->appName, 'skipPopover', $value);
140
141
		$actual = $this->controller->setConfig('skipPopover', $value);
142
143
		$this->assertInstanceOf('OCP\AppFramework\Http\JSONResponse', $actual);
144
		$this->assertEquals([], $actual->getData());
145
		$this->assertEquals(200, $actual->getStatus());
146
	}
147
148
	public function setPopoverWithAllowedValueDataProvider() {
149
		return [